cf.Domain.item¶
-
Domain.
item
(items=None, key=False, **kwargs)[source]¶ Return an item of the domain, or its domain identifier.
This method has exactly the same interface, functionality and outputs as
cf.Field.item
. Therefore seecf.Field.item
for the full documentation details.See also
Parameters: - items, kwargs : optional
See
cf.Field.item
.- key : bool, option
See
cf.Field.item
.
Returns: - out :
See
cf.Field.item
.
Examples: See
cf.Field.items
.The following examples are base on the following domain:
>>> d.items() {'dim0': <CF DimensionCoordinate: grid_latitude(73) 'dim1': <CF DimensionCoordinate: grid_longitude(96)>, 'dim2': <CF DimensionCoordinate: time(12)>, 'aux0': <CF AuxiliaryCoordinate: latitude(73, 96)>, 'aux1': <CF AuxiliaryCoordinate: longitude(73, 96)>, 'msr0': <CF CellMeasure: area(96, 73)>, 'ref0': <CF CoordinateReference: rotated_latitude_longitude>}
>>> d.item('longitude') <CF DimensionCoordinate: longitude(360)> >>> d.item('long') <CF DimensionCoordinate: longitude(360)> >>> d.item('long', key=True) 'dim2'
>>> d.item('lon', exact=True) None >>> d.item('longitude', exact=True) <CF DimensionCoordinate: longitude(360)>
>>> d.item('msr0') <CF CellMeasure: area(96, 73)>
>>> d.item({'units': 'degrees'}) None >>> d.item({'units': 'degreeN'}) <CF AuxiliaryCoordinate: latitude(73, 96)>
>>> d.item(axes='time') <CF DimensionCoordinate: time(12)> >>> d.item(axes='grid_latitude') None >>> d.item(axes='grid_latitude', strict_axes=True) <CF DimensionCoordinate: grid_latitude(73) >>> d.item(axes='grid_longitude', ndim=1, key=True) 'dim1'