Triggered by GenericMappingTools/GMT.jl#1723
This works well
G = gmtread("@earth_relief_20m_p", R=:d)
grdcut(G,R="0/140/-90/0")
but this crashes
grdcut(G,R="1/140/-90/0")
The reason lies on what happens in gmt_grdio.c/gmt_grd_shift() (Why calling grdcut involves a grid shift?) and gmt_api.c/gmtapi_expand_headerpad() following a logic that I couldn't understand but the end result was that grid's header was assign very wrong pad and header.mx values.