-
Notifications
You must be signed in to change notification settings - Fork 10
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
cfplot can't cope with southern hemisphere rotated pole data, or else nzlam orog is broken #86
Comments
So, I think the problem is that in this case the auxiliary coordinates are being ignored. The problems arise, I think, in method Line 1543 in 0f57800
we go into the rotated pole loop where ptype is set to 6. The grid_latitude and grid_longitude are read.
I guess there are theoretically two ways forward possible, if you know your rotated coordinates, then you just ignore these and plot nice rectangular grids, and then draw the coordinates on afterwards, or, if you have auxillary coordinates, you can use those. These files have auxillary coordinates, but the next step in the code is: Lines 1568 to 1573 in 0f57800
and it's clear we are ignoring the auxillary coordinates (because |
OK, continuing. At this point we have Lines 1547 to 1548 in 0f57800
That's kind of interesting, given the NZ region is
(those being the real coordinates of interest) and so we're on the anti-polar side of that ... but the CORDEX domain is similar with pole at (321.38, -60.31). I am slightly suspicious that the cordex pole is the anti-pole of the one defined here, and so that might lead to the problems here. I vaguely remember a definitions problem which was previously solved by
that ended up as a Cartopy issue: SciTools/cartopy#2091 |
Sadly, I don't think that's the problem here. |
So, continuing the detective work (which I am recording in bits because I don't get long on this in any given chunk of time): The next interesting bit of code which is executed for # Extract x and y grid points
if plotvars.proj == 'cyl':
xpts = x
ypts = y
else:
xpts = np.arange(np.size(x))
ypts = np.arange(np.size(y)) which feels wrong, insofar as what this will do is expect to plot something which is rectangular in I can also confirm that the same problem exists with another orography file from a northern hemisphere file so it seems like the capability itself is broken. |
Grenville provided me with a datafile, which I can't upload here, but it's small. I'll send it to you via slack.
The surface altitude should be easily plotted using the standard methods, but it creates garbage.
Either the data is not reporting the coordinates correctly, or cf-plot can't quite cope with this situation.
MWE:
with or without the mapset it's garbage.
The text was updated successfully, but these errors were encountered: