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

Fix .monet.quick_contourf e.g. for new RRFS domain #124

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

zmoon
Copy link
Member

@zmoon zmoon commented Mar 1, 2023

In this domain, part of the upper left quadrant crosses 180 deg. longitude. Within .monet.quick_contourf, wrap_longitudes (to [-180, 180)) is applied, which gives unhelpful contour results:

image

Masking that region, contourf has no problem:
image

Solution: unwrap longitudes (to [0, 360)) before plotting if they aren't monotonic. Note that this doesn't seem to be needed for the other quick plot methods, which use imshow and pcolormesh.

@zmoon zmoon changed the title Fix .monet.quick_contourf for e.g. new RRFS domain Fix .monet.quick_contourf e.g. for new RRFS domain Mar 1, 2023
@zmoon zmoon marked this pull request as ready for review March 1, 2023 20:14
@zmoon zmoon merged commit 0f8e543 into noaa-oar-arl:develop Mar 1, 2023
@zmoon zmoon deleted the fix/quick-plot-lon-wrap branch March 1, 2023 23:12
@zmoon
Copy link
Member Author

zmoon commented Mar 3, 2023

Note .monet.quick_map (pcolormesh) can still have wrap around issue:

Using default (+ states):

image

Supplying ax with projection that has central_longitude set accordingly:

image

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.

2 participants