Skip to main content

Module cf

Module cf 

Source
Expand description

CF conventions: mask fill values and unpack scale_factor / add_offset.

The behavior follows netCDF4-python and xarray decode_cf.

Structs§

CfEncoding
The CF keys that decode_cf removed, plus the packed value type. encode_cf uses it to restore the packed form.

Constants§

ADD_OFFSET
CF attribute: the offset to unpack values.
FILL_VALUE
CF attribute: the value that marks missing data.
MISSING_VALUE
CF attribute: one or more values that mark missing data.
SCALE_FACTOR
CF attribute: the multiplier to unpack values.
VALID_MAX
CF attribute: the largest valid value.
VALID_MIN
CF attribute: the smallest valid value.
VALID_RANGE
CF attribute: the smallest and largest valid values.

Functions§

decode_cf
Mask fill and out-of-range values as nulls, then unpack scale and offset.
encode_cf
Pack decoded values back with encoding, the inverse of decode_cf.
is_cf_key
True for the attribute keys that decode_cf uses.