multi-year monthly mean standard deviation
LAURA FEUDALE
feudale at ICTP.IT
Tue Apr 3 04:42:12 EDT 2007
Dear Simon,
the aave function doesn't work when time is a varying dimension. In this
case you should use the "tloop" function.
So try adding the tloop function in this way:
.....
'd tloop(sqrt(ave(aave(pow(ztemp-tmp.2,2),lon=36,lon=54,lat=51,lat=65),t+396,t=528,12)))'
'd tloop(sqrt(ave(aave(pow(zprec-pre,2),lon=36,lon=54,lat=51,lat=65),t+396,t=528,12)))'
Regards,
-- Laura
----------------------------------------------------------------------
Laura Feudale, Ph.D. (Climate Dynamics, George Mason University/COLA)
*Current Affiliation: Earth System Physics Section
The Abdus Salam International Centre for Theoretical Physics
Trieste, ITALY
----------------------------------------------------------------------
On Tue, 3 Apr 2007, Simon Krichak wrote:
> 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