cf.Domain.cell_measures

Domain.cell_measures(dim=None)[source]

Return a dictionary whose values are the cell measures which span the given dimension and keys of the cell measure identifiers.

Parameters :
dim : str, optional

The identifier of the dimension to be spanned. By default all dimensions are considered (so all cell measures are returned).

Returns :
out : dict

The cell measures and their identifiers.

Examples

>>> d.dimensions
{'data': ['dim0', 'dim1', 'dim2'],
 'dim0': ['dim0'],
 'dim1': ['dim1'],
 'dim2': ['dim2'],
 'cm0' : ['dim1', 'dim2'],
 'cm1' : ['dim1', 'dim2', 'dim3']}
>>> d.cell_measures()
{'cm0': <CF CellMeasure: ...>,
 'cm1': <CF CellMeasure: ...>}
>>> d.cell_measures('dim3')
{'cm1': <CF CellMeasure: ...>}
>>> d.cell_measures('dim0')
{}

Previous topic

cf.Domain.aux_coords

Next topic

cf.Domain.clear

This Page