cfdm.FieldAncillary.identities

FieldAncillary.identities(generator=False, **kwargs)[source]

Return all possible identities.

The identities comprise:

  • The standard_name property.

  • All properties, preceded by the property name and an equals e.g. 'long_name=Air temperature'.

  • The netCDF variable name, preceded by 'ncvar%'.

New in version (cfdm): 1.7.0

See also

identity

Parameters
generator: bool, optional

If True then return a generator for the identities, rather than a list.

New in version (cfdm): 1.8.9.0

kwargs: optional

Additional configuration parameters that may be used by subclasses.

New in version (cfdm): 1.8.9.0

Returns
list or generator

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']
>>> for i in f.identities(generator=True):
...     print(i)
...
air_temperature
long_name=Air Temperature
foo=bar
standard_name=air_temperature
ncvar%tas