Running average over time
Charles Seman
Charles.Seman at NOAA.GOV
Fri Jan 21 15:12:35 EST 2005
Jason,
Here is part of an email exchange to the Listserv (originally posted by
Alvaro Luis <luis at OCEAN.CAOS.TOHOKU.AC.JP> ; Arlindo da Silva answered...):
-------------------------------------------------------------------------------------------------------------------------------
>
> Has anyone tried computing a centered running mean in GrADS
> environment? The one which I know positions the running mean starting
on the
> first point:
>
> set t 1 365
> define a=ave(var,t+0,t+6) ! for a 7-day running mean
>
>
> I wish to position this one on day=3 and not on day=1. How to achieve
this?
>
Try:
set t 4 365
define a=ave(var,t-3,t+3) ! for a 7-day running mean
You can still use
set t 1 365
define a=ave(var,t-3,t+3) ! for a 7-day running mean
but in this case you willl get an uncentered mean for the first
3 days.
--
Arlindo da Silva
arlindo at niteroi.gsfc.nasa.gov
-------------------------------------------------------------------------------------------------------------------------------
I hope this helps,
Chuck
Jason Snyder wrote:
>I was wondering if any of you know about how to do plot a running time
>average in a time series. For example how to plot for 100 years a 5 year
>running average of sea surface temperatures over a particular region.
>
>Thanks,
>
>Jason
>
>
--
********************************************************************
Charles Seman Charles.Seman at noaa.gov
Geophysical Fluid Dynamics Laboratory / NOAA
Princeton University voice: (609) 452-6547
P.O. Box 308 fax: (609) 987-5063
Princeton, NJ 08542-0308 http://www.gfdl.noaa.gov/~cjs/
********************************************************************
"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."
More information about the gradsusr
mailing list