cfdm.CellMeasure.identity¶
-
CellMeasure.
identity
(default='')[source]¶ Return the canonical identity.
By default the identity is the first found of the following:
- The measure property, preceeded by
'measure:'
. - The “standard_name” property.
- The “cf_role” property, preceeded by ‘cf_role=’.
- The “long_name” property, preceeded by ‘long_name=’.
- The netCDF variable name, preceeded by ‘ncvar%’.
- The value of the default parameter.
New in version 1.7.0.
See also
Parameters: - default: optional
If no identity can be found then return the value of the default parameter.
Returns: The identity.
Examples:
>>> c.get_measure() 'area' >>> c.properties() {'long_name': 'Area', 'standard_name': 'cell_area'} >>> c.nc_get_variable() 'areacello' >>> c.identity(default='no identity') 'measure:area' >>> c.del_measure() 'area' >>> c.identity() 'cell_area' >>> c.del_property('standard_name') 'cell_area' >>> c.identity() 'long_name=Area' >>> c.del_properly('long_name') 'Area' >>> c.identity() 'ncvar%areacello' >>> c.nc_del_variable() 'areacello' >>> c.identity() '' >>> c.identity(default='no identity') 'no identity'
- The measure property, preceeded by