-
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 cfradial2 read example (#1700)
* FIX: Fix the gallery build issue with new sphinx * ENH: Improve compatibility of xradar integration with cfradial2 * ADD: Add cfradial2 example * FIX: Fix change of nbsphinx * FIX: Fix the io portion of the cfradial2 examples * FIX: Fix the io portion of the cfradial2 examples
- Loading branch information
Showing
3 changed files
with
101 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
========================================================== | ||
Read and Plot Cfradial2/FM301 data Using Xradar and Py-ART | ||
========================================================== | ||
An example which uses xradar and Py-ART to read and plot Cfradial2/FM301 data. | ||
""" | ||
|
||
# Author: Max Grover ([email protected]) | ||
# License: BSD 3 clause | ||
|
||
|
||
import xarray as xr | ||
from open_radar_data import DATASETS | ||
|
||
import pyart | ||
|
||
# Locate the test data and read in using xradar | ||
filename = DATASETS.fetch("cfrad2.20080604_002217_000_SPOL_v36_SUR.nc") | ||
tree = xr.open_datatree(filename) | ||
|
||
# Give the tree Py-ART radar methods | ||
radar = tree.pyart.to_radar() | ||
|
||
# Plot the Reflectivity Field (corrected_reflectivity_horizontal) | ||
display = pyart.graph.RadarMapDisplay(radar) | ||
display.plot_ppi("DBZ", cmap="pyart_ChaseSpectral", vmin=-20, vmax=70) |
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
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