These are chat archives for SHTOOLS/SHTOOLS

Sep 2016
Mark Wieczorek
Sep 22 2016 08:13
I am getting a crash which appears to be OSX specific. Its been known for over a year and I haven't been able to find a solution (though I haven't looked too hard either). For info, here's what happens:
In [3]: ax.coastlines()
Out[3]: <cartopy.mpl.feature_artist.FeatureArtist at 0x1148419e8>

In [4]: Assertion failed: (0 != cs), function GEOSCoordSeq_getSize_r, file geos_ts_c.cpp, line 3797.
Elliott Sales de Andrade
Sep 22 2016 08:19
oh, the broken geos thing; it's a bug with the installed shapely
maybe installed from a binary wheel that wasn't compiled against the version you have installed?
Mark Wieczorek
Sep 22 2016 08:38
I'm using the pip installer for shapely. I just tried uninstalling and reinstalling and I got the same error.
Elliott Sales de Andrade
Sep 22 2016 08:57
try pip install --no-binary to avoid the wheel
Mark Wieczorek
Sep 22 2016 12:33
This works! thanks. I'll try to put the somewhere on their wiki or something.
pip3 install shapely --no-binary :all:
Mark Wieczorek
Sep 22 2016 15:43

I don't suppose that you know how to make a projected image that interpolates between points?

ax.imshow(, transform=ccrs.PlateCarree())

seems to project each individual pixel, which is probably what you'd want for images, but not for our spherical harmonic transforms which use the value only at the grid node.

Sep 22 2016 16:56
I know how to do this with basemap :)
I found, that the safest way with basemap is to:
  1. make a cartesian grid that contains the lat/lon values of each pixel of the map
  2. search for the corresponding lat/lon value in the gridded data using the interpolator of choice
This works for all projections, deals with longitude wrapping etc...
don't know if this works well with cartopy
@MarkWieczorek , can you check #61 change what you want and merge? It is out quite long for such a small issue.
Elliott Sales de Andrade
Sep 22 2016 20:10
There's an interpolation option to imshow; I'm not sure how well it works in a transformed space like that
also might want to try contourf with a suitable number of levels
Mark Wieczorek
Sep 22 2016 21:15
I tried the interpolation parameter, but it didn't have any effect.
@MMesch I will get to this as soon as possible. I have a thesis defense to go to on wednesday, and a review and letter of recommendation that needs to be done beforehand. After wednesday, I should have time. Maybe before if I procrastinate on these other things....