[Thread Prev][Thread Next][Index]

Re: [ferret_users]running-mean



Hi Paul,

thanks. My theoretical thinking was misleading: backward running average (what I wanted) is equal to boxcar smoothing then shifting data.
Actually, Paul, defining and then regridding onto a new time axis is equal to the results of using @shf, it was a working script.

Pete

On Mon, Nov 19, 2012 at 5:59 PM, Young, Paul <paul.j.young@xxxxxxxxxxxxxxx> wrote:
Hi Peter,

Perhaps I'm reading this wrong, but if you're just concerned about where the points like on the graph could you make a new time axis and regrid the data to that using @asn? E.g. (not tested!)

let myRunningMean =  myYearlyData[t=@sbx:31]                    !time axis starts in 1986 and finishes in 2085 (or thereabouts!)
define axis/t=2000:2100:1/units=years myNewTAxis
let myRunningMean_shift = myRunningMean[gt=myNewTAxis@asn]

Cheers,

P










On 19 Nov 2012, at 16:25, Peter Szabo <szabpet83@xxxxxxxxx>
 wrote:

> Hello Users,
>
> I would like to smooth my data (simple 1D time-series from 1981 to 2100) backwards: i.e. a running mean, so that the average of 1971-2000 would stand at 2000, the av. of 1972-2001 at 2001, ..., the average of 2071-2100 at 2100.
> I tried searching the Ferret page, also, looked into the common e-mail archive, but not much luck.
> I tried to use boxcar (or any would go) smoothing method (@sbx:31), which is available in Ferret, then used shifting (@shf:-15), but it is not perfectly what I am aiming for. I know, I could get correct results if I did a repeat command and wrote out them to a new file, but would prefer leaving this option out.
>
> Could anyone help? Thanks in advance,
>
> Peter



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement