cf.FieldList.select_field

FieldList.select_field(description=None, items=None, rank=None, ndim=None, exact=False, match_and=True, inverse=False)[source]

Return the unique field that satisfies the given conditions.

fl.select_field(**kwargs) is equivalent to fl.select(**kwargs)[0] with an exception being raised if the select call returns a field list containing zero or two or more fields.

New in version 2.0.3.

Returns:
out: cf.Field

The unique matching field.