Open jhamman opened 8 years ago
I get the same warnings (and eventually errors) using non-polar (non-wrapped) coordinates. Warnings/Errors appear with cartopy 0.14.2 whereas everything works fine with version 0.12.
Those warnings/errors look like #883, so your case might be fixed by #885?
I get the very same error message when I try to plot a contour onto a rotated lat/lon-grid. I tried to apply the fix in #885, but that did not help.
The error occurs for path_codes == [1, 2, 2, 79]
. In this particular case, we have three segments plus Path.CLOSEPOLY
, which means we try to create the polygon from three instead of four segments. That means, if the last code is Path.CLOSEPOLY
we need at least five segments.
Possibly solved by #1021. There have been a number of enhancements to the geometry transformation pipeline recently, so correct input is far more likely to produce correct output at this point. If this is not solved on master (I'm unable to reproduce to check your data), please could you re-open the issue and add a self-contained example?
Thanks!
Please re-open, as this issue has not been resolved for my example below (using Cartopy 0.17)
Example notebook: https://github.com/lvankampenhout/stackoverflow-rotatedpole/blob/master/Minimum%20example.ipynb
Example data: http://www.staff.science.uu.nl/~kampe004/files/snow_rlat_rlon.nc
PS. workaround here: https://stackoverflow.com/questions/55062406/cartopy-fails-to-correctly-contour-data-on-rotated-grid
For me it looks like issue #1076 So I think the work around presented in #1421 should work. It very much seem to be an issue of overlapping cells crashing the contouring.
I'm trying to plot some raster data using Cartopy in a polar projection. I'd like to use a contour plot but it seems cartopy isn't able to handle wrapped coordinates. I'm wondering if there is a work around for this behavior.
The unprojected data looks like this:
(for the untrained eye, the north pole is in the center of the plot, Europe in the top right)
The projected plot has all sorts of problems with wrapping the longitudes
Returns these errors (warnings actually).
Just to confirm, no problem the raster data using pcolormesh