Bases: cf.utils.CfDict
A CF space object defining a space’s dimensionality, coordinates, cell measures and transformations in a dictionary-like object. Refer to the Space structure section of the cf module for details.
Parameters: |
|
---|
Overloaded operators
The in (set membership) operator is overloaded to use numerically tolerant equality.
Special attributes:
Attribute | Description |
---|---|
dimension_sizes | The size of each dimension. |
dimensions | The dimensions belonging to each space component. |
nc_dimensions | The netCDF dimension name for each dimension in the dimension_sizes attribute. If present when the space is written to a netCDF file, then used for output netCDF dimension names. |
transform | A dictionary of Transform objects. |
Methods and attributes defined here:
Find a coordinate of the space by name. Refer to cf.Field.coord for details.
CFD.copy() -> a deep copy of CFD
Return a string containing a full description of the space.
Parameters: |
|
---|---|
Returns: | A string containing the description of the space. |
See also
Return True if two instances are congruent in that
- For each group of space component types (dimension coordinate, auxiliary coordinate, cell measures, etc.) there are an equal number of keys and each key’s value equals a value in the other space. Note that within a group of component types, the key names need not be the same.
- Each dimension in one space has an equally sized dimension in the other space.
- The unordered set of transforms in one space equals that of the other space. Noe that The keys of the transform attribute dictionary need not be the same.
Equality of numbers is to within a tolerance. Refer to cf for details.
Parameters: |
|
---|---|
Returns: | True if the two objects are congruent, False otherwise. |
Return a list of the cf dictionary’s key names which match the given regular expression.
Parameters: | regex (str) – Optional. The regular expression with which to identify key names. |
---|---|
Returns: | A list of keys names. |
Examples:
>>> d.keys()
['dim2', 'dim0', 'dim1', 'aux0', 'cm0']
>>> d.get_keys()
['dim2', 'dim0', 'dim1', 'aux0', 'cm0']
>>> d.get_keys('dim')
['dim2', 'dim0', 'dim1']
>>> d.get_keys('^aux|^dim')
['dim2', 'dim0', 'dim1', 'aux0']
>>> d.get_keys('dim[123]')
['dim2', 'dim1']
CFD.has_key(k) -> True if CFD has a key k, else False