[Thread Prev][Thread Next][Index]

Re: [ferret_users] zero values to NaN



 
Hi,
 
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
 
 
../../documentation/users-guide/variables-xpressions/VARIABLES#_VPID_75
 
 
../../documentation/users-guide/commands-reference/IF
 
 
Russ
 
 
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]