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

Gets the keys of the axes spanned by the construct data.

Specifically, returns the keys of the domain axis constructs spanned by the data of the field or of a metadata construct.

New in version (cfdm): 1.7.0

identity, filter_kwargs: optional

Select the unique construct returned by f.construct(*identity, **filter_kwargs). See construct for details.

If neither identity nor filter_kwargs are set then the domain of the field construct’s data are returned.

New in version (cfdm):

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.

filter_kwargs: optional

Keyword arguments as accepted by Constructs.filter that define additional construct selection criteria.

New in version (cfdm):


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


>>> f = cf.example_field(0)
>>> f.get_data_axes()
('domainaxis0', 'domainaxis1')
>>> f.get_data_axes('latitude')
>>> f.get_data_axes('time')
>>> f.has_data_axes()
>>> f.del_data_axes()
('domainaxis0', 'domainaxis1')
>>> f.has_data_axes()
>>> f.get_data_axes(default='no axes')
'no axes'