Recommendation:

We recommend Earth Science data products avoid using Not-a-Number (NaN) in any field values or as an indicator of missing or invalid data.

Recommendation Details: The Institute of Electrical and Electronics Engineers (IEEE) floating-point standard defines the NaN (Not-a-Number) bit-patterns to represent results of illegal or undefined operations. Unless carefully written, any arithmetic operation involving NaN values can halt a program. Furthermore, any relational operator with at least one NaN value operand must evaluate to False. These properties make NaN values difficult to handle in numerical software and reduce the interoperability of datasets that contain NaN.

Some dataset producers adopt NaN as a missing or invalid datum (a.k.a. _FillValue) without appreciating the difficulty this poses to processing tools. It is more interoperable to use out-of- range values (e.g., -9999) to represent missing or invalid data (a.k.a. _FillValue) and to avoid NaN entirely.