cf.Field.set_data_axes

Field.set_data_axes(axes, key=None, _shape=None)[source]

Set the domain axis constructs spanned by the data of the field or of a metadata construct.

New in version 1.7.0.

Parameters
axes: sequence of str

The identifiers of the domain axis constructs spanned by the data of the field or of a metadata construct.

Parameter example:

axes='domainaxis1'

Parameter example:

axes=['domainaxis1']

Parameter example:

axes=['domainaxis1', 'domainaxis0']

key: str, optional

Specify a metadata construct, instead of the field construct.

Parameter example:

key='domainancillary1'

Returns

None

Examples:

Set the domain axis constructs spanned by the data of the field construct:

>>> f.set_data_axes(['domainaxis0', 'domainaxis1'])

Set the domain axis constructs spanned by the data of a metadata construct:

>>> f.set_data_axes(['domainaxis1'], key='dimensioncoordinate1')