#/bin/csh!
gmtset ANOT_FONT_SIZE 20
gmtset HEADER_FONT_SIZE 15
gmtset LABEL_FONT_SIZE 20
# ./areamean_map.csh
######################

set mm=12 # 03 or 12

if($mm == "03")then
set mon=Mar
endif
if($mm == "12")then
set mon=Dec
endif


set psfile=tmp.ps
#set pdf=Flight_map.level.2007{$mm}all.pdf
set pdf=Flight_map.level.2007{$mm}04a.pdf
#set range=138.5/139.5/37/38
set range=138.6/139.2/36.7/37.3
#set scale=A138.5/90/12
set scale=m25
set fontsize=25
set fontsize1=15
set fonttipe=1
set fonttipe1=7
set w=20/255/0/0
set col1=0/0/200
set col2=0/255/0
set cpt=cpt.height.dat
set cpt2=cpt.globe.dat
########################

(海岸地形を描く)
pscoast -J$scale -R$range -W1 -Df -A1000 -Y7 -X3 -K -P -V >! $psfile

(地形図データの編集)
xyz2grd map.niigata.dat -Getopo2.grd -I.012/.012 -R -V
makecpt -Cglobe -T-2000/2000/100 > $cpt2
grdimage etopo2.grd -C$cpt2 -J$scale -R$range -P -O -K -V >> $psfile

(標高のスケールをプロット)
psscale -C$cpt2 -D3c/-2c/5c/0.25ch -B2000:Topography:/:m: -P -O -K -V >> $psfile
(県境データをプロット)
psxy ken.txt -J$scale -R$range -Ba0.2f0.2:"":/a0.2f.2:."":NEWS -W2ta -M -P -O -K -V >> $psfile


if($mm == "03")then
foreach area (05a 06a 07a 08a 11a 12a 12c 13b 15b)
set kouseki=/data0/ohtake/GMT/aircraft/07$mm$area.position.GMT.txt
endif
if($mm == "12")then
#foreach area (02a 04a 05a 09a 09b 10a 14a 16a 17a 18a 19a 20a)
#foreach area (04a 05a 09a 09b 10a 14a 16a 17a 18a 19a 20a)
foreach area (04a)
set kouseki=/data0/ohtake/GMT/aircraft/07$mm$area.position.GMT.txt
endif

set kouseki1=tmp

awk '{print" "$2" "$3" "$4}' $kouseki > $kouseki1
psxy $kouseki1 -J$scale -R$range -Sc0.05 -C$cpt -V -L -O -K >> $psfile
end

(観測エリアをドットでプロット)
# site
psxy toukamachi.v2.dat -J$scale -R$range -Sc0.1 -P -G$col1 -O -K >> $psfile
psxy senjyoji.v2.dat -J$scale -R$range -Sc0.1 -P -G$col1 -O -K >> $psfile
psxy shimizu.v2.dat -J$scale -R$range -Sc0.1 -P -G$col1 -O -K >> $psfile
psxy south.v2.dat -J$scale -R$range -Sc0.1 -P -G$col1 -O -K >> $psfile

(下部にスケールの表示)
psscale -C$cpt -D10c/-2c/7c/0.25ch -B1000:Flight_Level:/:m: -X2 -O -K -P >> $psfile

(タイトルを挿入)
echo "1.7 9.5 25 0 5 5 04a $mon 2007 (ver.2)"|pstext -JX16/16 -R0/10/0/10 -Y6 -O -P >> $psfile

(PDFへ変換)
ps2pdf14 $psfile $pdf
#rm -f $psfile

(作図後に図を表示)
acroread $pdf


出来上がりの図





モドリマスカ?