Re: identify the location of a specified point.

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 03 2011 - 06:06:13 MST

You can use "ind" to get the index locations *into a 1D array* of a
particular point, and then "ind_resolve" to resolve these to multi-d
indexes.

See the ind_resolve documentation for some examples:

http://www.ncl.ucar.edu/Document/Functions/Built-in/ind_resolve.shtml

The "where" function is very useful for performing array assignments
based on some condition in an array:

     x = f->X
     x@lat2d = f->latitude ; 2D coordinate arrays
     x@lon2d = f->longitude

     latMin = -20
     latMax = 60
     lonMin = 110
     lonMax = 270

     x = where((x@lat2d.ge.latMin .and. x@lat2d.le.latMax .and. \
                x@lon2d.ge.lonMin .and. x@lon2d.le.lonMax), x,
x@_FillValue)

http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml

--Mary

On Mar 3, 2011, at 3:40 AM, Lisi wrote:

> Hi,
>
> Which tool or function can we use to get the specified location
> value(ij or lat,lon) of a specified value.For example,I already know
> the lowest pressure value,but I don't know where this point locates
> in,what should I do?
>
> Thank you so much for your help and support.
>
> Best,
>
> Lisi
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 3 06:07:59 2011

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2011 - 10:00:25 MST