Hello,
I am using the function wgt_areaave and attempting to
use named subscripting to isolate a geographical area.
Here is (part of) my script ...
+++++
; MASK PRECIP FIELD
ntime = 19
nlat = 64
nlon = 128
pmask = new( (/ntime,nlat,nlon/), float)
pmask!0 = "time"
pmask!1 = "lat"
pmask!2 = "lon"
pmask = mask( (a->PRECC + a->PRECL)*86400000, (a->ORO.ne.0), True)
; CALCULATE WEIGHTED AREA AVERAGE OVER 5-30N, 70-90E
indsm = wgt_areaave ( pmask(:, {lat|5:30},{lon|70:90}), \
a->gw({lat|5:30}), 1.0, 0)
; indsm = wgt_areaave ( pmask(:,34:43,26:33), a->gw(34:43), 1.0, 0)
++++++
But I get the following error,
++++++
fatal:syntax error: line 30 before or near lat
indsm = wgt_areaave ( pmask(:, {lat
-------------------------------------^
fatal:Error in subscript, normal subscripting is being
used, make sure named subscripting has not been used
fatal:Error in subscript, normal subscripting is being
used, make sure named subscripting has not been used
fatal:syntax error: function wgt_areaave expects 4
arguments, got 0
fatal:Syntax Error in block, block not executed
++++++
But an example on the NCL page for wgt_areaave uses
named subscripting so I am unsure what is wrong. If I
use standard subscripting like the commented out line,
it works. But I would like to use the lat/lon values.
thanks for any help.
Julie
--------------------------------------------------------
Julie Arblaster jma@ucar.edu
Climate Change Research Section Ph: 303 497 1712
CGD/NCAR Boulder, Colorado
--------------------------------------------------------
This archive was generated by hypermail 2b29 : Fri Apr 06 2001 - 15:29:55 MDT