.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/io/plot_surfrad.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_io_plot_surfrad.py: Plot SurfRad Data ----------------- This data shows how to read in SurfRad data from the urls and plot the data up in a time series Author: Adam Theisen .. GENERATED FROM PYTHON SOURCE LINES 11-40 .. image-sg:: /source/auto_examples/io/images/sphx_glr_plot_surfrad_001.png :alt: SURFRAD Site: tbl downwelling_global on 20230108, SURFRAD Site: tbl total_net on 20230108 :srcset: /source/auto_examples/io/images/sphx_glr_plot_surfrad_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Downloading tbl23152.dat Downloading tbl23153.dat ['/home/runner/work/ACT/ACT/examples/io/Boulder_CO_surfrad/tbl23152.dat', '/home/runner/work/ACT/ACT/examples/io/Boulder_CO_surfrad/tbl23153.dat'] /home/runner/work/ACT/ACT/examples/io/plot_surfrad.py:32: UserWarning: No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument. plt.legend() | .. code-block:: Python import act import matplotlib.pyplot as plt # Easily download data from SURFRAD results = act.discovery.download_surfrad_data('tbl', startdate='20230601', enddate='20230602') print(results) # But it's easy enough to read form the URLs as well url = [ 'https://gml.noaa.gov/aftp/data/radiation/surfrad/Boulder_CO/2023/tbl23008.dat', 'https://gml.noaa.gov/aftp/data/radiation/surfrad/Boulder_CO/2023/tbl23009.dat', ] ds = act.io.read_surfrad(url) # Create an ACT TimeSeriesDisplay. display = act.plotting.TimeSeriesDisplay(ds, subplot_shape=(2,), figsize=(15, 10)) # Plot different variables from the SURFRAD data display.plot('upwelling_global', subplot_index=(0,), label='Upwelling') display.plot('downwelling_global', subplot_index=(0,), label='Downwelling') plt.legend() display.plot('net_radiation', subplot_index=(1,), label='Net Radiation') display.plot('net_ir', subplot_index=(1,), label='Net IR') display.plot('total_net', subplot_index=(1,), label='Total Net') plt.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.371 seconds) .. _sphx_glr_download_source_auto_examples_io_plot_surfrad.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_surfrad.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_surfrad.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_surfrad.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_