.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/xradar/plot_grid_xradar.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_examples_xradar_plot_grid_xradar.py: ================================= Grid Data Using Xradar and Py-ART ================================= An example which uses xradar and Py-ART to grid a PPI file. .. GENERATED FROM PYTHON SOURCE LINES 9-41 .. image-sg:: /examples/xradar/images/sphx_glr_plot_grid_xradar_001.png :alt: xsapr-sg 0.0 km 2011-05-20T06:42:11Z Equivalent reflectivity factor :srcset: /examples/xradar/images/sphx_glr_plot_grid_xradar_001.png :class: sphx-glr-single-img .. code-block:: Python # Author: Max Grover (mgrover@anl.gov) # License: BSD 3 clause import xradar as xd import pyart from pyart.testing import get_test_data # Locate the test data and read in using xradar filename = get_test_data("swx_20120520_0641.nc") tree = xd.io.open_cfradial1_datatree(filename) # Give the tree Py-ART radar methods radar = tree.pyart.to_radar() # Grid using 11 vertical levels, and 101 horizontal grid cells at a resolution on 1 km grid = pyart.map.grid_from_radars( (radar,), grid_shape=(11, 101, 101), grid_limits=( (0.0, 10_000), (-50_000.0, 50_000.0), (-50_000, 50_000.0), ), ) display = pyart.graph.GridMapDisplay(grid) display.plot_grid( "reflectivity_horizontal", level=0, vmin=-20, vmax=60, cmap="pyart_ChaseSpectral" ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 4.541 seconds) .. _sphx_glr_download_examples_xradar_plot_grid_xradar.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_grid_xradar.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_grid_xradar.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_grid_xradar.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_