cf.CoordinateReference.identity

CoordinateReference.identity(default='')[source]

Return the canonical identity.

By default the identity is the first found of the following:

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

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

  • The netCDF variable name (corresponding to a netCDF grid mapping variable), preceeded by 'ncvar%'.

  • The value of the default parameter.

New in version 1.7.0.

See also

identities

Parameters
default: optional

If no identity can be found then return the value of the default parameter.

Returns

The identity.

Examples:

>>> c.identity()
'standard_name:atmosphere_ln_pressure_coordinate'
>>> c.identity()
'grid_mapping_name:lambert_azimuthal_equal_area'
>>> c.identity()
'ncvar%rotated_pole'
>>> c.identity()
''
>>> c.identity(default='no identity')
'no identity'