psyplot / psy-maps

The psyplot plugin for visualizations on a map
https://psyplot.github.io/psy-maps
8 stars 5 forks source link

Problem in displaying dateline crossing for rotated coordinates #11

Closed Casthardi closed 4 years ago

Casthardi commented 4 years ago

In these cases the whole earth (in longitudinal direction) is displayed.

CORDEX-North-America CORDEX-Australasia

and the related data files CORDEX-data.zip It should be like e.g. the European region, i.e. only the necessary part should be displayed:

CORDEX-Europe
Chilipp commented 4 years ago

Hey @Casthardi! Thank you for this! Yes, it's due to the default behaviour of the map_extent keyword (which is why I transferred this issue to the psy-maps repository). I determine the map_extent by the longitude-latitude box of the data and for something like this, the minimum longitude is -180, and the maximum is 180.

I'll fixed this with #12, although it is still not perfect, though. When using a standard cylindric projection (i.e. projection='cyl'), this creates a plot like this

image

which is of course not, what you want to see. You need to manually set the central longitude to 180 (i.e. clon=180 or in psy-view through the basemap dialog). Then you get something like this:

image

Chilipp commented 4 years ago

For the CF-encoded rotated pole projection, however, this is fixed by #12 as clon is here in principle set through the CF-conventions' grid_mapping variable.