[Thread Prev][Thread Next][Index]

Re: position of min or max



Hi Martin,

As you say, the value of the maximum can be found with

    let vmax = v[x=@max,y=@max]

There are a number of ways of finding the location of this (or any other)
value. I'd say the most straightforward  is with the @LOC transformation
(see Users guide):

    let xloc = v[x=@loc:`vmax`]    ! note the use of grave accent tic marks

and similarly with "x" replaced by "y" to find the latitude.

To find the corresponding I index you can use

    let iloc = I[g=v,x=`xloc`]   ! again, grave accents

or you can use the more general techniques described under the @WEQ
(weighted equal) transform, which allows you to evaluate any variable at a
location defined by some other variable.

    - steve

============================================

Martin Junier wrote:

> Dear ferret users,
>
> Looking in the mail archive, I saw that this question has allready been
> posted in october 1999, but I had not been able to find the solution (if
> there is one).
>
> I would like to find the position of the min and/or max of a given
> variable. Finding the min and max values is easy using 'statistics' or
> @min and @max. But how can I know WHERE in my grid they are located in
> the (i,j,k,l) or (x,y,z,t) systems.
>
> Thanks for help,
>
> Martin Junier
>
> --
>  +-----------------------------------------------------+
>  | Martin Junier                                       |
>  | Laboratoire de pollution atmosphérique - LPA        |
>  | Département de Génie Rural                          |
>  | Ecole Polytechnique Fédérale de Lausanne            |
>  | CH - 1015 Lausanne                                  |
>  | tel.: ++41 21 693 57 01  -  fax.: ++41 21 693 51 45 |
>  | e-mail: martin.junier@epfl.ch                       |
>  +-----------------------------------------------------+

--
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement