[caption id="" align="alignleft" width="240" caption="Topography map of Tibet"]
[/caption]后来重新搜了一下,改用 UC San Diego 的 Smith & Sandwell[1. Smith, W. H. F., and D. T. Sandwell, Global seafloor topography from satellite altimetry and ship depth soundings, Science, v. 277, p. 1957-1962, 26 Sept., 1997.] 的全球地形数据集。之后就是不断地看各个命令的 man page,以及 GMT Cookbook 还有邮件列表和各种网站上的资料,并攻克了诸如调节调色板对应高度范围等种种难题。在这过程中我发现 GMT 虽然学习曲线相当陡峭,但并不是阳春白雪,许多大学的制图课都将其作为重要的内容。
绘图用的脚本如下:
#/bin/bash
# prepare the surface
# data downloaded from ftp://topex.ucsd.edu/pub/global_topo_1min/
img2grd ~/images/global_topo_1min/topo_11.1.img -T1 -S1 -R70/105/25/40 -m1 -D -Gtopo.nc -V
mv topo.nc ~/Desktop/thesis/auxillary/topo.nc
# land is a home-made cpt derived from GMT_relief.cpt
makecpt -Cland -T-1000/9000/1000 -Z -V > topo.cpt
# Relieves
grdgradient ~/Desktop/thesis/auxillary/topo.nc -Ne1 -A100 -M -Glight.nc
#basemap
grdimage ~/Desktop/thesis/auxillary/topo.nc -Ilight.nc -Ctopo.cpt -Jm87.5/32.5/0.6c -Bpa600mg600m -R70/105/25/40 -K > ~/Desktop/thesis/images/topography.ps
pscoast -Bpa600mg600mf300m -J -R -I2 -N1/thick -W -Lf77/27/33/1000 -Tf102/37/1.5c -O -K >> ~/Desktop/thesis/images/topography.ps
psxy ~/Desktop/thesis/auxillary/boundary.xy -O -J -R -Sc0.03c -Gblack -K >> ~/Desktop/thesis/images/topography.ps
# annotations
pstext -O -J -R -K >> ~/Desktop/thesis/images/topography.ps < 75 29 18 0 1 LM @#India@%%
80 39 16 0 21 LM XUAR
84 33 16 0 21 LM TAR
93 37 16 0 21 LM Qinghai
100 30 16 0 21 LM Sichuan
END
pstext -O -J -R -Wwhite,Othinnest,white -K >> ~/Desktop/thesis/images/topography.ps < 88 37 14 0 5 LM [1]
92 33 14 0 5 LM [2]
89 30 14 0 5 LM [3]
100 29 14 0 5 LM [4]
END
# [1]: Kunlung Mt.
# [2]: Tangula Mt.
# [3]: Niangqen-Tanglha Mt.
# [4]: Hengduan Mt.
# making and drawing contours
grdcontour ~/Desktop/thesis/auxillary/topo.nc -Jm87.5/32.5/0.6c -Q10000 -L-1000/9000 -C500 -O -K >> ~/Desktop/thesis/images/topography.ps
psscale -D20c/4.5c/9c/1c -Ctopo.cpt -Bp2000:@Topography:/:m: -O >> ~/Desktop/thesis/images/topography.ps
# convert format
ps2raster ../images/topography.ps -Tg -P -A
# clean up
rm topo.cpt
rm light.nc
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=cd7d27c6-8e76-4a22-935f-1ceae3796451)


![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=37b35229-5d23-4f9c-87a3-41b38ccbbeb1)
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=48082f22-6458-467e-b6b3-c6068f9558b0)