How to convert zero value to NaN in SeaDAS

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
Posts: 1
Joined: Fri Dec 24, 2021 7:57 pm America/New_York
Answers: 0

How to convert zero value to NaN in SeaDAS

by cyzhang2017 » Fri Dec 24, 2021 8:11 pm America/New_York

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?


Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: How to convert zero value to NaN in SeaDAS

by gnwiii » Wed Dec 29, 2021 7:10 am America/New_York

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.

Post Reply