------------------------------
List of the following files:
------------------------------
aphrojp_jst.run.sh
aphrojp_jst.gs
AphroJP_JST_DPREC.ctl
AphroJP_UTC_DPREC.ctl
AphroJP_V1207_DPREC.ctl
AphroJP_V1207_DPREC_ext.ctl
------------------------------
Machine info
------------------------------
localhost
/work2/am/2017.Heavy.Rain/APHRODITE
Mon Oct 16 11:06:59 JST 2017
======================
aphrojp_jst.run.sh
======================
#!/bin/bash
iys=1985
iye=1985 #2015
iy=$iys
figdir="Fig"
if [ ! -d $figdir ]; then
mkdir -vp $figdir
fi
gs=$(basename $0 .run.sh).gs
while [ $iy -le $iye ]; do
if [ $iy -le 2011 ]; then
ctl=AphroJP_V1207_DPREC.ctl
else
ctl=AphroJP_JST_DPREC.ctl
fi
#echo $iy $ctl
m=7
me=7
while [ $m -le $me ]; do
d=1
de=1 # 31
while [ $d -le $de ]; do
yyyy=${iy}
mm=$(printf %02d $m)
dd=$(printf %02d $d)
if [ $m -eq 1 ]; then mmm="Jan"; fi
if [ $m -eq 2 ]; then mmm="Feb"; fi
if [ $m -eq 3 ]; then mmm="Mar"; fi
if [ $m -eq 4 ]; then mmm="Apr"; fi
if [ $m -eq 5 ]; then mmm="May"; fi
if [ $m -eq 6 ]; then mmm="Jun"; fi
if [ $m -eq 7 ]; then mmm="Jul"; fi
if [ $m -eq 8 ]; then mmm="Aug"; fi
if [ $m -eq 9 ]; then mmm="Sep"; fi
if [ $m -eq 10 ]; then mmm="Oct"; fi
if [ $m -eq 11 ]; then mmm="Nov"; fi
if [ $m -eq 12 ]; then mmm="Dec"; fi
ddmmmyyyy=${dd}${mmm}${yyyy}
ext="eps"
out="${figdir}/AphroJP${yyyy}${mm}${dd}.${ext}"
opt="-ctl ${ctl} -date ${ddmmmyyyy} -out ${out} -q"
grads -bcl "${gs} ${opt}"
d=$(expr $d + 1)
done
m=$(expr $m + 1)
done
iy=$(expr $iy + 1)
done
----------------------
End of aphrojp_jst.run.sh
----------------------
======================
aphrojp_jst.gs
======================
*
*
*
function gs( args )
*
* Decode options
*
i = 1
while( 1 )
arg = subwrd( args, i )
i = i + 1;
if( arg = '' ); break; endif
while( 1 )
if( arg = '-ctl' ); ctl=subwrd(args,i);i=i+1; break;endif
if( arg = '-date'); ddmmmyyyy=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
'cc'
'set mpdset hires'
xmax = 4
ymax = 2
xwid = 9.0/xmax
ywid = 5.5/ymax
nmap = 1
ymap = 1
while (ymap <= ymax)
xmap = 1
while (xmap <= xmax)
xs = 0.8 + (xwid+0.30)*(xmap-1)
xe = xs + xwid
ye = 7.5 - (ywid+0.80)*(ymap-1)
ys = ye - ywid
if (ymap = ymax)
'set xlopts 1 2 0.14'
else
'set xlopts 1 2 0.0'
'set xlopts 1 2 0.14'
endif
if (xmap = 1)
'set ylopts 1 2 0.14'
else
'set ylopts 1 2 0.0'
endif
'set vpage 0.0 11.0 0.0 8.5'
'set parea 'xs ' 'xe' 'ys' 'ye
'set grads off'
'set font 4'
#----- Plotting 1st panel -----
if (nmap = 1)
'open 'ctl
'set lon 128.5 133.5'
'set lat 30.0 35.0'
xlevs='129 131 133'
'set xlevs 'xlevs
'set ylint 1'
hh='00'
'set time 'hh''ddmmmyyyy
'q ctlinfo'
say result
'q dims'
say result
'set gxout shade2'
levs='10 20 50 100 200 300'
kind='white->blue->red'
xcbar='1.5 9.5 0.5 0.7 -fw 0.15 -fh 0.18 -line on -edge circle'
if ( nmap = 1 )
'color -levs ' levs ' -kind ' kind ' -xcbar ' xcbar
else
'color -levs ' levs ' -kind ' kind
endif
'set grads off'
'd precip'
'q gxinfo'
line=sublin(result,3)
xl=subwrd(line,4)
xr=subwrd(line,6)
line=sublin(result,4)
yb=subwrd(line,4)
yt=subwrd(line,6)
*
xx = xl+0.0
yy = yt+0.15
'set string 1 l 2 0'
'set strsiz 0.15 0.15'
'draw string 'xx' 'yy' 'ddmmmyyyy
'allclose'
endif
#----- Plotting 1st panel -----
'set parea off'
'set vpage off'
*
if (nmap = 22); break; endif
nmap = nmap + 1
xmap = xmap + 1
endwhile ;* xmap
ymap = ymap + 1
endwhile :* ymap
'gxprint 'out
say 'Output: 'out
if (quitopt="yes")then
quit
endif
exit
----------------------
End of aphrojp_jst.gs
----------------------
======================
AphroJP_JST_DPREC.ctl
======================
DSET /misc/raid112MANDA/KakenA.H28/APHRODITE/V1707/AphroJP_JST_DPREC.%y4
UNDEF -99.9
OPTIONS little_endian template
TITLE APHRO_JP V1207 daily precipitation
XDEF 460 LINEAR 123.025 0.05
YDEF 440 LINEAR 24.025 0.05
ZDEF 01 LEVELS 1
TDEF 42000 LINEAR 01JAN2009 1dy
VARS 3
precip 1 00 Daily precipitation (mm/day)
nobs 1 00 Number of stations in each grid [1 or 2]
eod 1 00 End of the day (UTC) = 15 UTC
ENDVARS
----------------------
End of AphroJP_JST_DPREC.ctl
----------------------
======================
AphroJP_UTC_DPREC.ctl
======================
DSET ^AphroJP_UTC_DPREC.%y4
UNDEF -99.9
OPTIONS little_endian template
TITLE APHRO_JP V1207 daily precipitation
XDEF 460 LINEAR 123.025 0.05
YDEF 440 LINEAR 24.025 0.05
ZDEF 01 LEVELS 1
TDEF 42000 LINEAR 01JAN2009 1dy
VARS 3
precip 1 00 Daily precipitation (mm/day)
nobs 1 00 Number of stations in each grid [1 or 2]
eod 1 00 End of the day (UTC) = 24 UTC
ENDVARS
----------------------
End of AphroJP_UTC_DPREC.ctl
----------------------
======================
AphroJP_V1207_DPREC.ctl
======================
DSET /misc/raid112MANDA/KakenA.H28/APHRODITE/V1207/AphroJP_V1207_DPREC.%y4
UNDEF -99.9
OPTIONS little_endian template
TITLE APHRO_JP V1207 daily precipitation
XDEF 460 LINEAR 123.025 0.05
YDEF 440 LINEAR 24.025 0.05
ZDEF 01 LEVELS 1
TDEF 42000 LINEAR 01JAN1900 1dy
VARS 1
precip 1 00 daily precipitation (mm/day)
ENDVARS
----------------------
End of AphroJP_V1207_DPREC.ctl
----------------------
======================
AphroJP_V1207_DPREC_ext.ctl
======================
DSET /misc/raid112MANDA/KakenA.H28/APHRODITE/V1207/AphroJP_V1207_DPREC_ext.%y4
UNDEF -99.9
OPTIONS little_endian template
TITLE Extreme indices of precipitation by APHRO_JP V1207
XDEF 460 LINEAR 123.025 0.05
YDEF 440 LINEAR 24.025 0.05
ZDEF 01 LEVELS 1
TDEF 112 LINEAR 01JAN1900 1yr
VARS 54
pav 0 0 Annual mean precipitaion
pq1 0 0 1st percentile of rain-day amounts
pq5 0 0 5th percentile of rain-day amounts
pq10 0 0 10th percentile of rain-day amounts
pq20 0 0 20th percentile of rain-day amounts
pq30 0 0 30th percentile of rain-day amounts
pq40 0 0 40th percentile of rain-day amounts
pq50 0 0 50th percentile of rain-day amounts
pq60 0 0 60th percentile of rain-day amounts
pq70 0 0 70th percentile of rain-day amounts
pq80 0 0 80th percentile of rain-day amounts
pq90 0 0 90th percentile of rain-day amounts
pq95 0 0 95th percentile of rain-day amounts
pq99 0 0 99th percentile of rain-day amounts
pmax 0 0 The annual maximum of daily precipitation
pf1 0 0 Fraction of total precipitation above annual 1st percentile
pf5 0 0 Fraction of total precipitation above annual 5th percentile
pf10 0 0 Fraction of total precipitation above annual 10th percentile
pf20 0 0 Fraction of total precipitation above annual 20th percentile
pf30 0 0 Fraction of total precipitation above annual 30th percentile
pf40 0 0 Fraction of total precipitation above annual 40th percentile
pf50 0 0 Fraction of total precipitation above annual 50th percentile
pf60 0 0 Fraction of total precipitation above annual 60th percentile
pf70 0 0 Fraction of total precipitation above annual 70th percentile
pf80 0 0 Fraction of total precipitation above annual 80th percentile
pf90 0 0 Fraction of total precipitation above annual 90th percentile
pf95 0 0 Fraction of total precipitation above annual 95th percentile
r1 0 0 Number of days (>= 1mm)
r10 0 0 Number of days (>= 10mm)
r20 0 0 Number of days (>= 20mm)
r30 0 0 Number of days (>= 30mm)
r40 0 0 Number of days (>= 40mm)
r50 0 0 Number of days (>= 50mm)
r60 0 0 Number of days (>= 60mm)
r80 0 0 Number of days (>= 80mm)
r100 0 0 Number of days (>= 100mm)
r120 0 0 Number of days (>= 120mm)
r150 0 0 Number of days (>= 150mm)
r200 0 0 Number of days (>= 200mm)
r300 0 0 Number of days (>= 300mm)
r400 0 0 Number of days (>= 400mm)
r500 0 0 Number of days (>= 500mm)
sdii 0 0 Simple daily intensity
r3d 0 0 Greatest 3-day total rainfall
r5d 0 0 Greatest 5-day total rainfall
r10d 0 0 Greatest 10-day total rainfall
r20d 0 0 Greatest 20-day total rainfall
r30d 0 0 Greatest 30-day total rainfall
cdd 0 0 Maximum number of consecutive dry-days
cwd 0 0 Maximum number of consecutive wet-days
ppdd 0 0 Mean dry-day persistence
ppww 0 0 Mean wet-day persistence
mdd 0 0 Mean consecutive day of dry-days
mwd 0 0 Mean consecutive day of wet-days
ENDVARS
----------------------
End of AphroJP_V1207_DPREC_ext.ctl
----------------------