aofd165.bio.mie-u.ac.jp
/work1/am/2016.Atmospheric.Data.Ornithology
Tue Jun 14 14:18:47 JST 2016
======================
NCEP_T.snapshot.gs
======================
function ncep2( args )
*
* Default values
*
ifu='NCEP.uwnd.10m.ctl'
ifv='NCEP.vwnd.10m.ctl'
ift='NCEP.air.2m.ctl'
lonw=122.0 ; lone=134 ;*lone=150
lats=24.5 ; latn=35 ;* latn=47.5
out='ncep.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 = '-ifu');ifu = subwrd(args,i);i=i+1; break;endif
if( arg = '-ifv');ifv = subwrd(args,i);i=i+1; break;endif
if( arg = '-ift');ift = 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 = '-time' ); time = 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
say 'Open 'ifu; 'open 'ifu
say 'Open 'ifv; 'open 'ifv
say 'Open 'ift; 'open 'ift
say
'q ctlinfo 1'
#say result
say
'q ctlinfo 2'
#say result
say
'q ctlinfo 3'
say result
#'set lev 'lev ;#/100
'set time 'time
'q dims 3'
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=7
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 2'
'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=-20 ;#-0.05
wmax=20 ;#0.05
wint=5;#0.01
'color ' wmin ' ' wmax ' ' wint ' -kind blue->white->red'
tc=air.3 '-273'
'set xlab off'
'set ylab off'
'set lev 2'
'd 'tc ;#w
'xcbar 7.6 7.7 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 ccolor 0'
'set cthick 10'
'set xlab off'
'set ylab off'
'set arrscl .5 50'
'set z 1'
'd skip(uwnd.1,1,1);skip(vwnd.2,1,1)'
'set ccolor 1'
'set cthick 1'
'set xlab on'
'set ylab on'
'set xlint 5'
'set ylint 5'
'set arrscl .5 50'
'd skip(uwnd.1,1,1);skip(vwnd.2,1,1)'
# Text
'set strsiz 0.10 0.15'
'set string 1 c 5 0'
'draw string 5.6 1.85 m/s'
'draw title 'datetime' SFC'
'gxprint 'outdir '/' out
if ( quitopt = "yes" ); quit; endif
return
----------------------
End of NCEP_T.snapshot.gs
----------------------
======================
NCEP_T.snapshot.run.sh
======================
#!/bin/sh
exe=NCEP_T.snapshot.gs
if [ ! -f $exe ]; then
echo Error in $0 : No such file, $exe
exit 1
fi
# Parameters
ifu='NCEP.uwnd.10m.ctl'
ifv='NCEP.vwnd.10m.ctl'
ift='NCEP.air.2m.ctl'
prefix=NCEP2_T
outdir="Fig"
#lev=1000 #950 # Vertical Level
lonw=120
lone=150
lats=22.4
latn=47.6
ci=5 #Contour Interval
opt="-lonw $lonw -lone $lone -lats $lats -latn $latn -ci $ci"
var=temp #ept #theta
time='00Z01JAN2015'
out=${prefix}_${time}_SFC.eps
grads -bcp "$exe -ifu $ifu -ifv $ifv -ift $ift \
$opt -time $time -var ${var} \
-ci $ci -outdir $outdir -out $out -q"
echo
echo Output: $out
echo
exit 0
----------------------
End of NCEP_T.snapshot.run.sh
----------------------
aofd165.bio.mie-u.ac.jp
/work1/am/2016.Atmospheric.Data.Ornithology
Tue Jun 14 14:19:37 JST 2016
======================
NCEP.air.2m.ctl
======================
dset /work4/data/NCEP.NCAR.Reanalysis2/sfc/air.2m.gauss.2015.nc
title 4x Daily NCEP/DOE Reanalysis 2
undef -9.99e+33
dtype netcdf
UNPACK scale_factor add_offset
OPTIONS yrev
xdef 192 linear 0 1.875
ydef 94 levels -88.542 -86.6531 -84.7532 -82.8508 -80.9473 -79.0435 -77.1394 -75.2351
-73.3307 -71.4262 -69.5217 -67.6171 -65.7125 -63.8079 -61.9033 -59.9986 -58.0939 -56.1893
-54.2846 -52.3799 -50.4752 -48.5705 -46.6658 -44.7611 -42.8564 -40.9517 -39.047 -37.1422
-35.2375 -33.3328 -31.4281 -29.5234 -27.6186 -25.7139 -23.8092 -21.9044 -19.9997 -18.095
-16.1902 -14.2855 -12.3808 -10.476 -8.57131 -6.66657 -4.76184 -2.8571 -0.952368 0.952368
2.8571 4.76184 6.66657 8.57131 10.476 12.3808 14.2855 16.1902 18.095 19.9997
21.9044 23.8092 25.7139 27.6186 29.5234 31.4281 33.3328 35.2375 37.1422 39.047
40.9517 42.8564 44.7611 46.6658 48.5705 50.4752 52.3799 54.2846 56.1893 58.0939
59.9986 61.9033 63.8079 65.7125 67.6171 69.5217 71.4262 73.3307 75.2351 77.1394
79.0435 80.9473 82.8508 84.7532 86.6531 88.542
zdef 1 linear 2 1
tdef 1460 linear 00Z01JAN2015 360mn
vars 1
air=>air 1 t,z,y,x 6-Hourly Forecast of Air temperature at 2 m
endvars
----------------------
End of NCEP.air.2m.ctl
----------------------
======================
NCEP.uwnd.10m.ctl
======================
DSET /work4/data/NCEP.NCAR.Reanalysis2/sfc/uwnd.10m.gauss.2015.nc
title 4x Daily NCEP/DOE Reanalysis 2
undef -9.99e+33
dtype netcdf
UNPACK scale_factor add_offset
OPTIONS template yrev
xdef 192 linear 0 1.875
ydef 94 levels -88.542 -86.6531 -84.7532 -82.8508 -80.9473 -79.0435 -77.1394 -75.2351
-73.3307 -71.4262 -69.5217 -67.6171 -65.7125 -63.8079 -61.9033 -59.9986 -58.0939 -56.1893
-54.2846 -52.3799 -50.4752 -48.5705 -46.6658 -44.7611 -42.8564 -40.9517 -39.047 -37.1422
-35.2375 -33.3328 -31.4281 -29.5234 -27.6186 -25.7139 -23.8092 -21.9044 -19.9997 -18.095
-16.1902 -14.2855 -12.3808 -10.476 -8.57131 -6.66657 -4.76184 -2.8571 -0.952368 0.952368
2.8571 4.76184 6.66657 8.57131 10.476 12.3808 14.2855 16.1902 18.095 19.9997
21.9044 23.8092 25.7139 27.6186 29.5234 31.4281 33.3328 35.2375 37.1422 39.047
40.9517 42.8564 44.7611 46.6658 48.5705 50.4752 52.3799 54.2846 56.1893 58.0939
59.9986 61.9033 63.8079 65.7125 67.6171 69.5217 71.4262 73.3307 75.2351 77.1394
79.0435 80.9473 82.8508 84.7532 86.6531 88.542
zdef 1 linear 10 1
tdef 1460 linear 00Z01JAN2015 360mn
vars 1
uwnd=>uwnd 1 t,z,y,x 6-Hourly Forecast of U-wind at 10 m
endvars
----------------------
End of NCEP.uwnd.10m.ctl
----------------------
======================
NCEP.vwnd.10m.ctl
======================
DSET /work4/data/NCEP.NCAR.Reanalysis2/sfc/vwnd.10m.gauss.2015.nc
title 4x Daily NCEP/DOE Reanalysis 2
undef -9.99e+33
dtype netcdf
UNPACK scale_factor add_offset
OPTIONS template yrev
xdef 192 linear 0 1.875
ydef 94 levels -88.542 -86.6531 -84.7532 -82.8508 -80.9473 -79.0435 -77.1394 -75.2351
-73.3307 -71.4262 -69.5217 -67.6171 -65.7125 -63.8079 -61.9033 -59.9986 -58.0939 -56.1893
-54.2846 -52.3799 -50.4752 -48.5705 -46.6658 -44.7611 -42.8564 -40.9517 -39.047 -37.1422
-35.2375 -33.3328 -31.4281 -29.5234 -27.6186 -25.7139 -23.8092 -21.9044 -19.9997 -18.095
-16.1902 -14.2855 -12.3808 -10.476 -8.57131 -6.66657 -4.76184 -2.8571 -0.952368 0.952368
2.8571 4.76184 6.66657 8.57131 10.476 12.3808 14.2855 16.1902 18.095 19.9997
21.9044 23.8092 25.7139 27.6186 29.5234 31.4281 33.3328 35.2375 37.1422 39.047
40.9517 42.8564 44.7611 46.6658 48.5705 50.4752 52.3799 54.2846 56.1893 58.0939
59.9986 61.9033 63.8079 65.7125 67.6171 69.5217 71.4262 73.3307 75.2351 77.1394
79.0435 80.9473 82.8508 84.7532 86.6531 88.542
zdef 1 linear 10 1
tdef 1460 linear 00Z01JAN2015 360mn
vars 1
vwnd=>vwnd 1 t,z,y,x 6-Hourly Forecast of V-wind at 10 m
endvars
----------------------
End of NCEP.vwnd.10m.ctl
----------------------