multi-year monthly mean standard deviation
Simon Krichak
shimon at CYCLONE.TAU.AC.IL
Mon Apr 2 03:57:10 EDT 2007
Hello,
I am unsuccessfully trying to calculate multiyear standard deviations from
monthly mean data on temperature and precip.
Please see my script below and let me know if it can be corrected.
Simon
The script:
'open ../CRU-DATA/GRADS:1951-2000.pre.ctl '
'open ../CRU-DATA/GRADS:1951-2000.tmp.ctl '
'set x 1'
'set y 1'
'set t 1 12'
'set tlsupp year'
'define ztemp=ave(aave(tmp.2,lon=36,lon=54,lat=51,lat=65),t+396,t=528,12)'
'define zprec=ave(aave(pre,lon=36,lon=54,lat=51,lat=65),t+396,t=528,12)/30'
'd
sqrt(ave(aave(pow(ztemp-tmp.2,2),lon=36,lon=54,lat=51,lat=65),t+396,t=528,12))'
'd
sqrt(ave(aave(pow(zprec-pre,2),lon=36,lon=54,lat=51,lat=65),t+396,t=528,12))'
This is what I obtain by applying it:
ga-> stand-deviation.gs
Syntax Error: Invalid dimension expression
Cannot use an offset value with a varying dimension
Varying dimension = 3
Error from AVE: 1st dimension expression invalid
Operation Error: Error from ave function
Operation Error: Error from sqrt function
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression =
sqrt(ave(aave(pow(ztemp-tmp.2,2),lon=36,lon=54,lat=51,lat=65),t+396,t=528,12))
Syntax Error: Invalid dimension expression
Cannot use an offset value with a varying dimension
Varying dimension = 3
Error from AVE: 1st dimension expression invalid
Operation Error: Error from ave function
Operation Error: Error from sqrt function
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression =
sqrt(ave(aave(pow(zprec-pre,2),lon=36,lon=54,lat=51,lat=65),t+396,t=528,12))
More information about the gradsusr
mailing list