Re: Are there ncl commands/functions to compute averages over continents and/or oceans?

From: Dennis Shea (shea AT XXXXXX)
Date: Wed Jul 03 2002 - 14:06:22 MDT


>
>Are there ncl commands or functions to compute averages of quantities
>over continents and/or oceans?
>
>Continents: Africa, Asia, Australia, N.America, S.America
>Oceans: N.Pacific, S.Pacific, N.Atlantic, S.Atlantic, N.Indian, S.Indian

The short answere is "no".

However,

assume you have some array ("flags") that indicates if a grid point
is Africa (=1), Asia(=2), ...,etc. Let flags(nlat,mlon) and that
variable "x" has rightmost dimensions of nlat,mlon.

  Africa = mask (x, flags, 1)
  aveAfrica = wgt_areaave(Africa, ...)
  
  or
  
  aveAfrica = wgt_areaave( mask(x, flags, 1), ...)
  aveAsia = wgt_areaave( mask(x, flags, 2), ... )
  
if x(nlat,mlon) then the result is a scalar.
if x(time, nlat,mlon) then the result (time) ... one area ave for each time
if x(time, lev, nlat,mlon) then the result (time,lev)
etc

Let's say you have an array (loiFlag) that contains
flags for ocean, land, ice: ; ocean=0,land=1,sea_ice=2

  land_only = mask(x,loiFlag,1)
  ocean_only = mask(x,loiFlag,0)

for examples of the latter, see:
   
   http://www.cgd.ucar.edu/csm/support/CSM_Graphics/mask.shtml

The weighted area average is at:

   http://ngwww.ucar.edu/ngdoc/ng/ref/ncl/functions/wareaave.html
   
Reghards,
Dennis Shea

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Sun Jul 14 2002 - 17:49:53 MDT