Re: Is there a function that can find and return the lat and long of a specified value?

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed, 03 May 2006 16:24:03 -0600

Hi Alex,

If you only want the absolute minimum value per timestep that
changes/simplifies everything.

ncol = 4
data = new ( (/dimsizes(t),ncol/) , typeof(x) )
cntr = 0
do i = 0,dimsizes(t)-1
    nmin = local_min(hgtnew(i,{60:90},:), True, 0.0)
    wind = ind(nmin_at_minval.eq.min(nmin_at_minval))

    data(i,0) = t(i)
    data(i,1) = nmin_at_minval(wind)
    data(i,2) = nmin_at_xi(wind)
    data(i,3) = nmin_at_yi(wind)
    cntr = cntr+nmin
end do

Adam

Alex Gardner wrote:
> Thank you Adam and Mike,
>
> First to Mike's suggestion of using minind. I want to find the min value in
> an array and return the lat and long... minind only works for
> one-dimensional array.
>
> Second to Adam's help with using local_min. Local_min seams to be able to
> find the absolute minimum, at least near the poles. The function "min" is
> able to find the value of the absolute minimum but is unable to return lat
> and long position like local_min is able.
>
> Any ideas?
>
> Alex
>
>
>
> -----Original Message-----
> From: Adam Phillips [mailto:asphilli_at_cgd.ucar.edu]
> Sent: Wednesday, May 03, 2006 3:53 PM
> To: Alex Gardner
> Cc: ncl-talk_at_ucar.edu
> Subject: Re: Is there a function that can find and return the lat
> and long of a specified value?
>
> Hi Alex,
>
> You will see the answer to this question in my last posting, see the new
> print statement.
> Adam
>
> Alex Gardner wrote:
>
>>Hello all,
>>
>>
>>
>>I've looked through the NCL documentation and can't see any function
>>that can find a specified value then return it's lat and long? For
>>example, if I use the function "min" I would like to return it's
>>location as well.
>>
>>
>>
>>Has any one run into a similar problem?
>>
>>
>>
>>Thanks,
>>
>>Alex
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>ncl-talk mailing list
>>ncl-talk_at_ucar.edu
>>http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 03 2006 - 16:24:03 MDT

This archive was generated by hypermail 2.2.0 : Wed May 03 2006 - 21:11:42 MDT