Skip to content
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

Max cappi #1627

Closed
wants to merge 12 commits into from
Closed

Max cappi #1627

wants to merge 12 commits into from

Conversation

syedhamidali
Copy link
Contributor

@syedhamidali syedhamidali commented Aug 29, 2024

So, I have added the plot_maxcappi function to the gridmapdisplay, here is what it is supposed to do

import pyart

grid = pyart.io.read_grid("GRID_KGRR20240119_163853_V06.nc")
display = pyart.graph.GridMapDisplay(grid)

display.plot_maxcappi('reflectivity', vmin=0, vmax=60, add_slogan=True)

image

@syedhamidali
Copy link
Contributor Author

@mgrover1 Could you please take a look at these conflicts? I'm not quite sure how to resolve them.

@mgrover1
Copy link
Collaborator

Sure! I can take a look here - thanks for putting this together 👍

@mgrover1
Copy link
Collaborator

@syedhamidali - this should resolve the merge conflicts 👍

@syedhamidali
Copy link
Contributor Author

@mgrover1 Thank you!

@syedhamidali
Copy link
Contributor Author

@mgrover1 I'm unsure if these CI errors relate to my commits. Could you help clarify?

Copy link
Collaborator

@mgrover1 mgrover1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are a few suggestions - this should help resolving some of the failing tests

radar = pyart.io.read_nexrad_archive("s3://" + file)

# Create a 3D grid
# mask out last 10 gates of each ray, this removes the "ring" around the radar.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# mask out last 10 gates of each ray, this removes the "ring" around the radar.
# Mask out last 10 gates of each ray, this removes the "ring" around the radar.

# mask out last 10 gates of each ray, this removes the "ring" around the radar.
radar.fields["reflectivity"]["data"][:, -10:] = np.ma.masked

# exclude masked gates from the gridding
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# exclude masked gates from the gridding
# Exclude masked gates from the gridding

gatefilter.exclude_masked("reflectivity")
gatefilter.exclude_outside("reflectivity", 10, 80)

# perform Cartesian mapping, limit to the reflectivity field.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# perform Cartesian mapping, limit to the reflectivity field.
# Perform Cartesian mapping, limit to the reflectivity field.

ds.lon.encoding["_FillValue"] = None

# Grab original radar(s) name and number of radars used to make grid
ds.attrs["nradar"] = self.nradar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syedhamidali - you are removing nradar here within the attributes which is causing tests to fail

@syedhamidali syedhamidali deleted the max-cappi-test branch August 29, 2024 21:41
@syedhamidali syedhamidali restored the max-cappi-test branch August 29, 2024 21:41
@syedhamidali syedhamidali deleted the max-cappi-test branch August 29, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Constant Altitude Plan Position Indicator (CAPPI)
3 participants