[gradsusr] linear trend in grads

Roberto Mera rjmera at coas.oregonstate.edu
Tue Feb 5 16:56:15 EST 2013


Michael,

I'm also interested in how to find out the significance. Any help would 
be great?

BTW, the scripts worked perfectly.

Robert

On 8/3/2012 11:06 AM, Tereza Cavazos wrote:
> 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
>




More information about the gradsusr mailing list