You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue 1: globe=True does not work with raw xarray objects. Perhaps this could be mitigated by passing .values whenever you see a pandas/xarray object. We use an is_xarray decorator in climpred to detect xarray objects. Maybe something similar could be done here. Or maybe I should just live with passing .values with my xarray objects.
ValueError: dimensions () must have the same length as the number of data dimensions, ndim=1
Issue 2: globe=True seems to change the colorbar/data/land (?) creating the wrong map:
Thanks for posting this. The issue was that your latitudes are sorted north-to-south (descending) instead of south-to-north. I should have accounted for this possibility. Commit d1193ce fixes things; try the example again.
ProPlot doesn't just fix longitudinal seams, it also "interpolates" to the poles, i.e. adds vectors populated with the mean of the highest/lowest-latitude coordinate data to the top and bottom of the data array (see this docs page). This isn't so important for cylindrical projections but removes an ugly "hole" in your data when using polar projections. In this example, after the fix, the coordinates looked like [-90, 89, 88, ..., -88, -89, 90]. Which drew a contour patch extending over the whole map and covering the negative contours.
I also improved the gridfix wrappers by making sure they respect masked arrays/do not destroy the masks.
I'm trying to use
globe=True
on a 2D map, and it doesn't seem to wrap the data correctly.Here's a sample netCDF being used: http://s000.tinyupload.com/index.php?file_id=09194045931802153007 (I know this is bad practice, but this is the easiest way to reproduce it right now).
Okay, so we have the seam as expected:
Issue 1:
globe=True
does not work with raw xarray objects. Perhaps this could be mitigated by passing.values
whenever you see a pandas/xarray object. We use anis_xarray
decorator inclimpred
to detectxarray
objects. Maybe something similar could be done here. Or maybe I should just live with passing.values
with my xarray objects.Issue 2:
globe=True
seems to change the colorbar/data/land (?) creating the wrong map:If I just use the cartopy utility, I get the right map.
The text was updated successfully, but these errors were encountered: