cf.Domain.remove_item

Domain.remove_item(item=None, **kwargs)[source]

Remove and return an item from the domain.

This method has exactly the same interface, functionality and outputs as cf.Field.remove_item. Therefore see cf.Field.remove_item for the full documentation details.

Parameters :
item, kwargs : optional

See cf.Field.remove_item.

Returns :
out : list

The removed item, or None if no unique item could be found.

Examples

See cf.Field.remove_item.

>>> d.items()
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>,
 'dim1': <CF DimensionCoordinate: grid_longitude(106) degrees>,
 'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>,
 'aux0': <CF AuxiliaryCoordinate: longitude(111, 106) degrees_E>,
 'aux1': <CF AuxiliaryCoordinate: latitude(111, 106) degrees_N>,
 'aux2': <CF AuxiliaryCoordinate: forecast_reference_time(12) days since 1997-1-1>
 'cm0': <CF CellMeasure: area(111, 106) m2>,
 'trans0': <CF Transform: rotated_latitude_longitude>}
>>> d.remove_item('grid_long')
>>> d.remove_item('aux1')
>>> d.remove_item(ctype='T')
>>> d.remove_item('longitude', role='a', exact=True)
>>> d.remove_item('rotated_latitude_longitude')
>>> d.remove_item({None: 'area', 'units': 'km2'})
>>> d.items()
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>}

Previous topic

cf.Domain.remove_axis

Next topic

cf.Domain.remove_items

This Page