cf.AncillaryVariables.select

AncillaryVariables.select(*args, **kwargs)[source]

Return fields which satisfy the given conditions.

The conditions given by the arguments are transferred to each field’s match method to see if the field passes the tests.

fl.select(*args, **kwargs) is equivalent to cf.FieldList(f for f in fl if f.match(*args, **kwargs)).

See cf.Field.match for details.

Parameters :
args, kwargs : optional

See cf.Field.match.

Returns :
out : cf.FieldList

The selected fields. The field list may be empty.

Examples

Select fields whose identities are exactly 'air_temperature':

>>> f.select('air_temperature', exact=True)

See cf.Field.match for further examples.

Previous topic

cf.AncillaryVariables.reverse

Next topic

cf.AncillaryVariables.set_equals

This Page