[Thread Prev][Thread Next][Index]

Re: [ferret_users] zero values to NaN

Dear Atul,

Another way of specifying any value (say -999 ) as nan is

set var/bad=-999 uval

Then all -999 values will be treated as NaN.


On Wed, Aug 16, 2017 at 12:55 PM, Russ Fiedler <russell.fiedler@xxxxxxxx> wrote:


Rather than using "NaN" it's is preferable to use "missing" values. What you want is the IGNORE0() function

let uvels=IGNORE0(uvel)

This sets all zero to missing.

In general if you want to mask out a value but keep the rest.

let val_if_not_equal_to_foo = if val ne foo then val




On 16/08/17 16:54, Atul Srivastava wrote:
Dear ferret users I am new in ferret please tell me how I can set zero values in the data sets to NaN values. Regarding this I am using this command but it does not work properly.

let uvels=uvel[x=40E:110E,y=20S:30N,z=1:500]

let nan = "NaN"

let uvelsn=IF uvels eq 0 THEN nan

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

Privacy Policy | Disclaimer | Accessibility Statement