Coloration of grdimage earthrelief in different outputs

Hi,
I’ve been making images of earth’s topography through :

gmt grdimage @earth_relief_15s -I+d -Rxxx/xxx/xx/xx -JM

The problem is that I noticed the color used in one image is different from another for same/similar depth. For instance, the bottom of: gmt grdimage @earth_relief_15s -I+d -R121/123/30/32 -JM5c
does not match with the top of: gmt grdimage @earth_relief_15s -I+d -R121/123/28/30 -JM5c.

I guess this is because when gmt reads cpt file of each area, it gives colors to z values based on the range of z value in the area. What do I need to do to make every image to have the same color designated to the same z value? I need to produce separate images for each area.

Make a cpt with makecpt or grd2cpt and use that with grdimage; grdimage -Ccolor.cpt […]

1 Like

I used -Cglobe but they are still not matching, will makecpt be different?

I think gmt will adjust the cpt according to the z-range, you mentioned. Creating a cpt with e.g. gmt makecpt -Cglobe -Tmin/max/inc will create a cpt that will not change.

Of course. makecpt makes a cpt that is used for your region, but requires you use -T to set what range you want for all areas. Without -T it probably gives the same as you got (auto-scaling).

Thanks a lot lads, solved my problem(partly). Now I found that at certain area, gmt is not downloading the @earth_relief_15s file but directly showing me the image. The problem is those images are way more detailed than the rest of the images. How can I stop it from doing so?

GMT cannot just display an image without downloading first to your ~/.gmt/server area. Not sure what you mean and what a “certain area” might be. What do you mean by more detailed? If you ask for 15s then that is what you get anywhere. Unless you have a tiny area I would pic something cruder like 01m.

As you can see in this image, the west 3 images and bottom 1 image are clearly having different clarity than the rest.

The code I been using is:
gmt makecpt -Cgmt/etopo1 -T-8000/8000
gmt grdimage @earth_relief_15s -I+d -R107/109/04/06 -JM5c

For different images I only varied the -R option.

Well, read about grdgradient and what grdimage -I+d does when you do it piecemeal. Not good to have different intensity calculations since it shows up at your bound

Great, thanks a lot!