.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/discovery/plot_neon.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_discovery_plot_neon.py: NEON Data --------- This example shows how to download data from NEON and ARM 2m surface meteorology stations on the North Slope and plot them .. GENERATED FROM PYTHON SOURCE LINES 10-64 .. image-sg:: /source/auto_examples/discovery/images/sphx_glr_plot_neon_001.png :alt: NEON tempSingleMean on 20221001 :srcset: /source/auto_examples/discovery/images/sphx_glr_plot_neon_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none [DOWNLOADING] nsametC1.b1.20221001.000000.cdf [DOWNLOADING] nsametC1.b1.20221002.000000.cdf [DOWNLOADING] nsametC1.b1.20221003.000000.cdf [DOWNLOADING] nsametC1.b1.20221004.000000.cdf [DOWNLOADING] nsametC1.b1.20221005.000000.cdf [DOWNLOADING] nsametC1.b1.20221006.000000.cdf [DOWNLOADING] nsametC1.b1.20221007.000000.cdf If you use these data to prepare a publication, please cite: Kyrouac, J., Shi, Y., & Tuftedal, M. Surface Meteorological Instrumentation (MET), 2022-10-01 to 2022-10-07, North Slope Alaska (NSA), Central Facility, Barrow AK (C1). Atmospheric Radiation Measurement (ARM) User Facility. https://doi.org/10.5439/1786358 /home/runner/work/ACT/ACT/act/io/arm.py:155: FutureWarning: In a future version of xarray the default value for data_vars will change from data_vars='all' to data_vars=None. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set data_vars explicitly. ds = xr.open_mfdataset(filenames, **kwargs) [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.variables.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.sensor_positions.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.010.030.SAAT_30min.2022-10.basic.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.EML.20221001-20221101.20250129T000730Z.xml [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.010.001.SAAT_1min.2022-10.basic.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.020.001.SAAT_1min.2022-10.basic.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.030.001.SAAT_1min.2022-10.basic.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.readme.20250129T000730Z.txt [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.030.030.SAAT_30min.2022-10.basic.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.020.030.SAAT_30min.2022-10.basic.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.variables.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.020.030.SAAT_30min.2022-10.expanded.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.020.001.SAAT_1min.2022-10.expanded.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.EML.20221001-20221101.20250129T000730Z.xml [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.sensor_positions.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.010.030.SAAT_30min.2022-10.expanded.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.010.001.SAAT_1min.2022-10.expanded.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.readme.20250129T000730Z.txt [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.030.001.SAAT_1min.2022-10.expanded.20230220T172200Z.csv [DOWNLOADING] NEON.D18.BARR.DP1.00002.001.000.030.030.SAAT_30min.2022-10.expanded.20230220T172200Z.csv | .. code-block:: Python import os import glob import matplotlib.pyplot as plt import act # Place your username and token here username = os.getenv('ARM_USERNAME') token = os.getenv('ARM_PASSWORD') if token is not None and len(token) > 0: # Download ARM data if a username/token are set files = act.discovery.download_arm_data( username, token, 'nsametC1.b1', '2022-10-01', '2022-10-07' ) ds = act.io.arm.read_arm_netcdf(files) # Download NEON Data # NEON sites can be found through the NEON website # https://www.neonscience.org/field-sites/explore-field-sites site_code = 'BARR' product_code = 'DP1.00002.001' result = act.discovery.neon.download_neon_data(site_code, product_code, '2022-10') # A number of files are downloaded and further explained in the readme file that's downloaded. # These are the files we will need for reading 1 minute NEON data file = glob.glob( os.path.join( '.', 'BARR_DP1.00002.001', 'NEON.D18.BARR.DP1.00002.001.000.010.001.SAAT_1min.2022-10.expanded.*.csv', ) ) variable_file = glob.glob( os.path.join('.', 'BARR_DP1.00002.001', 'NEON.D18.BARR.DP1.00002.001.variables.*.csv') ) position_file = glob.glob( os.path.join( '.', 'BARR_DP1.00002.001', 'NEON.D18.BARR.DP1.00002.001.sensor_positions.*.csv', ) ) # Read in the data using the ACT reader, passing with it the variable and position files # for added information in the dataset ds2 = act.io.read_neon_csv(file, variable_files=variable_file, position_files=position_file) # Plot up the two datasets display = act.plotting.TimeSeriesDisplay({'ARM': ds, 'NEON': ds2}) display.plot('temp_mean', 'ARM', marker=None, label='ARM') display.plot('tempSingleMean', 'NEON', marker=None, label='NEON') display.day_night_background('ARM') plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 31.239 seconds) .. _sphx_glr_download_source_auto_examples_discovery_plot_neon.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_neon.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_neon.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_neon.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_