Bases: cf.utils.Dict
A CF transform construct.
A transform construct defines a mapping from one set of coordinates which can not geo-locate the field construct’s data to another set of coordinates that can geo-locate the field construct’s data.
Transform constructs correspond to the functions of the CF-netCDF attributes formula_terms, which describes how to compute a vertical auxiliary coordinate variable from components and grid_mapping, which describes how to compute true latitude and longitude auxiliary coordinate variables from horizontal projection dimension coordinates, or describes the figure of earth for true latitude and longitude coordinate variables.
A transform is a dictionary-like object for which each key/value pair comprises the name of a term of the transform and its corresponding variable. A term that is omitted is assumed to be zero.
The each variable is one of the following:
Variable | Notes |
---|---|
Pointer to coordinate | A domain’s coordinate identifier; or a coordinate’s identity, as a defined by the coordinate’s identity method. |
Python numeric scalar | |
cf.Data | Must have an array size of 1 |
cf.Field | |
None | Indicates that the term is unset. Note that this is different than the term being missing, as in this case there is no assumption of a value of zero. |
Attributes
Attribute | Type | Description |
---|---|---|
coordinates | set | A set of pointers to coordinates (may be empty) |
grid_mapping | bool | True if and only if the transform is a grid_mapping |
name | str | The identity of the transform (such as 'ocean_sigma_coordinate' or 'rotated_latitude_longitude') |
Examples
>>> t
<CF Transform: rotated_latitude_longitude>
>>> print t.dump()
Transform: rotated_latitude_longitude
grid_north_pole_latitude = 38.0
grid_north_pole_longitude = 190.0
>>> print t.dump()
Transform: atmosphere_hybrid_height_coordinate
a = 'aux0'
b = 'aux1'
orog = <CF Field: surface_altitude(grid_longitude(96), grid_latitude(73)) m>
Initialization
Parameters : |
|
---|
Examples
>>> t = cf.Transform(grid_mapping_name='rotated_latitude_longitude',
... grid_north_pole_latitude=38.0,
... grid_north_pole_longitude=190)
>>> t = cf.Transform(standard_name='atmosphere_ln_pressure_coordinate',
... p0=1000, lev='dim1',
>>> t = cf.Transform(standard_name='atmosphere_ln_pressure_coordinate',
... p0=cf.Data(100000, 'Pa'),
... lev='atmosphere_ln_pressure_coordinate')
close | Close all files referenced by transform values. |
copy | Return a deep copy. |
dump | Return a string containing a full description of the transform. |
equals | True if two instances are equal, False otherwise. |
equivalent | True if two transforms are logically equal, False otherwise. |
identity | Return the identity of the transform. |
match | Test whether or not the transform satisfies the given conditions. |
remove_all_pointers | Remove all all pointers to coordinates. |
remove_pointer | Remove a pointer to a coordinate. |
rename_pointer | Rename a coordinate pointer. |