cf.Domain.remove_item

Domain.remove_item(items=None, key=False, **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:
items, kwargs
: optional

See cf.Field.remove_item.

Returns:
out
:

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>
 'msr0': <CF CellMeasure: area(111, 106) m2>,
 'ref0': <CF CoordinateReference: rotated_latitude_longitude>}
>>> d.remove_item('grid_long')
>>> d.remove_item('aux1')
>>> d.remove_item('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>}