[ncl-talk] Binning Data.

jbuzan jbuzan at purdue.edu
Tue Sep 23 08:15:28 MDT 2014


Hello NCL-Talk,

I am attempting to find a function that will allow me to bin data in one array while using another array as the boundaries.

For ex.
x = (/2,3,4,5,6,7,2,1,3/)
y = (1,1,1,1,3,3,2,2,2/)

binvaluey = 1, 4 values: (/2,3,4,5/)
binvaluey = 2, 3 values: (/2,1,3/)
binvaluey = 3, 2 values: (/6,7/)

I tried to find a function that would do this, but I am not seeing anything in the function list.  The only thing I can think of is create an array for each bin range, and using masks to isolate the values in the other array.

-Jonathan


More information about the ncl-talk mailing list