Index of maximum

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Wed, 15 Oct 2008 09:38:15 +0200

Hi,

I was wondering if there is any easy way to extract the index location
of the maximum value in a 3-dimensional array other than...

vmax=-99999.0
do i=0,dimi-1
  do j=0,dimj-1
    do k=0,dimk-1
      if (v(k,j,i).gt.vmax) then
        imax=i
        jmax=j
        kmax=k
        vmax=v(k,j,i)
      end if
    end do
  end do
end do

Thanks for you help,
Oli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 15 2008 - 01:38:15 MDT

This archive was generated by hypermail 2.2.0 : Fri Oct 17 2008 - 10:06:33 MDT