-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: Add cfradial2 read example #1700
Merged
+103
−4
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2832335
FIX: Fix the gallery build issue with new sphinx
mgrover1 bfa4d4e
Merge branch 'main' of https://github.com/mgrover1/pyart
mgrover1 b06eb5b
ENH: Improve compatibility of xradar integration with cfradial2
mgrover1 564e81b
ADD: Add cfradial2 example
mgrover1 22b0805
FIX: Fix change of nbsphinx
mgrover1 f7b6199
FIX: Fix the io portion of the cfradial2 examples
mgrover1 b5330fd
FIX: Fix the io portion of the cfradial2 examples
mgrover1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading status checks…
ADD: Add cfradial2 example
commit 564e81b3aee43c1e178d41f9beb5c4ef1fed1413
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 (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("cfrad2.20080604_002217_000_SPOL_v36_SUR.nc") | ||
tree = xd.io.open_cfradial1_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) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be cfradial2? Or does xradar handle both for that datatree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it in the example - we can use xarray open datatree directly!