Bases: cf.utils.Dict
A CF coordinate reference construct.
A coordinate reference construct relates the field’s coordinate values to locations in a planetary reference frame.
The coordinate reference object is associated with a coordinate system and contains links to the dimension or auxiliary coordinate constructs to which it applies; and any additional terms, such as parameter values and field objects which define a datum and coordinate conversion, i.e. a formula for converting coordinate values taken from the dimension or auxiliary coordinate objects to a different coordinate system.
Accessing terms
The coordinate reference object behaves like a dictionary when it comes to accessing its terms and their values: For example:
>>> c = cf.CoordinateReference('azimuthal_equidistant',
... longitude_of_projection_origin=80.5,
... latitude_of_projection_origin=5,
... false_easting=cf.Data(-200, 'km'),
... false_northing=cf.Data(-100, 'km'))
>>> c.keys()
['false_easting',
'latitude_of_projection_origin',
'false_northing',
'longitude_of_projection_origin']
>>> c.items()
[('false_easting', <CF Data: -200 km>),
('latitude_of_projection_origin', 5),
('false_northing', <CF Data: -100 km>),
('longitude_of_projection_origin', 80.5)]
>>> c['latitude_of_projection_origin']
5
>>> c['latitude_of_projection_origin'] = -75.25
>>> c['latitude_of_projection_origin']
-75.25
Attributes
Attribute | Description |
---|---|
name | The identity of the coordinate reference. |
type | The CF type of the coordinate reference. |
coords | The identities of the dimension and auxiliary coordinate objects of the which apply to this coordinate reference. |
coord_terms | The terms of the coordinate conversion which refer to dimension or auxiliary coordinate objects. |
Initialization
Parameters: |
|
---|
change_coord | Change a link to a dimension or auxiliary coordinate object. |
close | Close all files referenced by coordinate conversion term values. |
dump | Return a string containing a full description of the coordinate reference. |
equals | True if two instances are equal, False otherwise. |
equivalent | True if two coordinate references are logically equal, False otherwise. |
identity | Return the identity of the coordinate reference. |
match | Test whether or not the coordinate reference satisfies the given conditions. |
remove_all_coords | Remove all links to coordinate objects. |
set | |
setcoord |
canonical_units | Return the canonical units for a standard CF coordinate conversion term. |
default_value | Return the default value for an unset standard CF coordinate conversion term. |