[Thread Prev][Thread Next][Index]

Re: [ferret_users] Converting missing values to "NaN"



Hi Sam,
Actually Ferret can read and use datasets where NaN should be treated as the fill or missing value but doesn't let you assign NaN as a missing-data value or for that matter to the value of any variable.  I think you'll have to do this outside of Ferret.  Perhaps somebody can tell us whether the NCO operators will let you do this.

By the way, the MISSING function goes back to the earliest versions of Ferret.  Don't you see it listed if you ask for

   yes? show function missing

Ansley

On 6/20/2011 12:39 PM, Sam Rabin wrote:
Hello! I am trying to analyze a NetCDF file in MatLab, and I would like to change all "missing" values in the dataset to NaN for compatibility. This would probably be trivial if the missing() function were an option, but I am running Ferret v6.401 and that command is not present.

Let's say that variable has missing value −1E+34 (which I want to convert to NaN) and all other values greater than or equal to 0. I have tried
yes? let nan = "NaN"
yes? let variable_nan = IF variable ge 0 THEN variable ELSE nan
but that just turns all the data into missing values (-1.000000E+34).

Thanks for your help,

Sam Rabin
     Graduate student
         Princeton University
         Ecology & Evolutionary Biology

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

Privacy Policy | Disclaimer | Accessibility Statement