Page 1 of 1

How to convert zero value to NaN in SeaDAS

Posted: Fri Dec 24, 2021 8:11 pm America/New_York
by cyzhang2017
A new band was generated using math expression in SeaDAS, and the invalid data (such as land) was coverted to zero value. I hoped these zero value could be converted to NaN, how to do this in SeaDAS?

Re: How to convert zero value to NaN in SeaDAS

Posted: Wed Dec 29, 2021 7:10 am America/New_York
by gnwiii
SeaDAS has built-in support for missing value handling (see the properties for your new band). NaN's are commonly used with floating point data, but if your generated band uses integer values, your only option is to set a missing value in the band properties. If you use NetCDF4-CF format, missing value codes are generally handled by the library so will be used by other applications that support NetCDF4-CF format data. Level-2 products use masks which allow you to understand which pixels may have unreliable values and why.

In some cases it is best to use conditional statements to your band maths expression to set the missing value code.