[gradsusr] linear trend in grads
Tereza Cavazos
tcavazos at cicese.mx
Fri Aug 3 14:06:25 EDT 2012
Hi Michael,
And how do you know if the trend is suignificant?
Do you have a program for that?
Thanks,
Tereza
El 03/08/2012 09:28 a.m., J-P Michael escribió:
> Robert,
>
> Here is my solution. Perhaps someone else has a more eloquent script for
> this.
>
> function get_trend (args)
>
> varname=subwrd(args,1)
> xlimit=subwrd(args,2)
> ylimit=subwrd(args,3)
> zlimit=subwrd(args,4)
> tlimit=subwrd(args,5)
> if (varname = '')
> say ''
> say 'you must first open the file to be detrended'
> say ''
> say 'then you must call this script like so: '
> say 'scripts/get_trend.gs varname x y z t'
> say 'example:'
> say 'scripts/get_trend.gs temp 320 366 1 2400'
> say ''
> return
> endif
>
>
> 'set x 1 'xlimit
> 'set y 1 'ylimit
> 'set loopdim z'
>
> 'set t 1 'tlimit
> 'set z 1 'zlimit
> 'set x 1'
> 'set y 1'
> 'define base = const ('varname', 1, -a)'
> 'define ttime = sum(base, t = 1, t+1)'
> 'set z 1 'zlimit
> 'set x 1 'xlimit
> 'set y 1 'ylimit
> 'set t 1'
> 'define trend = tregr(ttime, 'varname', t=1, t = 'tlimit')'
> 'set z 1 'zlimit
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
--
____________________________________
Tereza Cavazos
Departamento de Oceanografia Fisica
CICESE
http://usuario.cicese.mx/~tcavazos/
More information about the gradsusr
mailing list