Problems with plotting polar stereographic data, change from version 6.3 to 6.5

Hi!
I previously successfully plotted a netcdf grid given in polar stereographic coordinates together with coastlines for both Greenland and Antarctica with the following code:

gmt begin trend_gis
scale="1:20000000"
gmt grdimage GRAVIS-3_GIS_trend.nc?trend -Jx$scale  -Bswen+n
gmt coast -Js-45/90/70/$scale -A1000+ag -Di -W0.5,0 
gmt end show

gmt begin trend_ais
scale="1:30000000" 
gmt grdimage GRAVIS-3_AIS_trend.nc?trend -Jx$scale -Bswen+n
# plot groundingline in polarstereographic projection
gmt coast -Js0/-90/71/$scale -A1000+ag -Di -W0.5,0 -Swhite
gmt end show

This gave me the following warnings, but they worked fine:

coast [WARNING]: For a UTM or TM projection, your region -800000/950000/-3400000/-700000 is too large to be in degrees and thus assumed to be in meters
coast [WARNING]: For a UTM or TM projection, your region -2900000/2900000/-2400000/2400000 is too large to be in degrees and thus assumed to be in meters

trend_gis.pdf (48.1 KB)
trend_ais.pdf (78.5 KB)

This was on my old PC with GMT version 6.3.0. Now, with a new PC and GMT version 6.5.0 it is not working any more, and I get the following errors (for both the same):

coast [ERROR]: Map region exceeds 360 degrees
coast [ERROR]: General map projection error

Any idea how I can fix this? Of course I could downgrade to version 6.3 again, but this does not seem a permanent solution. I have to do this kind of plot quite often…

Thank you very much!
Best, Eva

Netcdf files here: Nextcloud

seems like you need to explicitly specify your region for coast, region autodetection using your data seems working:

gmt coast -RGRAVIS-3_GIS_trend.nc?trend -Js-45/90/70/$scale -A1000+ag -Di -W0.5,0

gmt 6.3 works both ways, 6.5 seems to require the explicit region specification shown above. I think I remember reading something about the GMT development team made improvements necessary to handle “data cubes”, including multi-variable netcdf files like yours, but I don’t remember any details. Maybe that was not directly related.

Thank you very much mkononets. You solved my problem :slight_smile: