cf.Domain.insert_dim

Domain.insert_dim(item, key=None, copy=True, replace=True, finalize=True)[source]

Insert a dimension coordinate to the domain in place.

Parameters :
item: cf.DimensionCoordinate or cf.Coordinate or cf.AuxiliaryCoordinate

The new coordinate. If not a dimension coordinate object then it will be converted to one.

key : str, optional

The identifier for the new dimension coordinate. The identifier is of the form 'dimN' where the N part should be replaced by an arbitrary integer greater then or equal to zero. By default a unique identifier will be generated.

transform : cf.Transform

copy: bool, optional

If False then the dimension coordinate is not copied before insertion. By default it is copied.

replace : bool, optional

If False then do not replace an existing dimension coordinate with the same identifier. By default an existing dimension coordinate with the same identifier is replaced with coord.

finalize : bool, optional

If False then do not finalize the domain for the new coordinate. By default the domain is finalized. Only set to False if the domain is guaranteed to be finalized subsequently, in which case there may be a performance advantage.

Returns :
out : str

The identifier for the new dimension coordinate (see the key parameter).

Examples

>>>

Previous topic

cf.Domain.insert_coord

Next topic

cf.Domain.insert_transform

This Page