mask northern or southern hemisphere

From: Mark Chan <cym263_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 05 2011 - 08:26:45 MDT

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

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.

  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!

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
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