cf.DimensionCoordinate.identity

DimensionCoordinate.identity(default=None)[source]

Return the variable’s identity.

The identity is the value of the standard_name property or, if that does not exist, the id attribute.

Parameters :
default : optional

If neither the standard_name property nor id attribute exist then return default. By default, default is None.

Returns :
out :

The identity.

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'
>>> f.identity()
None

Previous topic

cf.DimensionCoordinate.hasprop

Next topic

cf.DimensionCoordinate.insert_bounds

This Page