cfdm.CoordinateReference.identity¶
-
CoordinateReference.
identity
(default='')[source]¶ Return the canonical identity.
By default the identity is the first found of the following:
The
standard_name
coordinate conversion parameter, preceded by'standard_name:'
.The
grid_mapping_name
coordinate conversion parameter, preceded by'grid_mapping_name:'
.The netCDF variable name (corresponding to a netCDF grid mapping variable), preceded by
'ncvar%'
.The value of the default parameter.
New in version (cfdm): 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
>>> f = cfdm.example_field(1) >>> c = f.get_construct('coordinatereference0') >>> c.identity() 'standard_name:atmosphere_hybrid_height_coordinate'
>>> c = f.get_construct('coordinatereference1') >>> c.identity() 'grid_mapping_name:rotated_latitude_longitude'
>>> c = cfdm.CoordinateReference() >>> c.identity() '' >>> c.identity(default='no identity') 'no identity'