Page 1 of 1

missing_value ?

Posted: Thu Jun 01, 2023 10:23 pm America/New_York
by pleonard
Under what circumstances should I use the missing_value attribute in my Earth Science data product?

Re: missing_value ?

Posted: Mon Jun 05, 2023 4:32 pm America/New_York
by LP DAAC - dgolon
Hi @pleonard Could you please provide us with a little more information? I.e. which dataset are you using and what are you trying to accomplish?

Re: missing_value ?

Posted: Mon Jun 05, 2023 11:15 pm America/New_York
by pleonard
I am producing a gridded soil-moisture product in netCDF.

The data in each grid cell can be either high quality, low quality or missing.

There are many reasons for why data can be missing from a grid cell, and I think it is worth noting why the data are missing in each case.

How should I represent these different cases of missing data in my product?

Re: missing_value ?

Posted: Tue Jun 06, 2023 12:16 am America/New_York
by ORNL - yaxingwei
Hi @pleonard, in general the netCDF CF convention (http://cfconventions.org/) provides two attributes that you can use to specify a single missing value, one is _FillValue and the other is missing_value. But _FillValue is preferred as your data will get better support from the netCDF library. Here are some example cases that _FillValue can be use in: 1) you want to assign a _FillValue to grid cells falling within water bodies; and 2) if your soil moisture data is a time series but you couldn't produce data at certain time periods due to sensor failure or other reasons.

To specify quality level of your data, the CF convention suggests you define ancillary variables. Here are some examples for your reference:
- Ancillary quality flag data: http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#quality-flag-ex
- A flag variable, using flag_values: http://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#flag-variable-flag-values-ex

Hope this helps.