[gradsusr] weighting in vertical in 'ave' function?

Katrina Hales-Garcia hales at atmos.ucla.edu
Wed Apr 7 16:08:37 EDT 2010


Hello,
I recently joined the grads users' group.  And I do apologize if this topic is covered in the old list archives, I haven't been able to access them to search.

I am trying to reproduce/understand a value averaged in the vertical over a subset of layers.  The variable was defined by something simple like:

define Tave=ave(T,z=1,z=11)

However, I find this is different than a straight average of T over the 11 levels.  In the documentation, it is noted that ave has some weighting for non-linear grid spacing in the y-direction, averaging along latitude.  But I haven't found the details of weighting in the vertical.  If I use the function 'mean' instead of 'ave' I get the same result (which according to the documentation, does not have the non-linear grid space weighting at least in the y-direction).  (Excerpt from the documentation below.)

Of course, the data I'm looking at has non-linear spacing in the vertical pressure coordinate.  Does anyone have details of how this weighting is done?  

Thanks much,
Katrina

What is in the documentation:
Usage Note 3
The average is weighted by grid interval to account for non-linear grid spacing. Averages in the latitude dimension are weighted by the difference between the sines of the latitude at the northern and southern edges of the grid box. The edges of the grid box are always defined as being the midpoint between adjacent grid points. To calculate an average without using the latitude weighting, use the meanfunction.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100407/56769456/attachment-0003.html 


More information about the gradsusr mailing list