cf.AuxiliaryCoordinate.identities¶
-
AuxiliaryCoordinate.
identities
(generator=False, ctypes=None, **kwargs)[source]¶ Return all possible identities.
The identities comprise:
The “standard_name” property.
The “id” attribute, preceded by
'id%'
.The “cf_role” property, preceded by
'cf_role='
.The “axis” property, preceded by
'axis='
.The “long_name” property, preceded by
'long_name='
.All other properties (including “standard_name”), preceded by the property name and an
'='
.The coordinate type (
'X'
,'Y'
,'Z'
or'T'
).The netCDF variable name, preceded by
'ncvar%'
.
New in version 3.0.0.
- Parameters
- generator:
bool
, optional If True then return a generator for the identities, rather than a list. This can give improved performance if iteration through the generator can be stopped before all identities have been computed.
New in version (cfdm): 1.8.9.0
- ctypes: (sequence of)
str
If set then return the coordinate type (if any) as the first identity and restrict the possible coordinate types to be any of these characters. By default, a coordinate type is the last identity. Setting to a subset of
'XTYZ'
can give performance improvements, as it will reduce the number of coordinate types that are checked in circumstances when particular coordinate types have been ruled out a priori. If a coordinate type is omitted then it will not be in the returned identities even if the coordinate construct is of that type. Coordinate types are checked in the order given.- Parameter example:
ctypes='Y'
- Parameter example:
ctypes='XY'
- Parameter example:
ctypes=('T', 'X')
- generator:
- Returns
list
The identities.
Examples:
>>> f.properties() {'foo': 'bar', 'long_name': 'Air Temperature', 'standard_name': 'air_temperature'} >>> f.nc_get_variable() 'tas' >>> f.identities() ['air_temperature', 'long_name=Air Temperature', 'foo=bar', 'standard_name=air_temperature', 'ncvar%tas']