cf.Constructs.filter_by_type¶
-
Constructs.
filter_by_type
(*types)[source]¶ Select metadata constructs by type.
New in version 1.7.0.
See also
filter_by_axis
,filter_by_data
,filter_by_key
,filter_by_measure
,filter_by_method
,filter_by_naxes
,filter_by_ncdim
,filter_by_ncvar
,filter_by_identity
,filter_by_property
,filters_applied
,inverse_filter
,unfilter
Parameters: - types: optional
Select constructs that have are of any of the given types.
A type is specified by one of the following strings:
type Construct selected 'domain_ancillary'
Domain ancillary constructs 'dimension_coordinate'
Dimension coordinate constructs 'domain_axis'
Domain axis constructs 'auxiliary_coordinate'
Auxiliary coordinate constructs 'cell_measure'
Cell measure constructs 'coordinate_reference'
Coordinate reference constructs 'cell_method'
Cell method constructs 'field_ancillary'
Field ancillary constructs If no types are provided then all constructs are selected.
Returns: Constructs
The selected constructs and their construct keys.
Examples:
Select dimension coordinate constructs:
>>> d = c.filter_by_type('dimension_coordinate')
Select dimension coordinate and field ancillary constructs:
>>> d = c.filter_by_type('dimension_coordinate', 'field_ancillary')