Return items of the domain.
This method has exactly the same interface, functionality and outputs as cf.Field.items. Therefore see cf.Field.items for the full documentation details.
Parameters : |
|
---|---|
Returns : |
|
See also
Examples
See cf.Field.items.
All of these examples are for the same domain, whose complete dictionary of items is shown in the first example.
>>> 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.items(axes='grid_latitude')
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>,
'aux0': <CF AuxiliaryCoordinate: longitude(111, 106) degrees_E>,
'aux1': <CF AuxiliaryCoordinate: latitude(111, 106)> degrees_N,
'cm0': <CF CellMeasure: area(111, 106) m2>}
>>> d.items(axes='grid_latitude', rank=1)
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>}
>>> d.items(axes='grid_latitude', strict_axes=True)
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>}
>>> d.items(axes='time')
{'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>,
'aux2': <CF AuxiliaryCoordinate: forecast_reference_time(12) days since 1997-1-1>}
>>> d.items(axes='time', role='d')
{'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>}
>>> d.items(axes='area')
{'aux0': <CF AuxiliaryCoordinate: longitude(111, 106) degrees_E>,
'aux1': <CF AuxiliaryCoordinate: latitude(111, 106) degrees_N>,
'cm0': <CF CellMeasure: area(111, 106) m2>}
>>> d.items(axes=['grid_latitude', 'grid_longitude'])
{'aux0': <CF AuxiliaryCoordinate: longitude(111, 106) degrees_E>,
'aux1': <CF AuxiliaryCoordinate: latitude(111, 106) degrees_N>,
'cm0': <CF CellMeasure: area(111, 106) m2>}
>>> d.items(axes=d.axes(ctype='T'))
{'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>,
'aux2': <CF AuxiliaryCoordinate: forecast_reference_time(12) days since 1997-1-1>}
>>> d.items(axes={'units': 'hrs since 1-1-1'})
{'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>,
'aux2': <CF AuxiliaryCoordinate: forecast_reference_time(12) days since 1997-1-1>}
>>> d.items(ctype='T')
{'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>,
'aux2': <CF AuxiliaryCoordinate: forecast_reference_time(12) days since 1997-1-1>}
>>> d.items('grid')
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>,
'dim1': <CF DimensionCoordinate: grid_longitude(106) degrees>}
>>> d.items('grid', exact=True)
{}
>>> d.items({'units': 'degrees_E'})
{'dim0': <CF DimensionCoordinate: grid_latitude(111) degrees>,
'dim1': <CF DimensionCoordinate: grid_longitude(106) degrees>,
'aux0': <CF AuxiliaryCoordinate: longitude(111, 106) degrees_E>,
'aux1': <CF AuxiliaryCoordinate: latitude(111, 106)> degrees_N}
>>> d.items({'units': 'degrees_E'}, exact=True)
{'aux0': <CF AuxiliaryCoordinate: longitude(111, 106) degrees_E>}
>>> d.items({'units': 'radians', 'standard_name': 'time'})
{}
>>> d.items({'units': 'radians', 'standard_name': 'time'}, maximal_match=False)
{'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}
>>> d.items({'units': 'radians', 'standard_name': 'time'}, maximal_match=False, exact=True)
{'dim2': <CF DimensionCoordinate: time(12) days since 1997-1-1>}
>>> set(d.items(role='da')) == set(d.items(role='ct', inverse=True))
True