[Thread Prev][Thread Next][Index]

[ferret_users] Multi Time Series Trend GO File



Ferret community,

	I developed this GO script for my use, and thought it might be of some interest. Right now it is pretty basic, and I am not sure that I have any interest in "prettying" it up. Therefor, I happily give permission for anyone to play with it as they will, please repost any changes you make if you think it would be of interest. Oh, if I somehow missed this capability either built-in to ferret, or in another GO script, blame the fact I don't use ferret as much as I would like to these days.

	Basically it was designed to over plot decadal trend lines over a time series (e.g., 10 year warming trends of Pacific SST). It could easily be changed to allow different length trend lines, and options for the plotting. 

*************************************************
! trends.jnl (version 1.0)

! written 09/10
! by Mark Verschell
! mav9@xxxxxxx

! Description: Overplots multiple regression lines over a time series plot

! usage:
!	yes? GO trends variable

! e.g. yes? GO sst

! notes:
! 1) This version assumes 10 point regressions as it was developed using
!    annual data, where decadal trends was desired
! 2) If no REGION is set before trends is called, the whole range is used
! 3) trends assumes that the user wants the last point included, and thus
!    adjusts start point to accomodate
! 4) No plotting options are allowed at this point, trend lines are thick blue
!    lines
! 5) This current version is messy, in that it does not clean up after itself
!    e.g., it does not return REGION to what the user defined

let my_var = $1

let tlo = `my_var,RETURN=lstart`
let thi = `my_var,RETURN=lend`

let tbeg = MOD(`tlo`,10)+1
let tend = `thi`

repeat/l=`tbeg`:`tend`:10 (let l1=l; \
			   let l2=l+10; \
			   set region/l=`l1`:`l2`; \
			   let p = t[gt=my_var]; \
			   let q = my_var; \
			   go regresst; \
			   plot/vs/over/color=blue/line/thick=3/nolab p,qhat)
*************************************************

Mark Verschell
mav9@xxxxxxx

"What we have done for ourselves alone dies with us. What we have done for others and the world remains and is immortal." - Albert Pines





[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement