gmt icon indicating copy to clipboard operation
gmt copied to clipboard

grdimage: No earth_relief_03s_g tiles available for your region.

Open anbj opened this issue 2 years ago • 7 comments

Auto resolution:

$ gmt grdimage -R-10/69/15/76r @earth_relief -Js0/90/1:5000000 -pdf test
gmt [WARNING]: gmt_get_dataset_tiles: No earth_relief_03s_g tiles available for your region.
grdimage [ERROR]: Passing zmax <= zmin prevents automatic CPT generation!
grdimage [ERROR]: Failed to read CPT (null).

(And after this I have to delete sessions):

$ gmt grdimage -R-10/69/15/76r @earth_relief_02m -Js0/90/1:5000000 -pdf test
gmt [ERROR]: Cannot run a one-liner modern command within an existing modern mode session

$ gmt clear sessions

Add explicit resolution and it works:

$ gmt grdimage -R-10/69/15/76r @earth_relief_02m -Js0/90/1:5000000 -pdf test

anbj avatar Apr 06 '22 14:04 anbj

Some more.

$ gmt grdimage -R-10/69/15/76r @earth_relief_01s.grd -Js0/90/1:5000000 -pdf test
gmt [WARNING]: gmt_get_dataset_tiles: No earth_relief_01s_g tiles available for your region.
grdimage [ERROR]: Passing zmax <= zmin prevents automatic CPT generation!
grdimage [ERROR]: Failed to read CPT (null).
$ gmt grdimage -R-10/69/15/76r @earth_relief_03s.grd -Js0/90/1:5000000 -pdf test
gmt [WARNING]: gmt_get_dataset_tiles: No earth_relief_03s_g tiles available for your region.
grdimage [ERROR]: Passing zmax <= zmin prevents automatic CPT generation!

I'm of course assuming that there are tiles available.

anbj avatar Apr 07 '22 06:04 anbj

The region is all >60N, so there are no 03s tiles available (The 3 and 1 arc second grids only extend to latitudes ±60˚ and are only available over land.). I agree that it would be better for the auto resolution to not pick 03s for unavailable regions. For the second example, perhaps the warning should actually be an error if it is likely to make subsequent commands fail.

maxrjones avatar Apr 07 '22 20:04 maxrjones

Ahhh. Slap me with a rtfm..

anbj avatar Apr 07 '22 20:04 anbj

... tldr?

gd-a avatar Apr 08 '22 02:04 gd-a

The region is all >60N, so there are no 03s tiles available (The 3 and 1 arc second grids only extend to latitudes ±60˚ and are only available over land.). I agree that it would be better for the auto resolution to not pick 03s for unavailable regions.

I think GMT should automatically switch to earth_relief_15s in this case.

seisman avatar Apr 08 '22 02:04 seisman

Yes, and maybe give a warning/notification about why.

anbj avatar Apr 08 '22 08:04 anbj

Interestingly, running

gmt grdcut -R-10/69/15/76r @earth_relief -Js0/90/1:5000000 -Gt.grd

works, and the output grid is basically a resampled 15s data down to 3s so it is 46146x9761 in size. I agree it does not make sense to sample from 15s to 3s unless we found 3s tiles, but this will require a special check somewhere.

Also interestingly, the grdimage command does crash as indicated above, so something is different between grdcut and grdimage. Will have to suit up and go into the debugger again.

PaulWessel avatar Apr 09 '22 21:04 PaulWessel