cf.CoordinateReference.identities

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

Returns all possible identities.

The identities comprise:

  • The standard_name coordinate conversion parameter, preceded by 'standard_name:'.

  • The grid_mapping_name coordinate conversion parameter, preceded by 'grid_mapping_name:'.

  • The netCDF variable name (corresponding to a netCDF grid mapping variable), 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 = cf.example_field(1)
>>> c = f.get_construct('coordinatereference0')
>>> c.identities()
['standard_name:atmosphere_hybrid_height_coordinate']
>>> c = f.get_construct('coordinatereference1')
>>> c.identities()
['grid_mapping_name:rotated_latitude_longitude',
 'ncvar%rotated_latitude_longitude']
>>> for i in c.identities(generator=True):
...     print(i)
...
grid_mapping_name:rotated_latitude_longitude
ncvar%rotated_latitude_longitude
>>> c = cf.CoordinateReference()
>>> c.identities()
[]