cfdm.Field.cell_connectivities

Field.cell_connectivities(*identities, **filter_kwargs)[source]

Select cell connectivity constructs.

If zero or two or more constructs are selected then an exception is raised, or the default parameter is returned.

New in version (cfdm): 1.11.0.0

Note that f.cell_connectivities(*identities, **filter_kwargs) is equivalent to f.constructs.filter(filter_by_type=["cell_connectivity"], filter_by_identity=identities, **filter_kwargs).

Parameters
identities: optional

Select cell connectivity constructs that have an identity, defined by their identities methods, that matches any of the given values.

If no identities are provided then all cell connectivity constructs are selected.

A value may be any object that can match via the == operator, or a re.Pattern object that matches via its search method.

Note that in the output of a dump method or print call, a construct is always described by an identity that will select it.

filter_kwargs: optional

Keyword arguments as accepted by Constructs.filter that define additional construct selection criteria. Also to configure the returned value.

Returns

The selected constructs in a new Constructs object, unless modified by any filter_kwargs parameters. The returned object will contain no constructs if none were selected.

Examples

>>> f = cfdm.example_field(8)
>>> print(f.cell_connectivities())
Constructs:
{'cellconnectivity0': <CellConnectivity: connectivity:edge(3) >}