You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Introduction.

This page describes a proposal for storing unstructured model data in a netCDF file. Our focus is on data for environmental applications and hence we have tried to be consistent with CF-conventions whenever possible. In its most basic form unstructured data may be stored as data defined at a series of points, the CF-conventions are then sufficient. However, it is often useful or even necessary to also know the topology of the underlying unstructured mesh: is it a 1D network, a 2D triangular mesh or more flexible mixed triangle/quadrilateral mesh, a 2D mesh with vertical layers, or a fully unstructured 3D mesh. Therefore, the following description describes also attribute conventions for storing the mesh topology and for associating variables with the mesh topology. The conventions have been designed to store the output data of a combined 1D-2D-3D flow model with staggered data, but the meta-data for a simple 1D network or 2D triangular mesh doesn't suffer from the genericity needed for the most complex models.

Due to the wide variety in unstructured mesh models, some relevant concepts have not yet been worked out in detail. This includes the following concepts:

  • adaptive mesh topology (this could be supported by defining a time_concatenation attribute for a time-series of mesh topologies)
  • 3D fully unstructured meshes (this can be defined analogous to the conventions for 2D mixed element topologies)
  • higher order element data locations (the locations attribute allows for more locations; connectivity definition may require extension of the conventions)

More details can be found in the various sections below:

Topology.

1D network topology.

The topology information is stored as attributes to a dummy variable (in the example below called "Mesh1"); the first attributes are dimensionality and locations. The value of the dimensionality attribute should be integer 1 for a 1D network. The value of the locations attribute is a string with a blank separated, extendable list of location names. Initially these locations have a purely topological meaning, but they may be used to define additional numerical stagger positions too. The names are not formally standardized, but the names "node" and "edge" are recommended for the 1D network geometry. For each location name X, there will be a further attribute composed of the concatenation of the name X and '_coordinates'. For example, the location name "edge" points to an attribute edge_coordinates. These coordinates attributes follow the CF-conventions, i.e. they point to the variables that contain the latitude and longitude (or other coordinate) variables that contain the coordinate data for that particular location. From these attributes it's still not clear what the exact network topology is. Therefore, we need one more attribute that specifies the connectivity of the locations. The attribute edge_node_connectivity is composed of the location names "edge" and "node" and the word 'connectivity'. It tells us:

1. that the location "edge" corresponds to the edges/links of the 1D network.
2. that the location "node" corresponds to the nodes/points of the 1D network.
3. that "Mesh1_edge_nodes" (the value of edge_node_connectivity) is the variable that defines each edge by means of its two end points.

Consistent with the CF-conventions compression option, the connectivity indices are 0-based, i.e. if the Mesh1_edge_nodes array contains values 0 and 1 then this means that that edge connects the first two points.

Example:

dimensions:  
        nMesh1_node = 3 ;
        nMesh1_edge = 2 ;
        Two = 2;

variables:  
// Mesh coordinates
        double Mesh1_node_x(nMesh1_node) ;  
                Mesh1_node_x:standard_name = "longitude" ;  
                Mesh1_node_x:long_name = "Longitude of 1D network nodes." ;  
                Mesh1_node_x:units = "degrees_east" ;  
        double Mesh1_node_y(nMesh1_node) ;  
                Mesh1_node_y:standard_name = "latitude" ;  
                Mesh1_node_y:long_name = "Latitude of 1D network nodes." ;
                Mesh1_node_y:units = "degrees_north" ;  
        double Mesh1_edge_x(nMesh1_edge) ;  
                Mesh1_edge_x:standard_name = "longitude" ;  
                Mesh1_edge_x:long_name = "Characteristic longitude of 1D network edge (e.g. center coordinate of the link)." ;  
                Mesh1_edge_x:units = "degrees_east" ;  
        double Mesh1_edge_y(nMesh1_edge) ;  
                Mesh1_edge_y:standard_name = "latitude" ;  
                Mesh1_edge_y:long_name = "Characteristic latitude of 1D network edge (e.g. center coordinate of the link)." ;  
                Mesh1_edge_y:units = "degrees_north" ;  

// Mesh topology
        integer Mesh1_edge_nodes(nMesh1_edge, Two) ;  
                Mesh1_edge_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh1_edge_nodes:long_name = "Maps every edge/link to the two nodes that it connects." ;  
        integer Mesh1 ; 
                Mesh1:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh1:long_name = "Topology data of 1D network" ;
                Mesh1:dimensionality = 1 ;
                Mesh1:locations = "edge node" ;
                Mesh1:node_coordinates = "Mesh1_node_x Mesh1_node_y" ;
                Mesh1:edge_coordinates = "Mesh1_edge_x Mesh1_edge_y" ;
                Mesh1:edge_node_connectivity = "Mesh1_edge_nodes" ;

2D triangular mesh topology.

The topology information is stored as attributes to a dummy variable (in the example below called "Mesh2"); the first attributes are dimensionality and locations. The value of the dimensionality attribute should be integer 2 for a 2D (triangular) mesh. The value of the locations attribute is a string with a blank separated, extendable list of location names. Initially these locations have a purely topological meaning, but they may be used to define additional numerical stagger positions too. The names are not formally standardized, but the names "node", "edge" and "face" are recommended for the 2D mesh geometry. For each location name X, there will be a further attribute composed of the concatenation of the name X and '_coordinates'. For example, the location name "face" points to an attribute face_coordinates. These coordinates attributes follow the CF-conventions, i.e. they point to the variables that contain the latitude and longitude (or other coordinate) variables that contain the coordinate data for that particular location. From these attributes it's still not clear what the exact mesh topology is. Therefore, we need two more attributes that specify the connectivity of the locations. The attributes face_node_connectivity and edge_node_connectivity are composed of two location names and the word 'connectivity'. They tell us:

1. that the location "node" corresponds to the nodes/points of the 2D triangular mesh.
2. that the location "edge" corresponds to the edges of the 2D triangular mesh (the second dimension of the variable it points to is 2).
3. that the location "face" corresponds to the triangles of the 2D triangular mesh (the second dimension of the variable it points to is larger than 2).
4. that this is a triangular mesh since the second dimension of the variable that face_node_connectivity points to is 3.
5. that "Mesh2_edge_nodes" (the value of edge_node_connectivity) is the variable that defines each edge by means of its end points.
6. that "Mesh2_face_nodes" (the value of face_node_connectivity) is the variable that defines each triangular face by means of its three corners.

Consistent with the CF-conventions compression option, the connectivity indices are 0-based, i.e. if the "Mesh2_edge_nodes" array contains values 0 and 1 then this means that that edge connects the first two points. The example includes an optional face_connectivity attribute that specifies which triangular faces are neighbors.

Example:

dimensions:  
        nMesh2_node = 4 ;
        nMesh2_edge = 5 ;
        nMesh2_face = 2 ;
        nMesh2_face_links = 1;

        Two = 2;
        Tri = 3;

variables:  
// Mesh coordinates
        double Mesh2_node_x(nMesh2_node) ;  
                Mesh2_node_x:standard_name = "longitude" ;  
                Mesh2_node_x:long_name = "Longitude of 2D mesh nodes." ;  
                Mesh2_node_x:units = "degrees_east" ;  
        double Mesh2_node_y(nMesh2_node) ;  
                Mesh2_node_y:standard_name = "latitude" ;  
                Mesh2_node_y:long_name = "Latitude of 2D mesh nodes." ;
                Mesh2_node_y:units = "degrees_north" ;  
        double Mesh2_face_x(nMesh2_face) ;  
                Mesh2_face_x:standard_name = "longitude" ;  
                Mesh2_face_x:long_name = "Characteristics longitude of 2D mesh triangle (e.g. circumcenter coordinate)." ;  
                Mesh2_face_x:units = "degrees_east" ;  
        double Mesh2_face_y(nMesh2_face) ;  
                Mesh2_face_y:standard_name = "latitude" ;  
                Mesh2_face_y:long_name = "Characteristics latitude of 2D mesh triangle (e.g. circumcenter coordinate)." ;  
                Mesh2_face_y:units = "degrees_north" ;  
        double Mesh2_edge_x(nMesh2_edge) ;  
                Mesh2_edge_x:standard_name = "longitude" ;  
                Mesh2_edge_x:long_name = "Characteristic longitude of 2D mesh edge (e.g. center coordinate of the edge)." ;  
                Mesh2_edge_x:units = "degrees_east" ;  
        double Mesh2_edge_y(nMesh2_edge) ;  
                Mesh2_edge_y:standard_name = "latitude" ;  
                Mesh2_edge_y:long_name = "Characteristic latitude of 2D mesh edge (e.g. center coordinate of the edge)." ;  
                Mesh2_edge_y:units = "degrees_north" ;  

// Mesh topology
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;  
                Mesh2_edge_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_edge_nodes:long_name = "Maps every edge to the two nodes that it connects." ;  
        integer Mesh2_face_nodes(nMesh2_face, Tri) ;  
                Mesh2_face_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_face_nodes:long_name = "Maps every triangular face to its three corner nodes." ;  
        integer Mesh2_face_links(nMesh2_face_links, Two) ;  
                Mesh2_face_links:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_face_links:long_name = "Indicates which triangular faces are neighbors." ;  
        integer Mesh2 ; 
                Mesh2:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2:long_name = "Topology data of 2D unstructured mesh" ;
                Mesh2:dimensionality = 2 ;
                Mesh2:locations = "face edge node" ;
                Mesh2:node_coordinates = "Mesh2_node_x Mesh2_node_y" ;
                Mesh2:edge_coordinates = "Mesh2_edge_x Mesh2_edge_y" ;
                Mesh2:edge_node_connectivity = "Mesh2_edge_nodes" ;
                Mesh2:face_coordinates = "Mesh2_face_x Mesh2_face_y" ;
                Mesh2:face_node_connectivity = "Mesh2_face_nodes" ;
                Mesh2:face_connectivity = "Mesh2_face_links" ;

2D flexible mesh (mixed triangles, quadrilaterals, etc.) topology.

The topology information is stored as attributes to a dummy variable (in the example below called "Mesh2"); the first attributes are dimensionality and locations. The value of the dimensionality attribute should be integer 2 for a 2D mesh. The value of the locations attribute is a string with a blank separated, extendable list of location names. Initially these locations have a purely topological meaning, but they may be used to define additional numerical stagger positions too. The names are not formally standardized, but the names "node", "edge" and "face" are recommended for the 2D mesh geometry. For each location name X, there will be a further attribute composed of the concatenation of the name X and '_coordinates'. For example, the location name "face" points to an attribute face_coordinates. These coordinates attributes follow the CF-conventions, i.e. they point to the variables that contain the latitude and longitude (or other coordinate) variables that contain the coordinate data for that particular location. From these attributes it's still not clear what the exact mesh topology is. Therefore, we need two more attributes that specify the connectivity of the locations. The attributes face_node_connectivity and edge_node_connectivity are composed of two location names and the word 'connectivity'. They tell us:

1. that the location "node" corresponds to the nodes/points of the 2D mesh.
2. that the location "edge" corresponds to the edges of the 2D mesh (the second dimension of the variable it points to is 2).
3. that the location "face" corresponds to the faces of the 2D mesh (the second dimension of the variable it points to is larger than 2).
4. that this is a mesh composed of quandrilaterals (and possibly some triangles) since the second dimension of the variable that face_node_connectivity points to is 4.
5. that "Mesh2_edge_nodes" (the value of edge_node_connectivity) is the variable that defines each edge by means of its end points.
6. that "Mesh2_face_nodes" (the value of face_node_connectivity) is the variable that defines each face by means of its corner nodes.

Consistent with the CF-conventions compression option, the connectivity indices are 0-based, i.e. if the "Mesh2_edge_nodes" array contains values 0 and 1 then this means that that edge connects the first two points. If the mesh contains triangles then the last node numbers of those faces in the "Mesh2_face_nodes" array will be equal to _FillValue (which should be larger than the number of nodes in the mesh). The example includes an optional face_connectivity attribute that specifies which faces are neighbors.

Example:

dimensions:  
        nMesh2_node = 6 ;
        nMesh2_edge = 7 ;
        nMesh2_face = 2 ;
        nMesh2_face_links = 1;
        nMaxMesh2_face_nodes = 4;

        Two = 2;

variables:  
// Mesh coordinates
        double Mesh2_node_x(nMesh2_node) ;  
                Mesh2_node_x:standard_name = "longitude" ;  
                Mesh2_node_x:long_name = "Longitude of 2D mesh nodes." ;  
                Mesh2_node_x:units = "degrees_east" ;  
        double Mesh2_node_y(nMesh2_node) ;  
                Mesh2_node_y:standard_name = "latitude" ;  
                Mesh2_node_y:long_name = "Latitude of 2D mesh nodes." ;
                Mesh2_node_y:units = "degrees_north" ;  
        double Mesh2_face_x(nMesh2_face) ;  
                Mesh2_face_x:standard_name = "longitude" ;  
                Mesh2_face_x:long_name = "Characteristics longitude of 2D mesh face (e.g. circumcenter coordinate)." ;  
                Mesh2_face_x:units = "degrees_east" ;  
        double Mesh2_face_y(nMesh2_face) ;  
                Mesh2_face_y:standard_name = "latitude" ;  
                Mesh2_face_y:long_name = "Characteristics latitude of 2D mesh face (e.g. circumcenter coordinate)." ;  
                Mesh2_face_y:units = "degrees_north" ;  
        double Mesh2_edge_x(nMesh2_edge) ;  
                Mesh2_edge_x:standard_name = "longitude" ;  
                Mesh2_edge_x:long_name = "Characteristic longitude of 2D mesh edge (e.g. center coordinate of the edge)." ;  
                Mesh2_edge_x:units = "degrees_east" ;  
        double Mesh2_edge_y(nMesh2_edge) ;  
                Mesh2_edge_y:standard_name = "latitude" ;  
                Mesh2_edge_y:long_name = "Characteristic latitude of 2D mesh edge (e.g. center coordinate of the edge)." ;  
                Mesh2_edge_y:units = "degrees_north" ;  

// Mesh topology
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;  
                Mesh2_edge_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_edge_nodes:long_name = "Maps every edge to the two nodes that it connects." ;  
        integer Mesh2_face_nodes(nMesh2_face, nMaxMesh2_face_nodes) ;  
                Mesh2_face_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_face_nodes:long_name = "Maps every face to its corner nodes." ;  
                Mesh2_face_nodes:_FillValue = 999999 ;
        integer Mesh2_face_links(nMesh2_face_links, Two) ;  
                Mesh2_face_links:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_face_links:long_name = "Indicates which faces are neighbors." ;  
        integer Mesh2 ; 
                Mesh2:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2:long_name = "Topology data of 2D unstructured mesh" ;
                Mesh2:dimensionality = 2 ;
                Mesh2:locations = "face edge node" ;
                Mesh2:node_coordinates = "Mesh2_node_x Mesh2_node_y" ;
                Mesh2:edge_coordinates = "Mesh2_edge_x Mesh2_edge_y" ;
                Mesh2:edge_node_connectivity = "Mesh2_edge_nodes" ;
                Mesh2:face_coordinates = "Mesh2_face_x Mesh2_face_y" ;
                Mesh2:face_node_connectivity = "Mesh2_face_nodes" ;
                Mesh2:face_connectivity = "Mesh2_face_links" ;

3D layered mesh topology.

For a 3D layered unstructured mesh topology the approach is taken as for the structured mesh according CF-conventions. For the horizontal plane a 2D unstructured mesh topology is defined, which is extruded in the vertical direction by means of a vertical coordinate. The example below matches the example in the previous section combined with a vertical coordinate according CF-conventions. This example introduces also the attributes grid and location on the 2D variables "Mesh2_surface" and "Mesh2_depth". For more information about these attributes see the data definition section below.

Example:

dimensions:  
        nMesh2_node = 6 ;
        nMesh2_edge = 7 ;
        nMesh2_face = 2 ;
        nMesh2_face_links = 1;
        nMaxMesh2_face_nodes = 4;
        Mesh2_layers = 3 ;

        Two = 2;

variables:  
// Mesh coordinates
        double Mesh2_node_x(nMesh2_node) ;  
                Mesh2_node_x:standard_name = "longitude" ;  
                Mesh2_node_x:long_name = "Longitude of 2D mesh nodes." ;  
                Mesh2_node_x:units = "degrees_east" ;  
        double Mesh2_node_y(nMesh2_node) ;  
                Mesh2_node_y:standard_name = "latitude" ;  
                Mesh2_node_y:long_name = "Latitude of 2D mesh nodes." ;
                Mesh2_node_y:units = "degrees_north" ;  
        double Mesh2_face_x(nMesh2_face) ;  
                Mesh2_face_x:standard_name = "longitude" ;  
                Mesh2_face_x:long_name = "Characteristics longitude of 2D mesh face (e.g. circumcenter coordinate)." ;  
                Mesh2_face_x:units = "degrees_east" ;  
        double Mesh2_face_y(nMesh2_face) ;  
                Mesh2_face_y:standard_name = "latitude" ;  
                Mesh2_face_y:long_name = "Characteristics latitude of 2D mesh face (e.g. circumcenter coordinate)." ;  
                Mesh2_face_y:units = "degrees_north" ;  
        double Mesh2_edge_x(nMesh2_edge) ;  
                Mesh2_edge_x:standard_name = "longitude" ;  
                Mesh2_edge_x:long_name = "Characteristic longitude of 2D mesh edge (e.g. center coordinate of the edge)." ;  
                Mesh2_edge_x:units = "degrees_east" ;  
        double Mesh2_edge_y(nMesh2_edge) ;  
                Mesh2_edge_y:standard_name = "latitude" ;  
                Mesh2_edge_y:long_name = "Characteristic latitude of 2D mesh edge (e.g. center coordinate of the edge)." ;  
                Mesh2_edge_y:units = "degrees_north" ;  

// Mesh topology
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;  
                Mesh2_edge_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_edge_nodes:long_name = "Maps every edge to the two nodes that it connects." ;  
        integer Mesh2_face_nodes(nMesh2_face, nMaxMesh2_face_nodes) ;  
                Mesh2_face_nodes:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_face_nodes:long_name = "Maps every face to its corner nodes." ;  
                Mesh2_face_nodes:_FillValue = 999999 ;
        integer Mesh2_face_links(nMesh2_face_links, Two) ;  
                Mesh2_face_links:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2_face_links:long_name = "Indicates which faces are neighbors." ;  
        integer Mesh2 ; 
                Mesh2:standard_name = "" ;  // YET TO BE DETERMINED
                Mesh2:long_name = "Topology data of 2D unstructured mesh" ;
                Mesh2:dimensionality = 2 ;
                Mesh2:locations = "face edge node" ;
                Mesh2:node_coordinates = "Mesh2_node_x Mesh2_node_y" ;
                Mesh2:edge_coordinates = "Mesh2_edge_x Mesh2_edge_y" ;
                Mesh2:edge_node_connectivity = "Mesh2_edge_nodes" ;
                Mesh2:face_coordinates = "Mesh2_face_x Mesh2_face_y" ;
                Mesh2:face_node_connectivity = "Mesh2_face_nodes" ;
                Mesh2:face_connectivity = "Mesh2_face_links" ;

// Vertical coordinate
        double Mesh2_layers(Mesh2_layers) ;
                Mesh2_layers:standard_name = "ocean_sigma_coordinate" ;
                Mesh2_layers:long_name = "sigma at layer midpoints" ;
                Mesh2_layers:positive = "up" ;
                Mesh2_layers:formula_terms = "sigma: Mesh2_layers eta: Mesh2_surface depth: Mesh2_depth" ;
        double Mesh2_depth(nMesh2_node) ;  
                Mesh2_depth:standard_name = "sea_floor_depth_below_geoid" ;
                Mesh2_depth:units = "m" ;
                Mesh2_depth:positive = "down" ;
                Mesh2_depth:grid = "Mesh2"
                Mesh2_depth:location = "node" ;
                Mesh2_depth:coordinates = "Mesh2_node_x Mesh2_node_y" ;
        double Mesh2_surface(nMesh2_node) ;  
                Mesh2_surface:standard_name = "sea_surface_height_above_geoid" ;
                Mesh2_surface:units = "m" ;
                Mesh2_surface:grid = "Mesh2"
                Mesh2_surface:location = "face" ;
                Mesh2_surface:coordinates = "Mesh2_face_x Mesh2_face_y" ;

Data defined on unstructured meshes.

According to CF-conventions a variable defined on a structured mesh is specified as

        double waterlevel(time,nmax,mmax) ;  
                waterlevel:standard_name = "sea_surface_height_above_geoid" ;
                waterlevel:units = "m" ;
                waterlevel:coordinates = "lat lon" ;

The coordinates attribute refers to the variables that contain the latitude and longitude coordinates. For a curvilinear grid these variables will share two spatial dimensions, here nmax and mmax: lat(nmax,mmax) and lon(nmax,mmax). In numerical models the various quantities are often computed at different locations of the mesh: staggered data. The standard CF-conventions don't offer specific support for this functionality and thus for every stagger location separate coordinates are provided: cell center coordinates, corner point coordinates, u-flux point coordinates, and v-flux point coordinates. The underlying topology of the mesh, i.e. how these coordinates (variable definition locations) relate to eachother isn't stored in the file. This shortcoming is to some degree solved by the gridspec proposal by Balaji. We introduce here attributes that link to the topological data defined above.

Data variables.

The use of the coordinates attribute is copied from the CF-conventions. It is used for variables defined on the unstructured meshes to directly map its values to their location: latitude and longitude. To map the variable onto the topology of the underlying mesh, two new attributes have been introduced. First, the attribute 'grid' points to the variable containing the meta-data attributes of the mesh on which the variable has been defined. Second, the attribute 'location' points to the (stagger) location within the mesh at which the variable is defined. Note that in this example the coordinates attribute is redundant since the coordinates could also be obtained by using the "face"_coordinates attribute of the "Mesh2" variable.

        double Mesh2_surface(time,nMesh2_node) ;  
                Mesh2_surface:standard_name = "sea_surface_height_above_geoid" ;
                Mesh2_surface:units = "m" ;
                Mesh2_surface:grid = "Mesh2"
                Mesh2_surface:location = "face" ;
                Mesh2_surface:coordinates = "Mesh2_face_x Mesh2_face_y" ;

Location maps.

Some variables may only be defined at specific locations within the mesh, e.g. only at boundary points or at special locations like weirs and gates. To save space and to improve readability, the concept of a location_map is introduced. It is very similar to compression option in the the CF-conventions. The location_map is an integer variable that contains the indices of the locations at which data is stored. The example below defines a location_map "nMesh1_cell" as a subset of the nodes of Mesh1. The attribute location_map of the variable "Mesh_waterlevel" points to this location_map and the coordinates attribute points to the corresponding (subset) of latitude and longitude coordinates. Note that the coordinates attribute is again redundant since the coordinates could also be obtained by using the location_map "nMesh1_cell" and the "node"_coordinates attribute of the "Mesh1" variable. Consistent with the compress option, the location_map indices are 0-based, i.e. if Mesh1_flownode(0) equals 1 then this points to the second "node" in "Mesh1".

        integer Mesh1_cell(nMesh1_cell) ;
                Mesh1_cell:standard_name = "" ; // YET TO BE DETERMINED (proposal: location_map)
                Mesh1_cell:long_name = "Defines Mesh1_cell as subset of the nodes of Mesh1." ;  
                Mesh1_cell:grid = "Mesh1" ;
                Mesh1_cell:location = "node" ;
        double Mesh1_cell_x(nMesh1_cell) ;
                Mesh1_cell_x:standard_name = "longitude" ;  
                Mesh1_cell_x:long_name = "Characteristic longitude of cell (e.g. longitude of node)." ;  
                Mesh1_cell_x:units = "degrees_east" ;  
        double Mesh1_cell_y(nMesh1_cell) ;
                Mesh1_cell_y:standard_name = "latitude" ;  
                Mesh1_cell_y:long_name = "Characteristic latitude of cell (e.g. latitude of node)" ;  
                Mesh1_cell_y:units = "degrees_north" ;  

        double Mesh1_waterlevel(time, nMesh1_cell) ;  
                Mesh1_waterlevel:standard_name = "sea_surface_height_above_geoid" ;
                Mesh1_waterlevel:units = "m" ;
                Mesh1_waterlevel:location_map = "Mesh1_cell" ;
                Mesh1_waterlevel:coordinates = "Mesh1_cell_x Mesh1_cell_y" ;

The location_map doesn't have to be monotonic. So, it can be used for both creating subsets of the original locations, and for renumbering the locations. If the location_map attribute is used, then the grid and location attributes shouldn't be used.

(warning) Should Mesh1_cell follow the CF/COARDS coordinate dimension conventions, i.e. integer Mesh1_cell(Mesh1_cell)? How would this work out for a location_map that is only used for renumbering.

The case of an integrated 1D-2D-3D mesh.

Combined mesh topology.

Example of a combination of connected 1D network, 2D mesh and 3D mesh.

The variable and dimension names used in this example differ slightly from those used in the examples on Unstructured grids. Please find a translation table below:

Unstructured grids

This example

NetNode

node

NetLink

edge/edge_nodes

NetElem/NetCell

face

NetElemNode/NetCellNode

face_nodes

NetElemLink/NetCellLink/FlowLink

face_links

netcdf test_map {  

dimensions:  
        // dimensions for mesh 1
        nMesh1_node = 3 ;
        nMesh1_edge = 2 ;
        nMaxMesh1_contour_pts = 99 ;
        nMesh1_cell = 2 ;
        nMesh1_interface = 2 ;

        // dimensions for mesh 2
        nMesh2_node = 6 ;
        nMesh2_edge = 7 ;
        nMesh2_face = 2 ;
        nMesh2_face_links = 1;
        nMaxMesh2_face_nodes = 4;
        nMaxMesh2_contour_pts = 99 ;

        // dimensions for mesh 3
        nMesh3_node = 6 ;
        nMesh3_edge = 7 ;
        nMesh3_face = 2 ;
        nMesh3_face_links = 1;
        nMaxMesh3_face_nodes = 4;
        nMaxMesh3_contour_pts = 99 ;
        nMesh3_layer = 3 ;
        nMesh3_interface = 4;

        // common dimensions
        Two = 2;
        time = UNLIMITED ; // (1 currently)  

variables:  
// Basic mesh data (coordinates independent of computational cells whatsoever)
        double Mesh1_node_x(nMesh1_node) ;  
                Mesh1_node_x:standard_name = "projection_x_coordinate" ;  
                Mesh1_node_x:long_name = "netnodal x-coordinate" ;  
                Mesh1_node_x:units = "m" ;  
                Mesh1_node_x:bounds = "Mesh1_node_contour_x" ;  
        double Mesh1_node_y(nMesh1_node) ;  
                Mesh1_node_y:standard_name = "projection_y_coordinate" ;  
                Mesh1_node_y:long_name = "netnodal y-coordinate" ;
                Mesh1_node_y:units = "m" ;  
                Mesh1_node_y:bounds = "Mesh1_node_contour_y" ;  
        double Mesh1_edge_x(nMesh1_edge) ;  
                Mesh1_edge_x:standard_name = "projection_x_coordinate" ;  
                Mesh1_edge_x:long_name = "Center coordinate of net link (velocity point)." ;  
                Mesh1_edge_x:units = "m" ;  
        double Mesh1_edge_y(nMesh1_edge) ;  
                Mesh1_edge_y:standard_name = "projection_y_coordinate" ;  
                Mesh1_edge_y:long_name = "Center coordinate of net link (velocity point)." ;  
                Mesh1_edge_y:units = "m" ;  
        double Mesh1_node_contour_x(nMesh1_node, nMaxMesh1_contour_pts) ;  
                Mesh1_node_contour_x:standard_name = "projection_x_coordinate" ;  
                Mesh1_node_contour_x:long_name = "List of x-points that form outline of flow volume" ;  
                Mesh1_node_contour_x:units = "m" ;  
        double Mesh1_node_contour_y(nMesh1_node, nMaxMesh1_contour_pts) ;  
                Mesh1_node_contour_y:standard_name = "projection_y_coordinate" ;  
                Mesh1_node_contour_y:units = "m" ;  
                Mesh1_node_contour_y:long_name = "List of y-points that form outline of flow volume" ;  

// Basic mesh topology
        integer Mesh1_edge_nodes(nMesh1_edge, Two) ;  
                Mesh1_edge_nodes:long_name = "links between two nodes" ;  
        integer Mesh1 ; 
                Mesh1:long_name = "Topology data of Mesh1" ;
                Mesh1:dimensionality = 1 ;
                Mesh1:locations = "link node" ;
                Mesh1:node_coordinates = "Mesh1_node_x Mesh1_node_y" ;
                Mesh1:edge_coordinates = "Mesh1_edge_x Mesh1_edge_y" ;
                Mesh1:edge_nodes = "Mesh1_edge_nodes" ;
                Mesh1:parent_mesh = "CombinedMesh" ;

// Similar for Mesh2
        double Mesh2_node_x(nMesh2_node) ;  
                Mesh2_node_x:standard_name = "projection_x_coordinate" ;  
                Mesh2_node_x:long_name = "netnodal x-coordinate" ;  
                Mesh2_node_x:units = "m" ;  
        double Mesh2_node_y(nMesh2_node) ;  
                Mesh2_node_y:standard_name = "projection_y_coordinate" ;  
                Mesh2_node_y:long_name = "netnodal y-coordinate" ;
                Mesh2_node_y:units = "m" ;  
        double Mesh2_face_x(nMesh2_face) ;  
                Mesh2_face_x:standard_name = "projection_x_coordinate" ;  
                Mesh2_face_x:long_name = "Flow element circumcenter x" ;  
                Mesh2_face_x:units = "m" ;  
                Mesh2_face_x:bounds = "Mesh2_face_contour_x" ;  
        double Mesh2_face_y(nMesh2_face) ;  
                Mesh2_face_y:standard_name = "projection_y_coordinate" ;  
                Mesh2_face_y:long_name = "Flow element circumcenter y" ;  
                Mesh2_face_y:units = "m" ;  
                Mesh2_face_y:bounds = "Mesh2_face_contour_y" ;  
        double Mesh2_face_contour_x(nMesh2_face, nMaxMesh2_contour_pts) ;  
                Mesh2_face_contour_x:standard_name = "projection_x_coordinate" ;  
                Mesh2_face_contour_x:long_name = "List of x-points that form outline of flow volume" ;  
                Mesh2_face_contour_x:units = "m" ;  
        double Mesh2_face_contour_y(nMesh2_face, nMaxMesh2_contour_pts) ;  
                Mesh2_face_contour_y:standard_name = "projection_y_coordinate" ;  
                Mesh2_face_contour_y:units = "m" ;  
                Mesh2_face_contour_y:long_name = "List of y-points that form outline of flow volume" ;  
        double Mesh2_edge_x(nMesh2_edge) ;  
                Mesh2_edge_x:standard_name = "projection_x_coordinate" ;  
                Mesh2_edge_x:long_name = "Center coordinate of net link (velocity point)." ;  
                Mesh2_edge_x:units = "m" ;  
        double Mesh2_edge_y(nMesh2_edge) ;  
                Mesh2_edge_y:standard_name = "projection_y_coordinate" ;  
                Mesh2_edge_y:long_name = "Center coordinate of net link (velocity point)." ;  
                Mesh2_edge_y:units = "m" ;  
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;  
                Mesh2_edge_nodes:long_name = "link between two nodes" ;  
        integer Mesh2_face_nodes(nMesh2_face, nMaxMesh2_face_nodes) ;  
                Mesh2_face_nodes:long_name = "Mapping from net face to net nodes." ;  
        integer Mesh2_face_links(nMesh2_face_links, Two) ;  
                FlowLink:long_name = "link/interface between two flow elements (faces)" ;  
        integer Mesh2 ; 
                Mesh2:long_name = "Topology data of Mesh2" ;
                Mesh2:dimensionality = 2 ;
                Mesh2:locations = "face edge node" ;
                Mesh2:node_coordinates = "Mesh2_node_x Mesh2_node_y" ;
                Mesh2:edge_coordinates = "Mesh2_edge_x Mesh2_edge_y" ;
                Mesh2:edge_nodes = "Mesh2_edge_nodes" ;
                Mesh2:face_coordinates = "Mesh2_face_x Mesh2_face_y" ;
                Mesh2:face_nodes = "Mesh2_face_nodes" ;
                Mesh2:face_connectivity = "Mesh2_face_links" ;
                Mesh2:parent_mesh = "CombinedMesh" ;

// Similar for Mesh3
        double Mesh3_node_x(nMesh3_node) ;  
                Mesh3_node_x:standard_name = "projection_x_coordinate" ;  
                Mesh3_node_x:long_name = "netnodal x-coordinate" ;  
                Mesh3_node_x:units = "m" ;  
        double Mesh3_node_y(nMesh3_node) ;  
                Mesh3_node_y:standard_name = "projection_y_coordinate" ;  
                Mesh3_node_y:long_name = "netnodal y-coordinate" ;
                Mesh3_node_y:units = "m" ;  
        double Mesh3_face_x(nMesh3_face) ;  
                Mesh3_face_x:standard_name = "projection_x_coordinate" ;  
                Mesh3_face_x:long_name = "Flow element circumcenter x" ;  
                Mesh3_face_x:units = "m" ;  
                Mesh3_face_x:bounds = "Mesh3_face_contour_x" ;  
        double Mesh3_face_y(nMesh3_face) ;  
                Mesh3_face_y:standard_name = "projection_y_coordinate" ;  
                Mesh3_face_y:long_name = "Flow element circumcenter y" ;  
                Mesh3_face_y:units = "m" ;  
                Mesh3_face_y:bounds = "Mesh3_face_contour_y" ;  
        double Mesh3_face_contour_x(nMesh3_face, nMaxMesh3_contour_pts) ;  
                Mesh3_face_contour_x:standard_name = "projection_x_coordinate" ;  
                Mesh3_face_contour_x:long_name = "List of x-points that form outline of flow volume" ;  
                Mesh3_face_contour_x:units = "m" ;  
        double Mesh3_face_contour_y(nMesh3_face, nMaxMesh3_contour_pts) ;  
                Mesh3_face_contour_y:standard_name = "projection_y_coordinate" ;  
                Mesh3_face_contour_y:units = "m" ;  
                Mesh3_face_contour_y:long_name = "List of y-points that form outline of flow volume" ;  
        double Mesh3_edge_x(nMesh3_edge) ;  
                Mesh3_edge_x:standard_name = "projection_x_coordinate" ;  
                Mesh3_edge_x:long_name = "Center coordinate of edges (velocity point)." ;  
                Mesh3_edge_x:units = "m" ;  
        double Mesh3_edge_y(nMesh3_edge) ;  
                Mesh3_edge_y:standard_name = "projection_y_coordinate" ;  
                Mesh3_edge_y:long_name = "Center coordinate of edges (velocity point)." ;  
                Mesh3_edge_y:units = "m" ;  
        integer Mesh3_edge_nodes(nMesh3_edge, Two) ;  
                Mesh3_edge_nodes:long_name = "link between two nodes" ;  
        integer Mesh3_face_nodes(nMesh3_face, nMaxMesh3_face_nodes) ;  
                Mesh3_face_nodes:long_name = "Mapping from faces to nodes." ;  
        integer Mesh3_face_links(nMesh3_face_links, Two) ;  
                FlowLink:long_name = "link/interface between two flow elements (faces)" ;  
        double Mesh3_layers(Mesh3_layers) ;
                Mesh3_layers:standard_name = "ocean_sigma_coordinate" ;
                Mesh3_layers:long_name = "sigma at layer midpoints" ;
                Mesh3_layers:positive = "up" ;
                Mesh3_layers:formula_terms = "sigma: Mesh3_layers eta: Mesh3_zwl depth: Mesh3_depth" ;
        double Mesh3_interfaces(Mesh3_interfaces) ;
                Mesh3_interfaces:standard_name = "ocean_sigma_coordinate" ;
                Mesh3_interfaces:long_name = "sigma at layer interfaces" ;
                Mesh3_interfaces:positive = "up" ;
                Mesh3_interfaces:formula_terms = "sigma: Mesh3_interfaces eta: Mesh3_zwl depth: Mesh3_depth" ;
        integer Mesh3 ; 
                Mesh3:long_name = "Topology data of Mesh3" ;
                Mesh3:dimensionality = 2 ;
                Mesh3:locations = "face edge node" ;
                Mesh3:node_coordinates = "Mesh3_node_x Mesh3_node_y" ;
                Mesh3:edge_coordinates = "Mesh3_edge_x Mesh3_edge_y" ;
                Mesh3:edge_nodes = "Mesh3_edge_nodes" ;
                Mesh3:face_coordinates = "Mesh3_face_x Mesh3_face_y" ;
                Mesh3:face_nodes = "Mesh3_face_nodes" ;
                Mesh3:face_connectivity = "Mesh3_face_links" ;
                Mesh3:parent_mesh = "CombinedMesh" ;

        integer CombiMesh_edge_mesh(nCombiMesh_contacts, Two) ; 
                CombiMesh_edge_mesh:long_name = "Mesh number of contact" ; 
                CombiMesh_edge_mesh:valid_range = 0, 2;
                CombiMesh_edge_mesh:valid_values = 0, 1, 2;
                CombiMesh_edge_mesh:flag_meanings = "Mesh1 Mesh2 Mesh3" ;
        integer CombiMesh_edge(nCombiMesh_contacts, Two) ; 
                CombiMesh_edge:long_name = "Edge number of contact" ; 
        integer CombinedMesh(nCombinedMesh_contacts, Four) ; 
                CombinedMesh:long_name = "Topology data of CombinedMesh" ;
                CombinedMesh:sub_meshes = "Mesh1 Mesh2 Mesh3" ;
                CombinedMesh:contact = "CombiMesh_edge_mesh CombiMesh_edge" ;

        double time(time) ;  
                time:standard_name = "time" ;
                time:units = "seconds since 1992-08-31 00:00:00" ;  
// 1D mesh nodes may be merged with 2D mesh faces. Or 2D mesh faces may be masked and omitted in
// solution output. As a result, allow for a map between flow node numbers and basic mesh entities/numbers).
//
// Relation between basic mesh (nodes/edges/faces) and computational mesh (corners/interfaces/cells)
// (For cell center data, nMesh1_cell <= nMesh1_node, nMesh2_cell <= nMesh2_face)
// (In case of identity maps, leave out the location_map, and specify coordinates, grid and location
//  directly in attributes of solution variable.)
        double Mesh1_cell_x(nMesh1_cell) ;
                Mesh1_cell_x:standard_name = "projection_x_coordinate" ;  
                Mesh1_cell_x:long_name = "flow cell circumcenter x-coordinate" ;  
                Mesh1_cell_x:units = "m" ;  
        double Mesh1_cell_y(nMesh1_cell) ;
                Mesh1_cell_y:standard_name = "projection_y_coordinate" ;  
                Mesh1_cell_y:long_name = "flow cell circumcenter y-coordinate" ;  
                Mesh1_cell_y:units = "m" ;  
        double Mesh1_flownode(nMesh1_cell) ;
                Mesh1_cell_node:long_name = "map from flowcell to 1D mesh node" ;  
                Mesh1_cell_node:grid = "Mesh1" ;
                Mesh1_cell_node:location = "node" ; // location of flow cell on topological mesh entity.
        double Mesh1_flowlink(nMesh1_interface) ;
                Mesh1_cell_node:long_name = "map from flowlink to 1D mesh edge" ;  
                Mesh1_cell_node:grid = "Mesh1" ;
                Mesh1_cell_node:location = "edge" ; // location of flow link on topological mesh entity.

        double Mesh1_zwl(time, nMesh1_cell) ;  
                Mesh1_zwl:standard_name = "sea_surface_height_above_geoid" ;
                Mesh1_zwl:units = "m" ;
                Mesh1_zwl:location_map = "Mesh1_flownode" ;
                Mesh1_zwl:coordinates = "Mesh1_cell_x Mesh1_cell_y" ;
        double Mesh1_u(time, nMesh1_interface) ;  
                Mesh1_zwl:standard_name = "sea_water_speed" ;
                Mesh1_u:long_name = "Velocity (along the edge)" ; 
                Mesh1_u:units = "m s-1" ;  
                Mesh1_u:location_map = "Mesh1_flowlink" ;
                Mesh1_u:coordinates = "Mesh1_interface_x Mesh1_interface_y" ;  

        double Mesh2_depth(nMesh2_node) ;  
                Mesh2_depth:standard_name = "sea_floor_depth_below_geoid" ;
                Mesh2_depth:units = "m" ;
                Mesh2_depth:positive = "down" ;
                Mesh2_depth:grid = "Mesh2"
                Mesh2_depth:location = "node" ;
                Mesh2_depth:coordinates = "Mesh2_node_x Mesh2_node_y" ;
        double Mesh2_zwl(time, nMesh2_face) ;  
                Mesh2_zwl:standard_name = "sea_surface_height_above_geoid" ;
                Mesh2_zwl:units = "m" ;
                Mesh2_zwl:grid = "Mesh2"
                Mesh2_zwl:location = "face" ;
                Mesh2_zwl:coordinates = "Mesh2_face_x Mesh2_face_y" ;
        double Mesh2_ucx(time, nMesh2_face) ;  
                Mesh2_ucx:standard_name = "eastward_sea_water_velocity" ;
                Mesh2_ucx:units = "m s-1" ;
                Mesh2_ucx:grid = "Mesh2"
                Mesh2_ucx:location = "face" ;
                Mesh2_ucx:coordinates = "Mesh2_face_x Mesh2_face_y" ;  
        double Mesh2_ucy(time, nMesh2_face) ;  
                Mesh2_ucy:standard_name = "northward_sea_water_velocity" ;
                Mesh2_ucy:units = "m s-1" ;
                Mesh2_ucy:grid = "Mesh2"
                Mesh2_ucy:location = "face" ;
                Mesh2_ucy:coordinates = "Mesh2_face_x Mesh2_face_y" ;  
        double Mesh2_unorm(time, nMesh2_edge) ;  
                Mesh2_unorm:long_name = "Normal component of velocity at the interface" ; 
                Mesh2_unorm:units = "m s-1" ;  
                Mesh2_unorm:grid = "Mesh2"
                Mesh2_unorm:location = "edge" ;  
                Mesh2_unorm:coordinates = "Mesh2_edge_x Mesh2_edge_y" ;  
todo: meaning?
        integer Mesh2_edgetype(nMesh2_edge) ;  
                Mesh2_edgetype:long_name = "Type of edge" ; 
                Mesh2_edgetype:valid_range = 0, 2 ;
                Mesh2_edgetype:valid_values = 0, 1, 2 ;
                Mesh2_edgetype:flag_meanings = "closed_edge open_internal_edge open_boundary_edge" ;
                Mesh2_edgetype:grid = "Mesh2"
                Mesh2_edgetype:location = "edge" ;  
                Mesh2_edgetype:coordinates = "Mesh2_edge_x Mesh2_edge_y" ;  

        double Mesh3_depth(nMesh3_node) ;  
                Mesh3_depth:standard_name = "sea_floor_depth_below_geoid" ;
                Mesh3_depth:units = "m" ;
                Mesh3_depth:positive = "down" ;
                Mesh3_depth:grid = "Mesh3"
                Mesh3_depth:location = "node" ;
                Mesh3_depth:coordinates = "Mesh3_node_x Mesh3_node_y" ;
        double Mesh3_zwl(time, nMesh3_face) ;  
                Mesh3_zwl:standard_name = "sea_surface_height_above_geoid" ;
                Mesh3_zwl:units = "m" ;
                Mesh3_zwl:grid = "Mesh3"
                Mesh3_zwl:location = "face" ;
                Mesh3_zwl:coordinates = "Mesh3_face_x Mesh3_face_y" ;
        double Mesh3_ucx(time, nMesh3_face, nMesh3_layer) ;  
                Mesh3_ucx:standard_name = "eastward_sea_water_velocity" ;
                Mesh3_ucx:units = "m s-1" ;
                Mesh3_ucx:grid = "Mesh3"
                Mesh3_ucx:location = "face" ;
                Mesh3_ucx:coordinates = "Mesh3_face_x Mesh3_face_y Mesh3_layers" ;  
        double Mesh3_ucy(time, nMesh3_face, nMesh3_layer) ;  
                Mesh3_ucy:standard_name = "northward_sea_water_velocity" ;
                Mesh3_ucy:units = "m s-1" ;
                Mesh3_ucy:grid = "Mesh3"
                Mesh3_ucy:location = "face" ;
                Mesh3_ucy:coordinates = "Mesh3_face_x Mesh3_face_y Mesh3_layers" ;  
        double Mesh3_unorm(time, nMesh3_edge, nMesh3_layer) ;  
                Mesh3_unorm:long_name = "Normal component of velocity at the interface" ; 
                Mesh3_unorm:units = "m s-1" ;  
                Mesh3_unorm:grid = "Mesh3"
                Mesh3_unorm:location = "edge" ;  
                Mesh3_unorm:coordinates = "Mesh3_edge_x Mesh3_edge_y Mesh3_layers" ;  
TODO: meaning
        integer Mesh3_edgetype(nMesh3_edge) ;  
                Mesh3_edgetype:long_name = "Type of edge" ; 
                Mesh3_edgetype:valid_range = 0, 2 ;
                Mesh3_edgetype:valid_values = 0, 1, 2 ;
                Mesh3_edgetype:flag_meanings = "closed_edge open_internal_edge open_boundary_edge" ;
                Mesh3_edgetype:grid = "Mesh3"
                Mesh3_edgetype:location = "edge" ;  
                Mesh3_edgetype:coordinates = "Mesh3_edge_x Mesh3_edge_y" ;  

// global attributes:  
                :institution = "Deltares" ;  
                :references = "http://www.deltares.nl" ;  
                :source = "UNSTRUC" ;  
                :history = "Created on 2010-04-12, Bert Jagers\n",
    "2010-06-01, distinguish basic mesh/net and flow mesh, include mapping between the two, Arthur van Dam" ;  
                :Conventions = "CF-1.4:Deltares-0.1" ;  
  • No labels