Piecewise timeseries and averaging functions
Owen Doherty
odoherty at IC.SUNYSB.EDU
Tue Sep 5 23:40:42 EDT 2006
Dear GrADS Users,
I have a relatively straightforward question to which I cannot find an
answer for in the user list archive.
I am attempting to create some composite average images from
reanalysis. The dataset I am using is monthly averages over a period of
years. I am interesting in the average of individual months from the
larger dataset, these months are not related to each other and are
seemingly random (t=17,33,57,94, etc...).
I thought something similar (but with correct GrADS syntax) to the
following could work:
set t 17
define newvar.1=v
set t 33
define newvar.2=v
...
set t n
define newvar.n=v
Combined with something like this, to produce the average:
ave(newvar.t,t=1,t=n)
However the correct GrADS syntax to accomplish the above eludes me.
A less elegant approach would be to sum up the individual months and
divide by the number of months, but this could cause significant errors
if missing data was included.
I was wondering if anyone has written a script that accomplishes this
task, or if someone could lend some light on a more appropriate syntax
or approach. I recall doing something similar to this when I was an
undergraduate, so I am confident a solution can be found.
Regards and thanks,
Owen
--
Owen Doherty
Institute for Terrestrial and Planetary Atmospheres
Marine Sciences Research Center
Stony Brook University
Stony Brook, NY 11794
631-632-3185 (office)
More information about the gradsusr
mailing list