-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOC: Add docs on using xradar with Py-ART
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ dependencies: | |
- sphinx-copybutton | ||
- nbsphinx | ||
- pre_commit | ||
- cmweather | ||
- pip | ||
- pip: | ||
- pooch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. _xradar_examples: | ||
|
||
Xradar Examples | ||
------------------ | ||
|
||
Examples of using Xradar with Py-ART to accomplish different tasks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
================================== | ||
Plot a PPI Using Xradar and Py-ART | ||
================================== | ||
An example which uses xradar andd Py-ART to create a PPI plot of a Cfradial file. | ||
""" | ||
|
||
# Author: Max Grover ([email protected]) | ||
# 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 = pyart.xradar.Xradar(tree) | ||
|
||
# Plot the Reflectivity Field (corrected_reflectivity_horizontal) | ||
display = pyart.graph.RadarMapDisplay(radar) | ||
display.plot_ppi( | ||
"corrected_reflectivity_horizontal", cmap="ChaseSpectral", vmin=-20, vmax=70 | ||
) |