libera_utils.io.netcdf.field_fill_value#
- libera_utils.io.netcdf.field_fill_value(variable: Variable, *, source: str) float | int#
Return a field’s own
_FillValueattribute.The fill sentinel comes from the file rather than a hard-coded value, so a field with none raises rather than being masked with a guess. Pass it to
apply_fill_and_valid_range()when netCDF4’s automatic masking is off.- Parameters:
variable (netCDF4.Variable) – The field being read.
source (str) – Name used in the error message (reader key and file).
- Returns:
The
_FillValueattribute, as stored.- Return type:
- Raises:
ValueError – If the field has no
_FillValueattribute.