Re: Single value from 2D array

From: Alessandra Giannini <alesall_at_nyahnyahspammersnyahnyah>
Date: Wed, 5 Apr 2006 17:38:29 -0400 (EDT)

Brooke, my suggestion would be to use "ndtooned" first, to go from a 2D
array to a 1D array, then "ind" to find the values you are interested in,
and them "sum".

ndtooned first, because ind only takes 1D vectors.

cheers, alessandra

On Wed, 5 Apr 2006, Brooke A. Halvorson wrote:

> I am attempting to take a 2D array and extract each of the values and sum them
> up (if they meet a certain threshold) to give me one,single integer. It
> ultimately does not matter if I keep the location (as the 2D array values are
> associated with gridpoints, not latitude/longitude) since all I want to do is
> sum up the values to give me one number.
>
> This seems like a relatively easy thing to do yet I have been struggling. Is
> NCL capable of this procedure and if so, how? Thank you, in advance, for any
> suggestions.
>
> Brooke
>
>

-- 
Alessandra Giannini
IRI for Climate and Society - The Earth Institute at Columbia University
P.O. Box 1000, Palisades NY 10964-8000
phone/fax: +1 845 680-4473/4864 - email: alesall_at_iri.columbia.edu
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 05 2006 - 15:38:29 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 06 2006 - 08:48:21 MDT