finding the top and bottom

From: Cory Wolff <cwolff_at_nyahnyahspammersnyahnyah>
Date: Tue, 21 Apr 2009 16:11:02 -0600

I have data in a 3-d array (x,y,z) and would like to create a 2-d array
(x,y) that holds the level at which the values go above a certain
threshold in the z coordinate, starting from the top. I would also use
this to find the same starting from the bottom in a separate array. I
know that I can do this with loops:
do i=0,x
  do j=0,y
      do k=z,0,-1
          if(data(i,j,k).gt.0.0) then
             top(i,j) = k

That will be really slow, of course, so I'm wondering if I can do it
without resorting to loops. Any help would be appreciated. Thanks.


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Apr 21 2009 - 16:11:02 MDT

This archive was generated by hypermail 2.2.0 : Fri Apr 24 2009 - 14:12:40 MDT