.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/plotting/plot_ceil.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_source_auto_examples_plotting_plot_ceil.py: Simple plot of 2D data ---------------------- This is an example of how to download and plot ceiliometer data from the SGP site over Oklahoma. .. GENERATED FROM PYTHON SOURCE LINES 10-41 .. image-sg:: /source/auto_examples/plotting/images/sphx_glr_plot_ceil_001.png :alt: sgpceilC1.b1 backscatter on 20220114 :srcset: /source/auto_examples/plotting/images/sphx_glr_plot_ceil_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none [DOWNLOADING] sgpceilC1.b1.20220115.000015.nc [DOWNLOADING] sgpceilC1.b1.20220117.000010.nc [DOWNLOADING] sgpceilC1.b1.20220114.000001.nc [DOWNLOADING] sgpceilC1.b1.20220116.000013.nc [DOWNLOADING] sgpceilC1.b1.20220118.000008.nc If you use these data to prepare a publication, please cite: Zhang, D., Ermold, B., & Morris, V. Ceilometer (CEIL). Atmospheric Radiation Measurement (ARM) User Facility. https://doi.org/10.5439/1181954 /home/runner/micromamba/envs/act-docs/lib/python3.12/site-packages/dask/_task_spec.py:651: RuntimeWarning: invalid value encountered in log10 return self.func(*new_argspec) | .. code-block:: Python import os from arm_test_data import DATASETS import matplotlib.pyplot as plt import act # Place your username and token here username = os.getenv('ARM_USERNAME') token = os.getenv('ARM_PASSWORD') # If the username and token are not set, use the existing sample file if username is None or token is None or len(username) == 0 or len(token) == 0: filename_ceil = DATASETS.fetch('sgpceilC1.b1.20190101.000000.nc') ceil_ds = act.io.arm.read_arm_netcdf(filename_ceil, engine='netcdf4') else: # Example to show how easy it is to download ARM data if a username/token are set results = act.discovery.download_arm_data( username, token, 'sgpceilC1.b1', '2022-01-14', '2022-01-19' ) ceil_ds = act.io.arm.read_arm_netcdf(results) # Adjust ceilometer data for plotting ceil_ds = act.corrections.ceil.correct_ceil(ceil_ds, -9999.0) # Plot up ceilometer backscatter using HomeyerRainbow CVD friendly colormap # The same could be done with keyword 'cmap='HomeyerRainbow' display = act.plotting.TimeSeriesDisplay(ceil_ds, subplot_shape=(1,), figsize=(15, 5)) display.plot('backscatter', subplot_index=(0,), cvd_friendly=True) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 13.716 seconds) .. _sphx_glr_download_source_auto_examples_plotting_plot_ceil.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ceil.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ceil.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_ceil.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_