cf.Field.insert_dim

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

Insert a dimension coordinate object into the domain in place.

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

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

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.

finalize : bool, optional

If False then do not finalize the field after the new item has been inserted. By default the field is finalized. Only set to False if the field is guaranteed to be finalized subsequently, in which case there may be a performance advantage. See cf.Field.finalize for details.

Returns :
out :

The domain identifier for the inserted item.

Examples

>>>

Previous topic

cf.Field.insert_data

Next topic

cf.Field.insert_transform

This Page