A report of problems encountered whilst reading the field construct from a dataset.

If the dataset is partially CF-compliant to the extent that it is not possible to unambiguously map an element of the netCDF dataset to an element of the CF data model, then a field construct is still returned by the read function, but may be incomplete.

Such “structural” non-compliance would occur, for example, if the “coordinates” attribute of a CF-netCDF data variable refers to another variable that does not exist, or refers to a variable that spans a netCDF dimension that does not apply to the data variable.

Other types of non-compliance are not checked, such whether or not controlled vocabularies have been adhered to.

New in version 1.7.0.

See also

display: bool, optional

If True print the compliance report. By default the report is returned as a dictionary.

None or dict

The report. If display is True then the report is printed and None is returned. Otherwise the report is returned as a dictionary.


If no problems were encountered, an empty dictionary is returned:

>>> f.dataset_compliance()