Hello GMT gurus,
I’m running GMT on MacOS 10.14:
gmt psxy [core] 6.1.0_8580087_2020.02.15 [64-bit] - Plot lines, polygons, and symbols in 2-D
I am attempting to plot a polygon that encompasses the South Pole in an orthographic projection and having a little trouble getting GMT to do this for me. Here’s an extract of the relevant code:
psbasemap -Rg -JG150/10/10 -B+gslategray1 -X2 -Y2 -P -K > $output psxy $icesheets -R -J -G$iceblue -fg -A -O -P >> $output
Running this script fails with the following error:
psxy(72558,0x109e8b5c0) malloc: *** error for object 0x7fadf8000000: pointer being freed was not allocated psxy(72558,0x109e8b5c0) malloc: *** set a breakpoint in malloc_error_break to debug lgmpoly_ortho.gmt: line 55: 72558 Abort trap: 6 psxy $icesheets -R -J -G$iceblue -fg -A -O -P -K >> $output
The offending GMT multisegment polygon file, “$icesheets” in my script, can be downloaded here (15 Mb).
Thinking that the problem could be with having a polygon that covers the pole, I also tried splitting the polygon up into 10x10 degree blocks. The plotting still fails, but now with a different error:
Assertion failed: ((fabs(A) > 5 * DBL_EPSILON) || (fabs(B) > 5 * DBL_EPSILON)), function doubleAlmostEqualUlps, file /Users/jkaplan/Downloads/gmt/gmt/src/common_math.c, line 208. lgmpoly_ortho.gmt: line 56: 72593 Abort trap: 6 psxy $icesheets -R -J -G$iceblue -fg -A -O -P -K >> $output
Any ideas you might have to solve this problem would be much appreciated
Thanks in advance for your help!