cf.CoordinateReference¶

class
cf.
CoordinateReference
(coordinates=None, datum=None, coordinate_conversion=None, source=None, copy=True)[source]¶ Bases:
cfdm.coordinatereference.CoordinateReference
A coordinate reference construct of the CF data model.
A coordinate reference construct relates the coordinate values of the coordinate system to locations in a planetary reference frame.
The domain of a field construct may contain various coordinate systems, each of which is constructed from a subset of the dimension and auxiliary coordinate constructs. For example, the domain of a fourdimensional field construct may contain horizontal (yx), vertical (z), and temporal (t) coordinate systems. There may be more than one of each of these, if there is more than one coordinate construct applying to a particular spatiotemporal dimension (for example, there could be both latitudelongitude and yx projection coordinate systems). In general, a coordinate system may be constructed implicitly from any subset of the coordinate constructs, yet a coordinate construct does not need to be explicitly or exclusively associated with any coordinate system.
A coordinate system of the field construct can be explicitly defined by a coordinate reference construct which relates the coordinate values of the coordinate system to locations in a planetary reference frame and consists of the following:
References to the dimension coordinate and auxiliary coordinate constructs that define the coordinate system to which the coordinate reference construct applies. Note that the coordinate values are not relevant to the coordinate reference construct, only their properties.
A definition of a datum specifying the zeroes of the dimension and auxiliary coordinate constructs which define the coordinate system. The datum may be implied by the metadata of the referenced dimension and auxiliary coordinate constructs, or explicitly provided.
A coordinate conversion, which defines a formula for converting coordinate values taken from the dimension or auxiliary coordinate constructs to a different coordinate system. A coordinate reference construct relates the coordinate values of the field to locations in a planetary reference frame.
NetCDF interface
The netCDF grid mapping variable name of a coordinate reference construct may be accessed with the
nc_set_variable
,nc_get_variable
,nc_del_variable
andnc_has_variable
methods.Initialisation
 Parameters
 coordinates: sequence of
str
, optional Identify the related dimension and auxiliary coordinate constructs by their construct identifiers.
The coordinates may also be set after initialisation with the
set_coordinates
andset_coordinate
methods. Parameter example:
coordinates=['dimensioncoordinate2']
 Parameter example:
coordinates=('dimensioncoordinate0', 'dimensioncoordinate1')
 datum:
Datum
, optional Set the datum component of the coordinate reference construct.
The datum may also be set after initialisation with the
set_datum
method. coordinate_conversion:
CoordinateConversion
, optional Set the coordinate conversion component of the coordinate reference construct.
The coordinate conversion may also be set after initialisation with the
set_coordinate_conversion
method. source: optional
Convert source, which can be any type of object, to a
CoordinateReference
instance.All other parameters, apart from copy, are ignored and their values are instead inferred from source by assuming that it has the
CoordinateReference
API. Any parameters that can not be retrieved from source in this way are assumed to have their default value.Note that if
x
is also aCoordinateReference
instance thencf.CoordinateReference(source=x)
is equivalent tox.copy()
. copy:
bool
, optional If True (the default) then deep copy the input parameters prior to initialisation. By default the parameters are not deep copied.
 coordinates: sequence of
Inspection¶
Methods
A full description of the coordinate reference construct. 

Return the canonical identity. 

Returns all possible identities. 
Attributes
Return a description of the construct type. 
Dictionaryaccess methods¶
Methods
Return a parameter value of the datum or the coordinate conversion. 

Return a parameter value of the datum or the coordinate conversion. 
Selection¶
Methods
Determine whether or not one of the identities matches. 
Coordinates¶
Methods
Remove a reference to a coordinate construct. 

Whether a reference to a coordinate construct has been set. 

Set a reference to a coordinate construct. 

Return all references to coordinate constructs. 

Remove all references to coordinate constructs. 

Set references to coordinate constructs. 
Datum¶
Methods
Remove the datum component. 

Return the datum component. 

Set the datum component. 
Attributes
Return the datum component. 
Coordinate conversion¶
Methods
Remove the coordinate conversion component. 

Get the coordinate conversion component. 

Set the coordinate conversion component. 
Attributes
Return the coordinate conversion component. 
Miscellaneous¶
Methods
Return the canonical units for a standard CF coordinate conversion term. 

Change the identifiers of a coordinate reference from a mapping. 

Close all files referenced by coordinate conversion term values. 

Return a deep copy. 

Returns the commands to create the coordinate reference. 

Return the default value for an unset standard CF coordinate conversion term. 

Whether two coordinate reference constructs are the same. 

True if two coordinate references are logically equal, False otherwise. 

The names of files containing the original data and metadata. 

Returns False since coordinate reference constructs do not have cell bounds. 

False. 

Inspect the attributes. 

Return the structural signature of a coordinate reference. 
NetCDF¶
Methods
Remove the netCDF variable name. 

Return the netCDF variable name. 

Whether the netCDF variable name has been set. 

Set the netCDF variable name. 
Aliases¶
Methods
Alias for 
Groups¶
Methods
Return the netCDF variable group hierarchy. 

Set the netCDF variable group hierarchy. 

Remove the netCDF variable group hierarchy. 
Special¶
Methods
Called by the 

Called by the 

Called by the 
Deprecated¶
Methods
Deprecated at version 3.0.0. 

Deprecated at version 3.0.0. 

Deprecated at version 3.0.0. 

Return a name. 

Deprecated at version 3.0.0. 

Deprecated at version 3.0.0. 