[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #TFD-790939]: netCDF4 support - multiple fill values



Hi Lou,

> I'm from the NOAA NPOESS Data Exploitation program but I've got a bum email
> server (that's why this is coming from gmail).
> 
> I'm trying to initialize a file that requires more than one combination of
> _FillValueName and _FillValue.
> 
> I've got an array of fill value names:
> NA_FLOAT32_FILL,MISS_FLOAT32_FILL,ERR_FLOAT32_FILL,ELINT_FLOAT32_FILL,VDNE_FLOAT32_FILL
> and values: -999.9,-999.8,-999.5,-999.4,-999.3
> 
> What should the cdl look like (or is this supported)?  Depending on what the
> particular cell needs to indicate, the incoming data has one of a number of
> values.

The netCDF library only supports a single _FillValue attribute for a
variable.  The reason for this is that the library uses this value to
pre-fill a vartiable with fill values when the variable is first
created (or in the case of a record variable, whenever it's extended),
so that a reader can later determine whether it has read a value that
was never written.

However, if you need multiple values to indicate missing values, I
recommend that you just use an attribute with a different name for
this purpose.  For example, you could use an attribute named
"missing_value" or "missing_values" with multiple values.  If you need
to be CF-compliant, the closest you can come is the use of the
attributes "flag_values" and "flag_meanings", as described and
specified here:

  
http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.4/cf-conventions.html#flags

There is no CF convention for multiple missing values at this time.
Note that if you want to list multiple names as an attribute value,
the conventional delimiter in existing conventions is just a blank,
not a comma.  In netCDF-4, where real strings are available, multiple
string values may be specified for an attribute, but it will be some
time before conventions and applications catch up to the use of
netCDF-4 features like this that are not available in netCDF-3.

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: TFD-790939
Department: Support netCDF
Priority: Normal
Status: Closed