Re: named subscripting

From: Julie Arblaster (jma AT XXXXXX)
Date: Fri Apr 06 2001 - 14:52:14 MDT


Thanks for your replies. I guess I was confused by the
example on the NCL web page for wgt_areaave that says
you can do both named and standard subscripting.

+++++
Example 3
   shAve = wgt_areaave (q(:,5:7,{lat|-90:0},:),
              wgty({lat|-90:0}), 1.0,0)

will calculate the area (southern hemisphere ) average
for each time and only at levels=5,6,7. Named
subscripting and standard subscripting are used to
subset the input global array. shAve will have
dimensions (ktime,3).
+++++

Now I understand that I don't need named subscripting.

thanks!
Julie

On Fri, 6 Apr 2001, Dennis Shea wrote:

> Julie,
>
> Adam has answered your question. Further background:
>
> The 'rule' is: if you explicitly name one or more dimensions
> u must name *all* the dimensions.
>
> The *only* time when explicit dimension names
> should be used is when you are reordering the dimensions.
>
> --
> Let: x(time,lat,lon)
>
> then
> x(:,{-30:30},{90:180})
>
> is more efficient than
>
> x(time|:,{lat|-30:30},{lon|90:180})
>
> because no reordering is done.
>
>
> Dennis
>
>



This archive was generated by hypermail 2b29 : Fri Apr 06 2001 - 15:29:55 MDT