Thursday, February 5, 2009

Mean and mean deviation (grads)

'!mkdir rain4'
yyyy=1951
while(yyyy<=2003)

'reinit'
'open rf_5103.ctl'
'set lat 10'
'set lon 75'

'set time 01Oct'yyyy' 31Dec'yyyy
'set grads off'
'define r=aave(rf,lon=70,lon=80,lat=8,lat=13)'
'd r'
'define mean=ave(r,time=01Oct'yyyy',time=31Dec'yyyy')'
'define dev=abs(r-mean)'
'define mdev=ave(dev,time=01Oct'yyyy',time=31Dec'yyyy')'

'd mean-mdev'

'd mean'

'd mean+mdev'


'draw title Rain 'yyyy' '
'printim rain4/rain'yyyy'.jpg white'

yyyy=yyyy+1
endwhile






No comments: