making masked grid file - 元データのないところをマスクする   

  使うコマンド  grdmask, grdmath



bash スクリプト例
#  make grid file from xyz files using surface and grdmask

# parameter setting
region=137:40/137:55/16:40/17           # grid region east/west/south/north
interval=0.04m                          # grid interval
tension=0.65                             # tension factor
radius=1k                               # search radius
xyzfile=area.xyz                        # input xyz file
blkfile=area.blk                        # block file
grdfile=area.grd                    # output grid file
maskfile=area.mask.grd              # mask file
maskedfile=area_masked.grd          # final masked grid
#
gmt blockmedian $xyzfile -R$region -I$interval -V > $blkfile
gmt surface $blkfile -R$region -I$interval -T$tension -G$grdfile -fg -V
gmt grdmask $blkfile -R$region -I$interval -NNaN/1/1 -S$radius -G$maskfile -V
gmt grdmath $grdfile $maskfile OR = $maskedfile
#


Tips