You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Recommendation:

The valid range for each variable in an Earth Science data product should put useful constraints on the data.


Recommendation Details:

Declaring valid range of a variable's data according to the CF metadata conventions is one of the DIWG recommendations [insert ref. here]. The data value range can be specified either by two CF attributes, valid_min and valid_max, or with the CF attribute valid_range. Both approaches are allowed but not for the same variable.

The range values declared using these attributes are dependent on the type of data and their intended application but should be chosen as meaningful constraints of all the possible data values. The CF metadata conventions require that any data value representing missing data or the variable's fill value must be excluded from the valid data range.

Generic range values are discouraged unless the actual data range is poorly understood. For example, we discourage using the theoretical limits of a specific computer data type, such as floating-point single or double precision, as the valid range.


The CF valid_min and valid_max attributes, or the CF valid_range attribute, can be used to specify the range of valid data for a variable.  The valid range attributes should usefully constraint the data.

These CF attributes should be carefully applied, and should not be abused.  An example of abuse would be valid_min and -Inf, valid_max = Inf, because the valid range of -Inf to Inf does not put any useful constraints on the data.

The CF valid_min and valid_max attributes, or the CF valid_range attribute, can be used to constrain the range of valid data for a variable.

If the valid_min and valid_max attributes are used, then the valid_range attribute is unnecessary, and vice versa.

The valid range for a variable should be two scientifically useful numbers that can be used by the end users to eliminate missing or invalid data.

Specifically, the valid range for a variable should reflect the expected range of physically realistic values for the variable (e.g., -5.0 to 50.0 for an Aerosol Index).

The valid range is not necessarily the full mathematical range of possible values for a variable (e.g., -Inf to Inf).

Also, the valid range is not necessarily the full range of possible values for the data type (e.g., -3.4E+38 to 3.4E+38).

If the true valid range for a variable is poorly understood, then the valid range attributes for that variable can be excluded.

  • No labels