Skip to content

Compliance reporting: flag any invalid standard names #366

@sadielbartholomew

Description

@sadielbartholomew

As a good 'first step' towards formalised CF Checking capability in cfdm, we would like to report any and all cases of invalid standard names registered on any variable within a read-in field (or its domain). This requires:

  • fetching the latest standard names XML and processing it to grab the names to validate against (trivial);
  • running validation against the above names set whenever a standard name is found on the field (easy enough with the current netcdfread logic);
  • producing and returning an output to report any invalid standard names in a structured way which makes clear the affected variables and attributes and their relationship (required some thought and discussion as the data structure will form the basis for more general compliance checking output).

This requires updates mostly to the netcdfread module.

Since the CF Checking capability will, with this added to begin with, be in a fledgling state - with other existing dataset_compliance reporting patchy and untested, we want to have the checking disabled by default, but configurable so that it can be enabled, perhaps with a health warning - best to use a new keyword argument to read, with trailing underscore as a warning for users not to mess with - called something like _check or _compliance_check.

PR, producing the diagnosis using a revised more-flexible data structure from #365, in preparation.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions