cf.Domain.remove_dimension

Domain.remove_dimension(dim)[source]

Remove a dimension from the domain in place, preserving internal consistency.

If the dimension has size 1 then one dimensionsal coordinates and cell measures which span it are removed and the dimension is removed from multidimensional auxiliary coordinates and cell measures if they span it.

A size 1 dimension is not removed the list of dimensions of a containing field’s data array, so care must be taken to remove concurrently the dimension from the field with its squeeze method.

If the dimension has size greater than and one and is spanned by a coordinate, cell measure or a containing field’s data array then it can not be removed.

Parameters :
dim : str

The identifier of the dimension to be removed.

Returns :
out : str

The identifier of the removed dimension.

Examples

>>> d.remove_dimension('dim3')
>>> d.remove_dimension('latitude')

Previous topic

cf.Domain.remove_coordinate

Next topic

cf.Domain.remove_transform

This Page