noaa-oar-arl / monet

The Model and ObservatioN Evaluation Toolkit (MONET)
https://monet-arl.readthedocs.io
Other
45 stars 21 forks source link

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

Closed zmoon closed 1 year ago

zmoon commented 1 year ago

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 commented 1 year ago

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