cf.Coordinate.identity

Coordinate.identity(default=None)[source]

Return the variable’s identity.

Returns the the first found of:

  • The standard_name CF property.
  • The id attribute.
  • If the name parameter is True, the name returned by its name method.
  • The value of the default parameter.
Parameters :
default : optional

The identity if one could not otherwise be found. By default, default is None.

name : bool, optional

If True then use the name method to find the identity if one could not otherwise be found.

Returns :
out :

The identity.

See also

name

Examples

>>> f.standard_name = 'Kelvin'
>>> f.identity()
'Kelvin'
>>> del f.standard_name
>>> f.id = 'foo'
>>> f.identity()
'foo'
>>> del f.id
>>> f.identity()
None
>>> f.identity('bar')
'bar'
>>> print f.identity()
None

Previous topic

cf.Coordinate.hasprop

Next topic

cf.Coordinate.insert_bounds

This Page