iris.experimental.ugrid.cf#
Extensions to Iris’ CF variable representation to represent CF UGrid variables.
Eventual destination: iris.fileformats.cf.
- class iris.experimental.ugrid.cf.CFUGridAuxiliaryCoordinateVariable(name, data)[source]#
Bases:
CFVariableA CF-UGRID auxiliary coordinate variable.
A CF-UGRID auxiliary coordinate variable is a CF-netCDF auxiliary coordinate variable representing the element (node/edge/face/volume) locations (latitude, longitude or other spatial coordinates, and optional elevation or other coordinates). These auxiliary coordinate variables will have length n-elements.
For elements other than nodes, these auxiliary coordinate variables may have in turn a
boundsattribute that specifies the bounding coordinates of the element (thereby duplicating the data in thenode_coordinatesvariables).Identified by the CF-netCDF variable attribute
node_/edge_/face_/volume_coordinates.See also
The UGRID Conventions, https://ugrid-conventions.github.io/ugrid-conventions/
- cf_identities = ['node_coordinates', 'edge_coordinates', 'face_coordinates', 'volume_coordinates']#
- cf_identity = NotImplemented#
Name of the netCDF variable attribute that identifies this CF-netCDF variable.
- classmethod identify(variables, ignore=None, target=None, warn=True)[source]#
Identify all variables that match the criterion for this CF-netCDF variable class.
- Parameters:
variables – Dictionary of netCDF4.Variable instance by variable name.
ignore (optional, default=None) – List of variable names to ignore.
target (optional, default=None) – Name of a single variable to check.
warn (optional, default=None) – Issue a warning if a missing variable is referenced.
- Return type:
Dictionary of CFVariable instance by variable name.
- class iris.experimental.ugrid.cf.CFUGridConnectivityVariable(name, data)[source]#
Bases:
CFVariableA CF_UGRID connectivity variable.
A CF_UGRID connectivity variable points to an index variable identifying for every element (edge/face/volume) the indices of its corner nodes. The connectivity array will thus be a matrix of size n-elements x n-corners. For the indexing one may use either 0- or 1-based indexing; the convention used should be specified using a
start_indexattribute to the index variable.For face elements: the corner nodes should be specified in anticlockwise direction as viewed from above. For volume elements: use the additional attribute
volume_shape_typewhich points to a flag variable that specifies for every volume its shape.Identified by a CF-netCDF variable attribute equal to any one of the values in
UGRID_CF_ROLES.See also
The UGRID Conventions, https://ugrid-conventions.github.io/ugrid-conventions/
- cf_identities = ['edge_node_connectivity', 'face_node_connectivity', 'face_edge_connectivity', 'face_face_connectivity', 'edge_face_connectivity', 'boundary_node_connectivity', 'volume_node_connectivity', 'volume_edge_connectivity', 'volume_face_connectivity', 'volume_volume_connectivity']#
- cf_identity = NotImplemented#
Name of the netCDF variable attribute that identifies this CF-netCDF variable.
- classmethod identify(variables, ignore=None, target=None, warn=True)[source]#
Identify all variables that match the criterion for this CF-netCDF variable class.
- Parameters:
variables – Dictionary of netCDF4.Variable instance by variable name.
ignore (optional, default=None) – List of variable names to ignore.
target (optional, default=None) – Name of a single variable to check.
warn (optional, default=None) – Issue a warning if a missing variable is referenced.
- Return type:
Dictionary of CFVariable instance by variable name.
- class iris.experimental.ugrid.cf.CFUGridGroup[source]#
Bases:
CFGroupRepresents a collection of CF Metadata Conventions variables and netCDF global attributes.
Represents a collection of ‘NetCDF Climate and Forecast (CF) Metadata Conventions’ variables and netCDF global attributes.
Specialisation of
CFGroupthat includes extra collections for CF-UGRID-specific variable types.- property connectivities#
Collection of CF-UGRID connectivity variables.
- property meshes#
Collection of CF-UGRID mesh variables.
- property non_data_variable_names#
setof names of the CF-netCDF/CF-UGRID variables that are not the data pay-load.
- property ugrid_coords#
Collection of CF-UGRID-relevant auxiliary coordinate variables.
- class iris.experimental.ugrid.cf.CFUGridMeshVariable(name, data)[source]#
Bases:
CFVariableA CF-UGRID mesh variable is a dummy variable for storing topology information as attributes.
A CF-UGRID mesh variable is a dummy variable for storing topology information as attributes. The mesh variable has the
cf_role‘mesh_topology’.The UGRID conventions describe define the mesh topology as the interconnection of various geometrical elements of the mesh. The pure interconnectivity is independent of georeferencing the individual geometrical elements, but for the practical applications for which the UGRID CF extension is defined, coordinate data will always be added.
Identified by the CF-netCDF variable attribute ‘mesh’.
See also
The UGRID Conventions, https://ugrid-conventions.github.io/ugrid-conventions/
- cf_identity = 'mesh'#
Name of the netCDF variable attribute that identifies this CF-netCDF variable.
- classmethod identify(variables, ignore=None, target=None, warn=True)[source]#
Identify all variables that match the criterion for this CF-netCDF variable class.
- Parameters:
variables – Dictionary of netCDF4.Variable instance by variable name.
ignore (optional, default=None) – List of variable names to ignore.
target (optional, default=None) – Name of a single variable to check.
warn (optional, default=None) – Issue a warning if a missing variable is referenced.
- Return type:
Dictionary of CFVariable instance by variable name.
- class iris.experimental.ugrid.cf.CFUGridReader(file_source, warn=False, monotonic=False)[source]#
Bases:
CFReaderAllows the contents of a netCDF file to be.
This class allows the contents of a netCDF file to be interpreted according to the ‘NetCDF Climate and Forecast (CF) Metadata Conventions’.
Specialisation of
CFReaderthat can also handle CF-UGRID-specific variable types.- CFGroup#
alias of
CFUGridGroup