#/bin/csh

#makecpt -Cwysiwyg -T-500/800/100 >! bathy.cpt

grdimage GMRTv3_7_20200219topo.grd -R-75/-69.5/40/42.5 -JM7i -Cbathy.cpt -P -K >! bathy.ps
pscoast -Df -J -R -W1,white -O -K >> bathy.ps
psxy -: latlon.txt -R -J -Sc0.05i -O -K >> bathy.ps

convert -background transparent -trim -density 300 bathy.ps plot_0.jpg


foreach depth (2 4 6 8 10 12 14 16 18 20 30 40 50 60 70 80)
#foreach depth (20)
	grdmath GMRTv3_7_20200219topo.grd $depth SUB = bathy.grd

	grdimage bathy.grd -R-75/-69.5/40/42.5 -JM7i -Cbathy.cpt -P -K >! bathy.ps
	pscoast -Df -J -R -W1,white -O -K >> bathy.ps
	psxy -: latlon.txt -R -J -Sc0.05i -O -K >> bathy.ps
	awk 'BEGIN {print -70, 41, 28, 0, 5, "Br", '$depth' " meters"}' /dev/null >! text.txt 
	pstext text.txt -J -R -O -K >> bathy.ps

	convert -background transparent -trim -density 300 bathy.ps plot_$depth.jpg

end
