superposition of two grid files 2D  - 2種類のデータを重ねて表示(2次元)

  使うコマンド  makecpt, grdimage, grdcontour, psbasemap



bash スクリプト例
#
#   superposition of two grid files  2D
#
cntgrdfile=izu.altbathy.grd    #grid data for contouring
imggrdfile=izu.mag.grd    # grid data for grdimage (color)
region=140/145/27/30      # map region
proj=M10                    # projection and scale
ticks=f1a1g1            # tick info
frame=WSne              # frame info
scale_loc=5/-1/8/0.3h   # location of color scale
cptfile=mag_grad.cpt    # color table file
climit=-400/400/100     # color table limit
cint=500                # contour interval
aint=2000               # annotated contour interval
limit=-100000/-500      # min/max contours
psfile=izu.mag+topo.2D.ps        # output postscript file
#
# making color table
gmt makecpt -Crainbow -T$climit -V -Z > $cptfile
#
# plot
gmt grdimage $imggrdfile -R$region -J$proj -C$cptfile -K -V > $psfile
gmt grdcontour $cntgrdfile -R$region -J$proj -C$cint -A$aint -L$limit -K -O -Wthinnest,black >> $psfile
gmt psscale -D$scale_loc -C$cptfile -K -O  >> $psfile
gmt pscoast -R$region -J$proj -Di -Ggray -Wthin,black -K -V -O >> $psfile
gmt psbasemap -R$region -J$proj -B$ticks -B$frame -O  -V >> $psfile
#



Tips