Friday, February 6, 2009

Trend using 3year running mean (Grads)

*warning:this is a very difficult job using the extreme of your processors ability.
*so be careful... the program take very much time
*trend analysis
'!mkdir trend3out'
'reinit'
'open rf_5103.ctl'
'clear'
'set lat 10'
'set lon 75'
'set time 01Oct1951 31Dec2003'
'set grads off'
'define r=aave(rf,lon=70,lon=80,lat=8,lat=13)'

'define s0=ave(r,time=01Oct,time=31Dec)'
'd s0'

'draw title Rain trend 1951-2003 '
'printim trend3out/rain_trend0.jpg white'

i=1
while(i<=50)

'define s'i'=ave(s'i-1',t-365,t+365)'
'undefine s'i-1
'clear'
'd s'i''
'draw title Rain trend 1951-2003 '
'printim trend3out/rain_trend'i'.jpg white'

i=i+1
endwhile

No comments: