NCL users
Below is a piece of NCL script for calculating area weighted average over "land"
region with a mask data "ecmask". As I understand one has to mask both "data"
and "clat" (latitude for weight calculation) for correct calculation. If my
understanding is wrong, or there is an alternative method, please kindly let me
know.
In addition, without a specific mask file like "ecmask" here, can one do similar
area weighted calculation for northern or southern hemisphere? or one has to
make a "mask" file for distinguishing northern and southern hemiphere.
clat=conform(data,lat,0)
data=mask(data,ecmask,1) ; for Land
clat=mask(clat,ecmask,1) ; for Land
cwgt = cos(0.01745329*clat)
wsum = sum(cwgt)
Twgt = sum(data(:,:)*cwgt)/wsum
Thanks a lot!
Mark
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 5 08:26:53 2011
This archive was generated by hypermail 2.1.8 : Fri Apr 08 2011 - 09:34:26 MDT