色は渦度,実線は温位 [K]
GSM.PT.vort.run.sh
#!/bin/sh
dataset=GSM
var=PT.vort
exe=${dataset}.${var}.gs
if [ ! -f $exe ]; then
echo Error in $0 : No such file, $exe
exit 1
fi
yyyy=2011
mm=05
dd=23
hh=00
# Parameters
indir=/work1/am/Sato.Kodama.Manda2015/SYNOPTIC.ANALYSIS/GSM/Data.GrADS/output
input=GSM.2011052200.ctl
outdir=fig
mkdir -vp $outdir
prefix= #MandA2012Leg3
lev=500 # Vertical Level in hPa
opt="-indir $indir -input $input -outdir ${outdir}"
ci=3 #Contour Interval
it=4
nt=8
opt_grads=bcp
while [ $it -le $nt ]; do
grads -${opt_grads} "$exe $opt -t1 $it -lev $lev -var ${var} -ci $ci -q"
it=$(expr $it + 1 )
done
exit 0
GSM.PT.vort.gs
function gsm( args )
*
* Default values
*
indir='/work1/am/Sato.Kodama.Manda2015/SYNOPTIC.ANALYSIS/GSM/Data.GrADS/output'
input='GSM.2011052200.ctl'
outdir='.'
lonw=110; lone=155
lats=15; latn=52.0
out='GSM.2011052200.eps'
quitopt='no'
lev=500
ci=5
var='PT.vort'
scl=4
*
* 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 = '-outdir');outdir = 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 = '-lev' ); lev = 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 = '-q' ); quitopt=yes ;i=i+1; break;endif
say 'Syntax error : arg= 'arg
return
endwhile
endwhile
'open 'indir'/'input
#'q ctlinfo'
#say result
'set lev 'lev
'set t 't1
#'q file'
#say result
'q dims'
say result
line=sublin(result,5)
datetime=subwrd(line,6)
hh=substr(datetime,1,2)
dd=substr(datetime,4,2)
mmm=substr(datetime,6,3)
yyyy=substr(datetime,9,4)
line=sublin(result,4)
pha=subwrd(line,6)
say pha ' hPa'
'set lon 'lonw' 'lone
'set lat 'lats' 'latn
# 'set mproj lambert'
if (var = "ept" )
'es=6.1173*exp(((2.501*pow(10,6))/461.50)*(1/273.16 - 1/t))'
'ws=621.97*(es/(' pha '-es))'
'w=(rh*ws)/(100*1000)'
'ept=(t+((2.501*pow(10,6))/1004)*w)*pow((1000/' pha '),287/1004)'
'set clevs 315 318 321 324 327 330 333 336 339 342 345'
endif
'pt=t*pow((1000/' pha '),287/1004)'
'set parea 1 6 2 9'
'set xlopts 1 5 0.2'
'set ylopts 1 5 0.2'
'set xlint 10'
'set ylint 10'
'set gxout shade2'
### Vorticity
'color -2 2 0.5 -kind blue->deepskyblue->white->navajowhite->red'
'd hcurl(u,v)*pow(10,' scl ')'
'cbarn 1 1 6.5 5.5'
'set strsiz 0.18 0.2'
'set string 1 c 5 0'
'draw string 6.8 8.2 10`a-' scl '`ns`a-1`n'
### PT
'set gxout contour'
'set cint 5'
'set ccolor 0'
'set cthick 20'
'set clab off'
'set xlopts 1 0 0'
'set ylopts 1 0 0'
'd pt'
'set ccolor 1'
'set cint 5'
'set clab off'
'set cthick 5'
'set xlopts 1 0 0'
'set ylopts 1 0 0'
'd pt'
'set ccolor 1'
'set clopts 1 5 0.15'
'set clab on'
'set cint 10'
'set cthick 0'
'set xlopts 1 0 0'
'set ylopts 1 0 0'
'd pt'
'draw title ' hh '00UTC' dd''mmm''yyyy ' 'pha' hPa'
if ( mmm = JAN ); mm=01; endif
if ( mmm = FEB ); mm=02; endif
if ( mmm = MAR ); mm=03; endif
if ( mmm = APR ); mm=04; endif
if ( mmm = MAY ); mm=05; endif
if ( mmm = JUN ); mm=06; endif
if ( mmm = JUL ); mm=07; endif
if ( mmm = AUG ); mm=08; endif
if ( mmm = SEP ); mm=09; endif
if ( mmm = OCT ); mm=10; endif
if ( mmm = NOV ); mm=11; endif
if ( mmm = DEC ); mm=12; endif
out='GSM_' var '_' pha '_' yyyy '' mm '' dd '' hh '.eps'
'print ' outdir '/' out
if ( quitopt = "yes" ); quit; endif
return