爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4891|回复: 3

[图形美化] aave函数用的哪种加权方法?

[复制链接]

新浪微博达人勋

发表于 2015-9-8 17:19:12 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
有谁知道Grads软件里面的aave函数在计算区域平均的时候,用的哪种纬向加权的计算方法,对应NCL里面的什么加权函数求大神指点,非常感谢。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-9-8 18:25:31 | 显示全部楼层
我不懂,我只是官方介绍的搬运工
aave()

This function takes an areal average over an X-Y region. The syntax is:

aave(expr, xdim1, xdim2, ydim1, ydim2)

where:

expr    - any valid GrADS expression
xdim1   - starting X dimension expression
xdim2   - ending X dimension expression
ydim1   - starting Y dimension expression
ydim2   - ending Y dimension expression
For global averaging, a shorthand may be used:

aave(expr, global) or
aave(expr, g)
is the same as
aave(expr, lon=0, lon=360, lat=-90, lat=90)
Usage Notes

In the absence of missing data values, aave gives the same result as nested ave functions in the X and Y dimensions. The expression
ave(ave(expr,x=1,x=72),y=1,y=46)

will produce the same numerical result as

aave(expr,x=1,x=72,y=1,y=46)

but the aave function is faster more efficient.

When there are missing data values, the aave function does not return the same result as nested ave functions. To see this, consider the small grid:
        6       18      3       5

        10      10      10      10

        12      U       U       U
where U represents the missing data value. If we apply nested ave functions, the inner ave will provide row averages of 8, 10, and 12. When the outside ave is applied, the result will be an average of 10. When aave is used, all the values participate equally (in this case, we are assuming no weights applied to the final average), and the result is 84/9 or about 9.33.

The aave function assumes that the world coordinates are longitude in the X dimension and latitude in the Y dimension, and does weighting in the latitude dimension by the difference between the sines of the latitude at the northern and southern edges of the grid box. For areal averaging without latitude weighting, use the amean function.

Both the aave and amean functions use appropriate weighting to account for unevenly spaced grids.

The aave function always does its average to the exact boundaries specified, in world coordinates. This is somewhat different from the ave function, where the -b flag is used to get this behavior. If the boundaries specified via the dimension expressions do not fall on grid boundaries, then the boundary values are weighted appropriately in the average.

If grid coordinates are used in the dimensions expressions, then they are converted to world coordinates to determine the exact boundary values. This conversion is done using the scaling of the default file. Note that the conversion is done using the outside grid box boundary, rather than the grid box center. For example:
asum(expr,x=1,x=72,y=1,y=46)

Here the boundary would be determined by using the X grid values ranging from 0.5 to 72.5 and Y grid values ranging from 0.5 to 46.5. These four grid boundary values would be converted to world coordinates using the scaling information from the default file. If we assume that x=1 is 0 degrees longitude and x=72 is 355 degrees longitude, then the averaging boundary would be -2.5 to 357.5 degrees, which would cover the earth. In the Y dimension, when the boundary is beyond the pole, the asum function recognizes this and weights appropriately.

Examples

See the tloop function for an example of creating a time series of area averages.

An example of taking an area average of data only over land, given a mask grid:
aave(maskout(p,mask.3(t=1)),x=1,x=72,y=1,y=46)

In this case, it is assumed the mask grid has negative values at ocean points.
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-9-10 14:12:03 | 显示全部楼层
river 发表于 2015-9-8 18:25
我不懂,我只是官方介绍的搬运工
aave()

非常感谢,之前就看了好久这个关于aave函数的介绍,但是其中说的加权方法感觉还是不太明白,我在研究研究,再次感谢哈
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-10-25 21:06:39 | 显示全部楼层
aa22556688 发表于 2015-9-10 14:12
非常感谢,之前就看了好久这个关于aave函数的介绍,但是其中说的加权方法感觉还是不太明白,我在研究研究 ...

请教一下。
aave在计算时,分母出的是格点数呢,还是权重系数cos(纬度)的和呢?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表