Skip to content

CF global attribute "Conventions": expose to users, and include CF standard name table version #5255

@larsbarring

Description

@larsbarring

✨ Feature Request

Currently, the global attribute Conventions is difficult to change. The default is hardcoded deep in the code:

CF_CONVENTIONS_VERSION = "CF-1.7"
and changing the default is not as easy as one (at least I) would have hoped for, because it is "hidden" as iris.config.netcdf.conventions_override = True, which is difficult to find if I search for "global attribute Conventions" (or similar) in the documentation.

For our own use cases we would like to have better control of which CF version is actually written into the files, and moreover we would like to include additional conventions, like ACDD, Clix-meta version, as well as the CF Standard name Table version. Hence, this feature request has three main components:

  • In iris.save allow users to pass the kwarg Conventions='....'.
  • Change the tools/generate_std_names.py so that the lib/std_names.py includes the version number (and possibly related information such as creation date).
  • New functionality (in iris.util?) to get the default Conventions string, and to get the Standard name table version number from lib/st_names.py.

Motivation

A more general motivation for giving the user (easier) access to setting the CF version is given by CF itself in Section 2.6.1:

When CF is listed with other conventions, this asserts the same full compliance with CF requirements and interpretations as if CF was the sole convention. It is the responsibility of the data-writer to ensure that all common metadata is used with consistent meaning between conventions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions