cf.FieldList.select_by_ncvar¶
-
FieldList.select_by_ncvar(*rank)[source]¶ Select field constructs by netCDF variable name.
To find the inverse of the selection, use a list comprehension with
match_by_ncvarmethod of the field constucts. For example, to select all field constructs which do not have a netCDF name of ‘tas’:>>> gl = cf.FieldList(f for f in fl if not f.match_by_ncvar('tas'))
New in version 3.0.0.
See also
select,select_by_identity,select_by_construct,select_by_naxes,select_by_rank,select_by_unitsParameters: - ncvars: optional
Select field constructs. May be one or more:
- The netCDF name of a field construct.
A field construct is selected if it matches any of the given names.
A netCDF variable name is specified by a string (e.g.
'tas', etc.); aQueryobject (e.g.cf.eq('tas')); or a compiled regular expression (e.g.re.compile('^air_')) that selects the field constructs whose netCDF variable names match viare.search.If no netCDF variable names are provided then all field are selected.
Returns: FieldListThe matching field constructs.
Examples:
TODO