0

I want to draw a relief of some region (sea and land involved), but I DO NOT want to show the variation of marine bathymetry, so I must set them to a common negative value to make sure that all the bathymetry map to the same color, like lightblue. I don't know how to do it?

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161
Jun Zhu
  • 13
  • 4

1 Answers1

1

That's easy using grdclip. When using command line GMT you can try:

gmt grdclip grid -Ggrid_clipped -Sb0/-1000 -V

which sets all values of your input grid grid< 0 to -1000 (adjust the values for your needs) and writes the clipped grid to outfile grid_clipped.

If you're using PyGMT you can try:

import pygmt 

grid = pygmt.grdclip(grid, below = [0, -1000])

where you can directly hand the clipped grid to another PyGMT function for plotting like fig.grdimage(grid = grid).

mgrund
  • 1,415
  • 8
  • 10