average with multiple stations

Charles Seman Charles.Seman at NOAA.GOV
Wed Jun 8 18:02:02 EDT 2005


Hi Simoes,

If you have GrADS ctl files, try the following (I'm not sure that the
following will work, so please use with caution... note, by using
"define" the time becomes a "wildcard" so that different time series can
be averaged in an "ensemble" mode:
http://grads.iges.org/grads/gadoc/variable.html#new):

'set dfile (station #2 GrADS file)'
'set t 1963'
'define s2avg63 = ave(...)'

'set dfile (station #3 GrADS file)'
'set t 1963'
'define s3avg63 = ave(...)'

'set dfile (station #5 GrADS file)'
'set t 1963'
'define s5avg63 = ave(...)'

'set dfile (station #6 GrADS file)'
'set t 1963'
'define s6avg63 = ave(...)'

'set dfile (station #7 GrADS file)'
'set t 1963'
'define s7avg63 = ave(...)'

'define avg1963 = (s2avg63 + s3avg63 + s5avg63 + s6avg63 + s7avg63)/5'

and so on...

I hope this helps,
Chuck

simoes wrote:

>hi all, i have seven stations with following time series:
>
>#1 - 20 years - 1966 to 1985
>#2 - 27 years - 1963 to 1989
>#3 - 27 years - 1963 to 1989
>#4 - 24 years - 1968 to 1991
>#5 - 27 years - 1963 to 1989
>#6 - 20 years - 1963 to 1982
>#7 - 30 years - 1963 to 1992
>
>i have one value observed per year (station #1, 20 values; station #2, 27
>values...). i like to do a simple average with the available values for each
>year. examples:
>
>t = 1963
>average1963 = (#2-63 + #3-63 + #5-63 + #6-63 + #7-63) / 4
>
>t = 1991
>average1991 = (#4-91 + #7-91) / 2
>
>please, someone helps me?
>
>thanks,
>
>--
>simoes
>
>

--

********************************************************************
 Charles Seman                                charles.seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            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