I have a cartesian grid and want to plot it using the grdimage. I set the -fc to indicate it is a cartesian file. But some error still appears. I am not sure the reason. Is it a wrong use of GMT syntax?

#!/usr/bin/env bash

gmt grd2cpt > mss.cpt
gmt psbasemap -$J -BWNSE -Bxya100 -K -fc > $ps3
gmt grdimage -$J -Cmss.cpt -K -O -fc >> $ps3


psbasemap [ERROR]: Internal Error = GMT_MAP_EXCEEDS_360
psbasemap [ERROR]: Internal Error = i
psbasemap (GMT_psbasemap): Map region exceeds 360 degrees
grdimage [ERROR]: Internal Error = GMT_MAP_EXCEEDS_360
grdimage [ERROR]: Internal Error = i
grdimage (GMT_grdimage): Map region exceeds 360 degrees

Here is the file.

I use the GMT6.1.0 at MINGW64.

OK, the problem probably related to this

$ gmt grdinfo Title: z Command: grdsample -I30 Remark: Gridline node registration used [Cartesian grid] Grid file format: nf = GMT netCDF format (32-bit float), CF-1.7 x_min: 0 x_max: 348 x_inc: 29 name: x n_columns: 13 y_min: 0 y_max: 148.8 y_inc: 29.9707317073 name: longitude n_rows: 42

the Y units say it’s longitude and X is not latitude. So it likely something inside GMT gets confused.
A work around is to convert it into another grid format. For example this worked for me

gmt grdconvert jizailow.grd=sf

Ah, but your x_max, y_max or increment are all wrong. It says

y_min: 0 y_max: 148.8 y_inc: 29.9707317073 name: longitude n_rows: 42

but 29.9707317073 * 42 = 1258.77
which is off course > 360

That is the point. The nc file has it problem.
I will check the nc creating code.

After I change the name of Y not to be Longitude. It works with GMT. So, it is better not use these geographic names in cartesian grid file.