.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/qc/plot_dqr_qc.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_qc_plot_dqr_qc.py: Query the ARM DQR webservice ---------------------------- Simple example for querying the ARM DQR webservice and plotting up the results Author: Adam Theisen .. GENERATED FROM PYTHON SOURCE LINES 10-39 .. image-sg:: /source/auto_examples/qc/images/sphx_glr_plot_dqr_qc_001.png :alt: maraosmetM1.a1 temperature_ambient on 20180201 :srcset: /source/auto_examples/qc/images/sphx_glr_plot_dqr_qc_001.png :class: sphx-glr-single-img .. code-block:: Python from arm_test_data import DATASETS from matplotlib import pyplot as plt import act # Read in sample AOSMET data filename_aosmet = DATASETS.fetch('maraosmetM1.a1.20180201.000000.nc') ds = act.io.arm.read_arm_netcdf(filename_aosmet) # Query DQR webservice for a specific variable # As can be seen in the "Plotting QC Flags" example # a call to obj.clean.cleanup() would normally be needed # in order to plot up ARM's QC information. In this case # the call to add DQRs to the QC automatically applies that # cleanup so you don't have to. variable = 'temperature_ambient' ds = act.qc.arm.add_dqr_to_qc(ds, variable=variable) # Plot data # Creat Plot Display display = act.plotting.TimeSeriesDisplay(ds, figsize=(15, 10), subplot_shape=(2,)) # Plot temperature data in top plot display.plot(variable, subplot_index=(0,)) # Plot QC data display.qc_flag_block_plot(variable, subplot_index=(1,)) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.289 seconds) .. _sphx_glr_download_source_auto_examples_qc_plot_dqr_qc.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_dqr_qc.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_dqr_qc.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_dqr_qc.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_