cf.Constructs.filter_by_ncvar¶
-
Constructs.
filter_by_ncvar
(*ncvars)[source]¶ Select domain axis constructs by netCDF variable name.
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_identity
,filter_by_ncdim
,filter_by_property
,filter_by_type
,filters_applied
,inverse_filter
,unfilter
Parameters: - ncvars: optional
Select constructs that have any of the given netCDF variable names.
A netCDF variable name is specified by a string (e.g.
'time'
); or a compiled regular expression (e.g.re.compile('^lat')
), for which all constructs whose netCDF variable names match (viare.search
) are selected.If no netCDF variable names are provided then all constructs that do or could have a netCDF variable name, with any value, are selected.
Returns: Constructs
The selected constructs and their construct keys.
Examples:
Select the constructs with netCDF variable name ‘time’:
>>> d = c.filter_by_ncvar('time')
Select the constructs with netCDF variable name ‘time’ or ‘lat’:
>>> d = c.filter_by_ncvar('time', 'lat')