cf.Field.get_data_axes

Field.get_data_axes(identity=None, default=ValueError())[source]

Return the keys of the domain axis constructs spanned by the data of a metadata construct.

New in version 3.0.0.

Parameters
identity: optional

Select the construct for which to return the domain axis constructs spanned by its data. By default the field construct is selected. May be:

  • The identity or key of a metadata construct.

A construct identity is specified by a string (e.g. 'latitude', 'long_name=time', 'ncvar%lat', etc.); or a compiled regular expression (e.g. re.compile('^atmosphere')) that selects the relevant constructs whose identities match via re.search.

Each construct has a number of identities, and is selected if any of them match any of those provided. A construct’s identities are those returned by its identities method. In the following example, the construct x has six identities:

>>> x.identities()
['time', 'long_name=Time', 'foo=bar', 'standard_name=time', 'ncvar%t', 'T']

A construct key may optionally have the 'key%' prefix. For example 'dimensioncoordinate2' and 'key%dimensioncoordinate2' are both acceptable keys.

Note that in the output of a print call or dump method, a construct is always described by one of its identities, and so this description may always be used as an identity argument.

default: optional

Return the value of the default parameter if the data axes have not been set. If set to an Exception instance then it will be raised instead.

Returns
tuple

The keys of the domain axis constructs spanned by the data.

Examples:

>>> f.set_data_axes(['domainaxis0', 'domainaxis1'])
>>> f.get_data_axes()
('domainaxis0', 'domainaxis1')
>>> f.del_data_axes()
('domainaxis0', 'domainaxis1')
>>> print(f.del_dataxes(None))
None
>>> print(f.get_data_axes(default=None))
None

TODO more examples with key=