cf.Field.identity

Field.identity(default=None)[source]

Return the variable’s identity.

Returns the the first found of:

  • The standard_name CF property.
  • The id attribute.
  • The value of the default parameter.

See also

name

Parameters:
default : optional

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

Returns:
out :

The identity.

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

Previous topic

cf.Field.hasprop

Next topic

cf.Field.indices

This Page