multi-year monthly mean standard deviation
Simon Krichak
shimon at CYCLONE.TAU.AC.IL
Tue Apr 3 02:59:08 EDT 2007
Dear Experts,
I am trying to calculate mean multiyear standard deviations from
monthly mean data on temperature and precip.
To do it I apply the following 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))'
And obtain the following diagnostics:
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))
I do not understand my mistake unfortunately.
Please kindly let me know your recommendations.
Thanks.
Simon Krichak
More information about the gradsusr
mailing list