aofd165.bio.mie-u.ac.jp
/work1/am/2016.Atmospheric.Data.Ornithology
Tue Jun 14 14:27:03 JST 2016
======================
MSM_T.snapshot.up.gs
======================
function msm( args )
*
* Default values
*
indir='/work4/data/MSM/MSM-S/2016'
input='0501.nc'
lonw=129 ;#120
lone=133 ;#150
lats=31 ;#22.4
latn=34 ;#47.6
out='msm.snapshot.test.eps'
quitopt='no'
#lev=1000
ci=20
var='temp'
'set rgb 100 153 76 0'
*
* Decode options
*
i = 1
while( 1 )
arg = subwrd( args, i )
i = i + 1;
if( arg = '' ); break; endif
while( 1 )
if( arg = '-indir');indir = subwrd(args,i);i=i+1; break;endif
if( arg = '-input');input = subwrd(args,i);i=i+1; break;endif
if( arg = '-var' ) ; var = subwrd(args,i);i=i+1; break;endif
if( arg = '-lonw' ); lonw = subwrd(args,i);i=i+1; break;endif
if( arg = '-lone' ); lone = subwrd(args,i);i=i+1; break;endif
if( arg = '-lats' ); lats = subwrd(args,i);i=i+1; break;endif
if( arg = '-latn' ); latn = subwrd(args,i);i=i+1; break;endif
if( arg = '-t1' ); t1 = subwrd(args,i) ;i=i+1; break;endif
if( arg = '-ci' ); ci = subwrd(args,i) ;i=i+1; break;endif
if( arg = '-outdir' ); outdir = subwrd(args,i) ;i=i+1;break;endif
if( arg = '-out' ); out = subwrd(args,i) ;i=i+1;break;endif
if( arg = '-q' ); quitopt=yes ;i=i+1; break; endif
say 'Syntax error : arg= 'arg
return
endwhile
endwhile
'sdfopen 'indir'/'input
#'q ctlinfo'
#say result
#'set lev 'lev ;#/100
'set t 't1
#'q file'
#say result
'q dims'
#say result
line=sublin(result,5)
datetime=subwrd(line,6)
#line=sublin(result,4)
#pdb=subwrd(line,6)
pha=lev
say pha
'cc'
xmin=1; xmax=6
ymin=2; ymax=9
'set parea ' xmin ' ' xmax ' ' ymin ' ' ymax
'set lon 'lonw' 'lone
'set lat 'lats' 'latn
'set mpdset hires'
'set map 1 1 7'
'set xlopts 1 5 0.2'
'set ylopts 1 5 0.2'
'set grid off'
### Color shade
'set gxout shade2'
#'w=-w/11.769' ;# 11.769=rho*g
wmin=-6 ;*-0.25 ;*-0.05
wmax=10 ;*0.25 ;*0.05
wint=2 ;*0.05 ;*0.01
'color ' wmin ' ' wmax ' ' wint ' -kind rainbow'
tc'=temp-273'
'set xlab off'
'set ylab off'
'd 'tc
'xcbar 6.5 6.6 3 8'
### contour
'set gxout contour'
'set ccolor 0'
'set cthick 2'
'set cint 'ci
'set clab off'
'set xlab off'
'set ylab off'
'd 'tc
### vector
'set gxout vector'
'set arrscl .5 30'
'set ccolor 0'
'set cthick 7'
'set xlab off'
'set ylab off'
'd skip(u,1,1);skip(v,1,1)'
'set ccolor 1'
'set cthick 1'
'set xlab on'
'set ylab on'
'set xlint 1'
'set ylint 1'
'set arrscl .5 30'
'd skip(u,1,1);skip(v,1,1)'
# Text
'set strsiz 0.10 0.15'
'set string 1 c 5 0'
'draw string 4.6 1.9 m/s'
'draw title 'datetime ' SFC'
'gxprint 'outdir '/' out
if ( quitopt = "yes" ); quit; endif
return
----------------------
End of MSM_T.snapshot.up.gs
----------------------
======================
MSM_T.snapshot.up.run.sh
======================
#!/bin/sh
exe=MSM_T.snapshot.up.gs
if [ ! -f $exe ]; then
echo Error in $0 : No such file, $exe
exit 1
fi
# Parameters
indir=/work4/data/MSM/MSM-S/2015
input=0101.nc
prefix=MSM #MandA2012Leg3
outdir="Fig"
#lev=1000 #950 # Vertical Level
lonw=129.5 #129 #120
lone=131.5 #132 #150
lats=32 #31 #22.4
latn=34 #34 #47.6
opt="-lonw $lonw -lone $lone -lats $lats -latn $latn"
var=T #ept #theta
ci=1 #Contour Interval
it=1
nt=1 #8
while [ $it -le $nt ]; do
out=${prefix}_${var}_SFC_$(printf %02d $it).UP.eps
grads -bcp "$exe -indir $indir -input $input $opt -t1 $it -var ${var} \
-ci $ci -outdir $outdir -out $out -q"
it=$(expr $it + 1 )
done
exit 0
----------------------
End of MSM_T.snapshot.up.run.sh
----------------------