cf.Field.insert_dim¶
-
Field.
insert_dim
(item, key=None, axes=None, copy=True, replace=True)[source]¶ Insert a dimension coordinate object into the field.
See also
insert_aux
,insert_axis
,insert_item
,insert_measure
,insert_data
,insert_ref
,remove_item
Parameters: - item:
cf.DimensionCoordinate
orcf.Coordinate
orcf.AuxiliaryCoordinate
The new dimension coordinate object. If it is not already a dimension coordinate object then it will be converted to one.
- axes: sequence of
str
, optional The axis for the item. The axis is given by its domain identifier. By default the axis will be the same as the given by the key parameter.
- key:
str
, optional The domain identifier for the item. By default a new, unique identifier will be generated.
- copy:
bool
, optional If False then the item is not copied before insertion. By default it is copied.
- replace:
bool
, optional If False then do not replace an existing dimension coordinate object of domain which has the same identifier. By default an existing dimension coordinate object with the same identifier is replaced with item.
Returns: - out:
The domain identifier for the inserted item.
Examples: >>>
- item: