
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "source/auto_examples/plot_qc.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_source_auto_examples_plot_qc.py>`
        to download the full example code

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_source_auto_examples_plot_qc.py:


Example on how to 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-33



.. image:: /source/auto_examples/images/sphx_glr_plot_qc_001.png
    :alt: maraosmetM1.a1 temperature_ambient on 20180201
    :class: sphx-glr-single-img





.. code-block:: default



    import act
    from matplotlib import pyplot as plt

    # Read in sample AOSMET data
    files = act.tests.sample_files.EXAMPLE_AOSMET
    obj = act.io.armfiles.read_netcdf(files)

    # Query DQR webservice for a specific variable
    variable = 'temperature_ambient'
    obj = act.qc.arm.add_dqr_to_qc(obj, variable=variable)

    # Plot data
    # Creat Plot Display
    display = act.plotting.TimeSeriesDisplay(obj, 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.575 seconds)


.. _sphx_glr_download_source_auto_examples_plot_qc.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download sphx-glr-download-python

     :download:`Download Python source code: plot_qc.py <plot_qc.py>`



  .. container:: sphx-glr-download sphx-glr-download-jupyter

     :download:`Download Jupyter notebook: plot_qc.ipynb <plot_qc.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
