time averaging over multiple files

Charles Seman Charles.Seman at NOAA.GOV
Sat Apr 14 18:05:38 EDT 2007


Thanks Eric,

Chuck

Eric L. Altshuler wrote:
> Chuck,
>
> When you use the 'ave' function in grads, undefined values are excluded
> from the averaging calculation. In other words, if you have 10 values but
> one of them is undefined, the ave function calculates the average of the
> 9 remaining 'legitimate' values. The result from ave function will only
> be undefined if ALL of the values involved in the average are undefined.
>
> On the other hand, if you explicitly refer to an undefined value in an
> arithmetic calculation, the result of that calculation is also undefined.
> For example, if you calculate the average of 10 values by adding them up and
> dividing by 10, the result will be undefined if ANY of the 10 values are
> undefined. That is why the white areas are bigger in the figure you made
> by calculating the average with a 'while' loop. Unless you have a
> compelling reason to calculate an average by explicitly summing up the
> values, it's probably best to use the ave function.
>
> Sincerely,
> Eric L. Altshuler
> Assistant Research Scientist
> Center for Ocean-Land-Atmosphere Studies
> Calverton, MD, USA
> ela at cola.iges.org
>

--

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 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