[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to find top five temperature values



Dear Xiaoyu,

On Sun, Mar 10, 2019 at 8:19 AM Xiaoyu Bai <xbai1@xxxxxxxx> wrote:

I am using @MAX function to find the maximum value of my temperature data. I am wondering how can I use @MAX or other functions to find, say the top five warmest values.

IF there is a function or operator which sorts values along a specified axis, your problem is solved.  You want to check the Ferret manual if there is such an operator.

If there is no sort functionality,  I guess you can do something along the lines of

let first = yourvar[L=@MAX]

and retain only the values smaller than or equal to the "first":

let first_removed = if yourvar le first then yourvar
let second = first_removed[L=@MAX]

and so on.

Hope this helps,

Ryo

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement