cf.Field.del_coordinate_reference¶
-
Field.
del_coordinate_reference
(identity=None, construct=None, default=ValueError())[source]¶ Remove a coordinate reference construct and all of its domain ancillary constructs.
New in version 3.0.0.
See also
- Parameters
- identity: optional
Select the coordinate reference construct by one of:
The identity of a coordinate reference construct.
A construct has a number of string-valued identities
defined by its
identities
method, and is selected if any of them match the identity parameter. identity may be a string that equals one of a construct’s identities; or are.Pattern
object that matches one of a construct’s identities viare.search
.Note that in the output of a
dump
method orprint
call, a metadata construct is always described by one of its identities, and so this description may always be used as an identity value.The key of a coordinate reference construct
None
. This is the default, which selects the coordinate reference construct when there is only one of them.
- Parameter example:
identity='standard_name:atmosphere_hybrid_height_coordinate'
- Parameter example:
identity='grid_mapping_name:rotated_latitude_longitude'
- Parameter example:
identity='transverse_mercator'
- Parameter example:
identity='coordinatereference1'
- Parameter example:
identity='key%coordinatereference1'
- Parameter example:
identity='ncvar%lat_lon'
- Parameter example:
identity=cf.eq('rotated_pole')'
- Parameter example:
identity=re.compile('^rotated')
- construct: optional
TODO
- default: optional
Return the value of the default parameter if the construct can not be removed, or does not exist.
If set to an
Exception
instance then it will be
raised instead.
- Returns
The removed coordinate reference construct.
Examples:
>>> f.del_coordinate_reference('rotated_latitude_longitude') <CF CoordinateReference: rotated_latitude_longitude>