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

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

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-----
> 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.
>
> 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
>
>

```--
--------------------------------------------------------------