cf.Field.identity

Field.identity(default=None)

Return the variable’s identity.

The idendity 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 nor id attributes 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'

Previous topic

cf.Field.hasprop

Next topic

cf.Field.indices

This Page