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

Compare with Current View Page History

« Previous Version 39 Next »

Latest update November 14, 2011. PARTIAL UPDATE - WORK IN PROGRESS

Introduction.

This page describes a proposal for storing unstructured (or flexible mesh) model data in a netCDF file. Our focus is on data for environmental applications and hence we start from the CF-conventions which has been the standard in climate research for many years, and is increasingly adopted by others as the metadata standard for netCDF, see e.g. NASA Standards Process Group and OGC. The CF conventions allow you to define values at points, and the associated coordinates may have bounds attributes to indicate a spatial extent bigger than a single point. A two-dimensional array of points, encodes a structured topology but the CF conventions do not yet provide the means to define an unstructured topology. That's what this proposal adds.

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. This document describes the attribute conventions for storing the mesh topology and for associating variables with (specific locations on) 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 metadata 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)
  • higher order element data; for an idea how such data could be stored see this other proposal.
  • subgrid data; the netCDF pages by the BAW contain some proposals on this topic (see their pages (in German)).
  • 3D fully unstructured meshes (included but still limited in scope).
    See also a related proposal for an unstructured mesh data model by Jeff Daily at PNNL.

More details can be found in the various sections below:

Topology.

Naming conventions for geometrical elements.

Inspired by Wikipedia's definition of network topology, we define the mesh topology here 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 we are defining this CF extension, we'll always add coordinate data. Within a mesh, one can distinguish 0-, 1-, 2- and 3-dimensional elements. We need some names to identify these four types of elements; after discussion we propose the following names:

Dimensionality

Proposed Name

Comments

0

node

A point, a coordinate pair or triplet: the most basic element of the topology.
The word node seems to be more commonly used than the alternative "vertex".

1

edge

A line or curve bounded by two nodes.

2

face

A plane or surface enclosed by a set of edges.
In a 2D horizontal application one may consider the word "polygon", but in the hierarchy of elements the word face is most common.

3

volume

A volume enclosed by a set of faces.

NOTE: In favor of simpler code for interpreting compliant files, we have dropped to use of the locations attribute which allowed the user to specify his/her own names for nodes, edges, faces and volumes.

1D network topology.

The topology information is stored as attributes to a dummy variable (in the example below called "Mesh1") with standard_name mesh_topology.

Required topology attributes

Value

standard_name

mesh_topology

dimension

1

node_coordinates

edge_node_connectivity

Optional attributes

edge_coordinates

The attribute dimension indicates the highest dimensionality of the geometric elements; for a 1D network this should be 1. The attribute node_coordinates points to the auxiliary coordinate variables representing the node locations (latitude, longitude, and optional elevation or other coordinates). These auxiliary coordinate variables will have length nNodes. The attribute edge_node_connectivity points to an index variable identifying for every edge to the indices of its begin and end nodes. The connectivity array will thus be a matrix of size nEdges x 2. For the indexing one may use either 0- or 1-based indexing; the convention used should be specified using a start_index attribute to the index variable (i.e. Mesh1_edge_nodes in the example below). Consistent with the CF-conventions compression option, the connectivity indices are 0-based by default.

NOTE: The option to support both 0- and 1-based indexing was introduced to be able to support existing files with 1-based index tables using ncML.

The mesh_topology may optionally include an edge_coordinates attribute which points to the auxiliary coordinate variables associated with the characteristic location of the edge (commonly the midpoint). These auxiliary coordinate variables will have length nEdges, and may have in turn a bounds attribute that specifies the bounding coordinates of the edge (thereby duplicating the data in the node_coordinates variables).

NOTE: This use of the bounds attribute is consistent with the CF-convention on the use of bounds for multi-dimensional coordinate variables with p-sided cells, but it may not strictly be supported by the CF-convention right now.

Example:

dimensions:
        nMesh1_node = 5 ;
        nMesh1_edge = 4 ;

        Two = 2;

variables:
// Mesh node 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" ;

// Optional mesh edge coordinate variables
        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. midpoint of the edge)." ;
                Mesh1_edge_x:units = "degrees_east" ;
                Mesh1_edge_x:bounds = "Mesh1_edge_xbnds" ;
        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. midpoint of the edge)." ;
                Mesh1_edge_y:units = "degrees_north" ;
                Mesh1_edge_y:bounds = "Mesh1_edge_ybnds" ;
        double Mesh1_edge_xbnds(nMesh1_edge,Two) ;
                Mesh1_edge_xbnds:standard_name = "longitude" ;
                Mesh1_edge_xbnds:long_name = "Longitude bounds of 1D network edge (i.e. begin and end longitude)." ;
                Mesh1_edge_xbnds:units = "degrees_east" ;
        double Mesh1_edge_ybnds(nMesh1_edge,Two) ;
                Mesh1_edge_ybnds:standard_name = "latitude" ;
                Mesh1_edge_ybnds:long_name = "Latitude bounds of 1D network edge (i.e. begin and end latitude)." ;
                Mesh1_edge_ybnds:units = "degrees_north" ;

// Mesh topology
        integer Mesh1_edge_nodes(nMesh1_edge, Two) ;
                Mesh1_edge_nodes:standard_name = "edge_node_connectivity" ;
                Mesh1_edge_nodes:long_name = "Maps every edge/link to the two nodes that it connects." ;
                Mesh1_edge_nodes:start_index = 1;
        integer Mesh1 ;
                Mesh1:standard_name = "mesh_topology" ;
                Mesh1:long_name = "Topology data of 1D network" ;
                Mesh1:dimension = 1 ;
                Mesh1:node_coordinates = "Mesh1_node_x Mesh1_node_y" ;
                Mesh1:edge_node_connectivity = "Mesh1_edge_nodes" ;
                Mesh1:edge_coordinates = "Mesh1_edge_x Mesh1_edge_y" ; // optional attribute

2D triangular mesh topology.

The topology information is stored as attributes to a dummy variable (in the example below called "Mesh2") with standard_name mesh_topology.

Required topology attributes

Value

standard_name

mesh_topology

dimension

2

node_coordinates

face_node_connectivity

Optionally required attributes

edge_node_connectivity

Optional attributes

face_edge_connectivity

face_face_connectivity

face_coordinates

edge_coordinates

The attribute dimension indicates the highest dimensionality of the geometric elements; for a 2-dimensional (triangular) mesh this should be 2. The attribute node_coordinates points to the auxiliary coordinate variables representing the node locations (latitude, longitude, and optional elevation or other coordinates). These auxiliary coordinate variables will have length nNodes. The attribute face_node_connectivity points to an index variable identifying for every face (here consistently triangle) the indices of its three corner nodes. The corner nodes should be specified in anticlockwise direction as viewed from above (consistent with the CF-convention for bounds of p-sided cells. The connectivity array will thus be a matrix of size nFaces x 3. For the indexing one may use either 0- or 1-based indexing; the convention used should be specified using a start_index attribute to the index variable (i.e. Mesh2_face_nodes in the example below). Consistent with the CF-conventions compression option, the connectivity indices are 0-based by default.

In case you want to later define variables on the edges of the triangular mesh topology you need to specify the edge_node_connectivity attribute to map edges to nodes. Although the face to node mapping implicitly also defines edges, it does not specify the global numbering of edges. Again the indexing convention of edge_node_connectivity should be specified using the start_index attribute to the index variable (i.e. Mesh2_edge_nodes in the example below) and 0-based indexing is the default.

Optionally the topology may have the following attributes:

  • face_edge_connectivity pointing to an index variable identifying for every face (here consistently triangle) the indices of its three edges. The edges should be specified in anticlockwise direction as viewed from above. This connectivity array will thus be a matrix of size nFaces x 3. Again the indexing convention of face_edge_connectivity should be specified using the start_index attribute to the index variable (i.e. Mesh2_face_edges in the example below) and 0-based indexing is the default.
  • face_face_connectivity pointing to an index variable identifying pairs of faces (here consistently triangle) that share an edge, i.e. are neighbors. This connectivity array will thus be a matrix of size nFacePairs x 2. Again the indexing convention of face_face_connectivity should be specified using the start_index attribute to the index variable (i.e. Mesh2_face_links in the example below) and 0-based indexing is the default.
  • face_coordinates and/or edge_coordinates pointing to the auxiliary coordinate variables associated with the characteristic location of the faces and edges. These auxiliary coordinate variables will have length nFaces and nEdges respectively, and may have in turn a bounds attribute that specifies the bounding coordinates of the face or edge (thereby duplicating the data in the node_coordinates variables).

Example:

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

        Two = 2 ;
        Three = 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" ;

// Optional mesh face and edge coordinate variables
        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" ;
                Mesh2_face_x:bounds = "Mesh2_face_xbnds" ;
        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" ;
                Mesh2_face_y:bounds = "Mesh2_face_ybnds" ;
        double Mesh2_face_xbnds(nMesh2_face,Three) ;
                Mesh2_face_xbnds:standard_name = "longitude" ;
                Mesh2_face_xbnds:long_name = "Longitude bounds of 2D mesh triangle (i.e. corner coordinates)." ;
                Mesh2_face_xbnds:units = "degrees_east" ;
        double Mesh2_face_ybnds(nMesh2_face,Three) ;
                Mesh2_face_ybnds:standard_name = "latitude" ;
                Mesh2_face_ybnds:long_name = "Latitude bounds of 2D mesh triangle (i.e. corner coordinates)." ;
                Mesh2_face_ybnds: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. midpoint 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. midpoint of the edge)." ;
                Mesh2_edge_y:units = "degrees_north" ;

// Mesh topology
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;
                Mesh2_edge_nodes:standard_name = "edge_node_connectivity" ;
                Mesh2_edge_nodes:long_name = "Maps every edge to the two nodes that it connects." ;
                Mesh2_edge_nodes:start_index = 1 ;
        integer Mesh2_face_nodes(nMesh2_face, Three) ;
                Mesh2_face_nodes:standard_name = "face_node_connectivity" ;
                Mesh2_face_nodes:long_name = "Maps every triangular face to its three corner nodes." ;
                Mesh2_face_nodes:start_index = 1 ;
        integer Mesh2 ;
                Mesh2:standard_name = "mesh_topology" ;
                Mesh2:long_name = "Topology data of 2D unstructured mesh" ;
                Mesh2:dimension = 2 ;
                Mesh2:node_coordinates = "Mesh2_node_x Mesh2_node_y" ;
                Mesh2:face_node_connectivity = "Mesh2_face_nodes" ;
                Mesh2:edge_node_connectivity = "Mesh2_edge_nodes" ; // attribute required if variables will be defined on edges
                Mesh2:edge_coordinates = "Mesh2_edge_x Mesh2_edge_y" ; // optional attribute
                Mesh2:face_coordinates = "Mesh2_face_x Mesh2_face_y" ; // optional attribute
                Mesh2:face_edge_connectivity = "Mesh2_face_edges" ; // optional attribute
                Mesh2:face_face_connectivity = "Mesh2_face_links" ; // optional attribute

// Optional mesh topology variables
        integer Mesh2_face_edges(nMesh2_face, Three) ;
                Mesh2_face_edges:standard_name = "face_edge_connectivity" ;
                Mesh2_face_edges:long_name = "Maps every triangular face to its three edges." ;
                Mesh2_face_edges:start_index = 1 ;
        integer Mesh2_face_links(nMesh2_face_links, Two) ;
                Mesh2_face_links:standard_name = "face_face_connectivity" ;
                Mesh2_face_links:long_name = "Indicates pairs of (triangular) faces that share an edge." ;
                Mesh2_face_nodes:start_index = 1 ;

========= The text below has not yet been updated =========

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 dimension and locations. The value of the dimension 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_edge_connectivity and edge_node_connectivity are composed of two location names and the word 'connectivity'. An optional but recommended attribute face_node_connectivity should refer to a variable that specifies the corner nodes for each face. If omitted this mapping can be inferred from the combination of face_edge_connectivity and edge_node_connectivity. The attributes discussed above now tell us about the Mesh2 example below that:

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_edges" (the value of face_edge_connectivity) is the variable that defines each face by means of its edges.
7. 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_face_connectivity attribute that specifies which faces are neighbors.

Example:

dimensions:
        nMesh2_node = 5 ;
        nMesh2_edge = 6 ;
        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 = "edge_node_connectivity" ;
                Mesh2_edge_nodes:long_name = "Maps every edge to the two nodes that it connects." ;
        integer Mesh2_face_edges(nMesh2_face, nMaxMesh2_face_nodes) ;
                Mesh2_face_edges:standard_name = "face_edge_connectivity" ;
                Mesh2_face_edges:long_name = "Maps every face to its edges." ;
                Mesh2_face_edges:order = "clockwise";
                Mesh2_face_edges:_FillValue = 999999 ;
        integer Mesh2_face_nodes(nMesh2_face, nMaxMesh2_face_nodes) ;
                Mesh2_face_nodes:standard_name = "face_node_connectivity" ;
                Mesh2_face_nodes:long_name = "Maps every face to its corner nodes." ;
                Mesh2_face_edges:order = "clockwise";
                Mesh2_face_nodes:_FillValue = 999999 ;
        integer Mesh2_face_links(nMesh2_face_links, Two) ;
                Mesh2_face_links:standard_name = "face_face_connectivity" ;
                Mesh2_face_links:long_name = "Indicates which faces are neighbors." ;
        integer Mesh2 ;
                Mesh2:standard_name = "mesh_topology" ;
                Mesh2:long_name = "Topology data of 2D unstructured mesh" ;
                Mesh2:dimension = 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_edge_connectivity = "Mesh2_face_edges" ;
                Mesh2:face_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 mesh 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 ;
        nMesh2_layers = 10 ;

        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 = "edge_node_connectivity" ;
                Mesh2_edge_nodes:long_name = "Maps every edge to the two nodes that it connects." ;
        integer Mesh2_face_edges(nMesh2_face, nMaxMesh2_face_nodes) ;
                Mesh2_face_edges:standard_name = "face_edge_connectivity" ;
                Mesh2_face_edges:long_name = "Maps every face to its edges." ;
                Mesh2_face_edges:order = "clockwise";
                Mesh2_face_edges:_FillValue = 999999 ;
        integer Mesh2 ;
                Mesh2:standard_name = "mesh_topology" ;
                Mesh2:long_name = "Topology data of 2D unstructured mesh" ;
                Mesh2:dimension = 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_edge_connectivity = "Mesh2_face_edges" ;

// Vertical coordinate
        double Mesh2_layers(nMesh2_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:mesh = "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:mesh = "Mesh2"
                Mesh2_surface:location = "face" ;
                Mesh2_surface:coordinates = "Mesh2_face_x Mesh2_face_y" ;

fully 3D unstructured (i.e. non-layered) mesh topology.

TODO

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 mesh 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_waterlevel(time,nMesh2_face) ;
                Mesh2_waterlevel:standard_name = "sea_surface_height_above_geoid" ;
                Mesh2_waterlevel:units = "m" ;
                Mesh2_waterlevel:mesh = "Mesh2"
                Mesh2_waterlevel:location = "face" ;
                Mesh2_waterlevel:coordinates = "Mesh2_face_x Mesh2_face_y" ;

Volume and flux variables.

The same mesh geometry can be used in different ways to schematize the hydrodynamic volumes and fluxes. Let's take a simple triangular mesh. From a finite volume point of view this mesh will generally be interpreted as consisting of two volumes with triangular base. However, others may use a continuous Galerkin finite element method that can be shown to be equivalent to a subdivision into four volumes. In the former case the two faces correspond to volumes and the fluxes cross the edges. In the latter case the volumes are defined surrounding the four nodes and the fluxes are directed along the edges. The two abbreviated ncdumps below show how the basic 2D triangular mesh definition can be extended to include this data. The coordinate variables for the volume data now include bounds attributes to define the surface area of the volumes. Note the subtle difference in the long names between the flux variables in the two cases; the standard_name attribute have to make a more formal distinction between the two cases.

Variant 1: Volume at faces:

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

        Two = 2 ;
        Three = 3 ;

variables:
// Mesh coordinates
        double Mesh2_node_x(nMesh2_node) ;
                // as in 2D triangular mesh example
        double Mesh2_node_y(nMesh2_node) ;
                // as in 2D triangular mesh example
        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" ;
                Mesh2_face_x:bounds = "Mesh2_face_contour_x" ;
        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" ;
                Mesh2_face_y:bounds = "Mesh2_face_contour_y" ;
        double Mesh2_face_contour_x(nMesh2_face, nMaxMesh2_contour_pts) ;
                Mesh2_face_contour_x:standard_name = "longitude" ;
                Mesh2_face_contour_x:long_name = "List of x-points that form outline of flow volume" ;
                Mesh2_face_contour_x:units = "degrees_east" ;
        double Mesh2_face_contour_y(nMesh2_face, nMaxMesh2_contour_pts) ;
                Mesh2_face_contour_y:standard_name = "latitude" ;
                Mesh2_face_contour_y:units = "degrees_north" ;
                Mesh2_face_contour_y:long_name = "List of y-points that form outline of flow volume" ;
        double Mesh2_edge_x(nMesh2_edge) ;
                // as in 2D triangular mesh example
        double Mesh2_edge_y(nMesh2_edge) ;
                // as in 2D triangular mesh example

// Mesh topology
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;
                // as in 2D triangular mesh example
        integer Mesh2_face_edges(nMesh2_face, Three) ;
                // as in 2D triangular mesh example
        integer Mesh2_face_nodes(nMesh2_face, Three) ;
                // as in 2D triangular mesh example
        integer Mesh2_face_links(nMesh2_face_links, Two) ;
                // as in 2D triangular mesh example
        integer Mesh2 ;
                // as in 2D triangular mesh example

// Volume and flux data
        double Mesh2_volumes(nMesh2_face) ;
                Mesh2_volumes:long_name = "volumes" ;
                Mesh2_volumes:units = "m3" ;
                Mesh2_volumes:mesh = "Mesh2" ;
                Mesh2_volumes:location = "face" ;
                Mesh2_volumes:coordinates = "Mesh2_face_x Mesh2_face_y" ;
        double Mesh2_fluxes(nMesh2_edge) ;
                Mesh2_fluxes:long_name = "flux across edge" ;
                Mesh2_fluxes:units = "m3 s-1" ;
                Mesh2_fluxes:mesh = "Mesh2"
                Mesh2_fluxes:location = "edge" ;
                Mesh2_fluxes:coordinates = "Mesh2_edge_x Mesh2_edge_y" ;

Variant 2: Volume at nodes:

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

        Two = 2 ;
        Three = 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" ;
                Mesh2_node_x:bounds = "Mesh2_node_contour_x" ;
        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" ;
                Mesh2_node_y:bounds = "Mesh2_node_contour_y" ;
        double Mesh2_node_contour_x(nMesh2_face, nMaxMesh2_contour_pts) ;
                Mesh2_node_contour_x:standard_name = "longitude" ;
                Mesh2_node_contour_x:long_name = "List of x-points that form outline of flow volume" ;
                Mesh2_node_contour_x:units = "degrees_east" ;
        double Mesh2_node_contour_y(nMesh2_face, nMaxMesh2_contour_pts) ;
                Mesh2_node_contour_y:standard_name = "latitude" ;
                Mesh2_node_contour_y:units = "degrees_north" ;
                Mesh2_node_contour_y:long_name = "List of y-points that form outline of flow volume" ;
        double Mesh2_face_x(nMesh2_face) ;
                // as in 2D triangular mesh example
        double Mesh2_face_y(nMesh2_face) ;
                // as in 2D triangular mesh example
        double Mesh2_edge_x(nMesh2_edge) ;
                // as in 2D triangular mesh example
        double Mesh2_edge_y(nMesh2_edge) ;
                // as in 2D triangular mesh example

// Mesh topology
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;
                // as in 2D triangular mesh example
        integer Mesh2_face_edges(nMesh2_face, Three) ;
                // as in 2D triangular mesh example
        integer Mesh2_face_nodes(nMesh2_face, Three) ;
                // as in 2D triangular mesh example
        integer Mesh2_face_links(nMesh2_face_links, Two) ;
                // as in 2D triangular mesh example
        integer Mesh2 ;
                // as in 2D triangular mesh example

// Volume and flux data
        double Mesh2_volumes(nMesh2_node) ;
                Mesh2_volumes:long_name = "volumes" ;
                Mesh2_volumes:units = "m3" ;
                Mesh2_volumes:mesh = "Mesh2" ;
                Mesh2_volumes:location = "node" ;
                Mesh2_volumes:coordinates = "Mesh2_node_x Mesh2_node_y" ;
        double Mesh2_fluxes(nMesh2_edge) ;
                Mesh2_fluxes:long_name = "flux along edge" ;
                Mesh2_fluxes:units = "m3 s-1" ;
                Mesh2_fluxes:mesh = "Mesh2"
                Mesh2_fluxes:location = "edge" ;
                Mesh2_fluxes:coordinates = "Mesh2_edge_x Mesh2_edge_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 "node"s of Mesh1 (red points). 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. The grod and location attributes of the location map variable are required; the coordinates attribute is optional. Note that the coordinates attributes on both "Mesh1_cell" and "Mesh1_waterlevel" are 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:mesh = "Mesh1" ;
                Mesh1_cell:location = "node" ;
                Mesh1_cell:coordinates = "Mesh1_cell_x Mesh1_cell_y" ;
        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 creating subsets of the original locations as well as for renumbering the locations. If the location_map attribute is used, then the mesh 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.

In the previous sections, we have extensively looked at single mesh geometries. What about the results file of a model with an integrated 1D, 2D and 3D model. Instead of trying to put the whole geometry into one big complex generic geometry definition, we propose to add an extra attribute parent_mesh to the individual mesh definitions. The parent_mesh attribute points to a variable that contains all the meta-data for the combined mesh. The "CombinedMesh" variable contains attributes sub_meshes and contact. The sub_meshes attribute refers back to all submeshes and the contact attribute points to two variables that define the shared edges of the meshes. For each edge that two meshes have in common, the variable "CombiMesh_edge_mesh" points to the two meshes and the variable "CombiMesh_edge" points to the indices of the edges within those meshes that correspond. For example, if edge 6 of "Mesh2" aligns with edge 1 of "Mesh3", then "CombiMesh_edge_mesh" stores integer flags 1 and 2 (representing "Mesh2" and "Mesh3" respectively) and "CombiMesh_edge" stores the edge indices 5 and 0. Consistent with all other indices, the mesh and edge indices are 0-based. At the interface of the 1D and 2D mesh, a 1D edge should cross the 2D edge.

(warning) I thought that by working with edges one could represent all cases, but I just realized that a 1D mesh (network) connected to a 2D finite element mesh doesn't have any crossing or shared edges. It seems that this approach was too much inspired by our finite volume approach. Need to think about this again...

dimensions:
        // dimensions for mesh 1
        nMesh1_node = 3 ;
        nMesh1_edge = 2 ;

        // dimensions for mesh 2
        nMesh2_node = 6 ;
        nMesh2_edge = 7 ;
        nMesh2_face = 2 ;
        nMaxMesh2_face_nodes = 4 ;

        // dimensions for mesh 3
        nMesh3_node = 6 ;
        nMesh3_edge = 7 ;
        nMesh3_face = 2 ;
        nMaxMesh3_face_nodes = 4 ;
        nMesh3_layers = 10 ;

        // dimension for combined mesh
        nCombiMesh_contacts = 3 ;

        // common dimensions
        Two = 2 ;

variables:
// Mesh coordinates of Mesh1
        // skipped

// Topology of Mesh1
        integer Mesh1_edge_nodes(nMesh1_edge, Two) ;
                Mesh1_edge_nodes:standard_name = "edge_node_connectivity" ;
                Mesh1_edge_nodes:long_name = "links between two nodes" ;
        integer Mesh1 ;
                Mesh1:standard_name = "mesh_topology" ;
                Mesh1:long_name = "Topology data of Mesh1" ;
                Mesh1:dimension = 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" ;

// Mesh coordinates of Mesh2
        // skipped

// Topology of Mesh2
        integer Mesh2_edge_nodes(nMesh2_edge, Two) ;
                Mesh2_edge_nodes:standard_name = "edge_node_connectivity" ;
                Mesh2_edge_nodes:long_name = "link between two nodes" ;
        integer Mesh2_face_edges(nMesh2_face, nMaxMesh2_face_nodes) ;
                Mesh2_face_edges:standard_name = "face_edge_connectivity" ;
                Mesh2_face_edges:long_name = "Maps every face to its edges." ;
                Mesh2_face_edges:order = "clockwise";
                Mesh2_face_edges:_FillValue = 999999 ;
        integer Mesh2 ;
                Mesh2:standard_name = "mesh_topology" ;
                Mesh2:long_name = "Topology data of Mesh2" ;
                Mesh2:dimension = 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_edge_connectivity = "Mesh2_face_edges" ;
                Mesh2:parent_mesh = "CombinedMesh" ;

// Mesh coordinates of Mesh3
        // skipped

// Topology of Mesh3
        double Mesh3_layers(nMesh3_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_waterlevel depth: Mesh3_depth" ;
        integer Mesh3 ;
                Mesh3:standard_name = "mesh_topology" ;
                Mesh3:long_name = "Topology data of Mesh3" ;
                Mesh3:dimension = 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_face_connectivity = "Mesh3_face_links" ;
                Mesh3:parent_mesh = "CombinedMesh" ;

// Topology of combined mesh
        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 ;
                CombinedMesh:long_name = "Topology data of CombinedMesh" ;
                CombinedMesh:sub_meshes = "Mesh1 Mesh2 Mesh3" ;
                CombinedMesh:contact = "CombiMesh_edge_mesh CombiMesh_edge" ;

// Other variables
        // skipped

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 in D-Flow FM. Please find a translation table below:

Unstructured grids in D-Flow FM

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 = 5 ;
        nMesh1_edge = 4 ;
        nMaxMesh1_contour_pts = 99 ;
        nMesh1_cell = 4 ;
        nMesh1_interface = 3 ;

        // 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 ;
        nMesh3_boundary_edges = 2 ;

        // dimension for combined mesh
        nCombiMesh_contacts = 3 ;

        // 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" ;
        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" ;
        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" ;

// Basic mesh topology
        integer Mesh1_edge_nodes(nMesh1_edge, Two) ;
                Mesh1_edge_nodes:standard_name = "edge_node_connectivity" ;
                Mesh1_edge_nodes:long_name = "links between two nodes" ;
        integer Mesh1 ;
                Mesh1:standard_name = "mesh_topology" ;
                Mesh1:long_name = "Topology data of Mesh1" ;
                Mesh1:dimension = 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_node_connectivity = "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:standard_names = "edge_node_connectivity" ;
                Mesh2_edge_nodes:long_name = "link between two nodes" ;
        integer Mesh2_face_edges(nMesh2_face, nMaxMesh2_face_nodes) ;
                Mesh2_face_edges:standard_name = "face_edge_connectivity" ;
                Mesh2_face_edges:long_name = "Maps every face to its edges." ;
                Mesh2_face_edges:order = "clockwise";
                Mesh2_face_edges:_FillValue = 999999 ;
        integer Mesh2 ;
                Mesh2:standard_name = "mesh_topology" ;
                Mesh2:long_name = "Topology data of Mesh2" ;
                Mesh2:dimension = 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_edges" ;
                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:standard_name = "edge_node_connectivity" ;
                Mesh3_edge_nodes:long_name = "link between two nodes" ;
        integer Mesh3_face_edges(nMesh3_face, nMaxMesh3_face_nodes) ;
                Mesh3_face_edges:standard_name = "face_edge_connectivity" ;
                Mesh3_face_edges:long_name = "Maps every face to its edges." ;
                Mesh3_face_edges:order = "clockwise";
                Mesh3_face_edges:_FillValue = 999999 ;
        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:standard_name = "mesh_topology" ;
                Mesh3:long_name = "Topology data of Mesh3" ;
                Mesh3:dimension = 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_node_connectivity = "Mesh3_edge_nodes" ;
                Mesh3:face_coordinates = "Mesh3_face_x Mesh3_face_y" ;
                Mesh3:face_edge_connectivity = "Mesh3_face_edges" ;
                Mesh3:parent_mesh = "CombinedMesh" ;

// Information of combined mesh
        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 ;
                CombinedMesh:long_name = "Topology data of CombinedMesh" ;
                CombinedMesh:sub_meshes = "Mesh1 Mesh2 Mesh3" ;
                CombinedMesh:contact = "CombiMesh_edge_mesh CombiMesh_edge" ;

// Time coordinate
        double time(time) ;
                time:standard_name = "time" ;
                time:units = "seconds since 1992-08-31 00:00:00" ;

// The 1D network connects to the 2D mesh by having one network node inside one
// of the 2D mesh faces. The values (water level, concentrations, etc.) at this
// common volume are only stored on the 2D mesh. Therefore, we have simulation
// data on only a subset of the 1D network and we thus define two location maps
// for the 1D network: one for the flow cells (at the 1D network nodes) and one
// for the flow links (at the 1D network edges).

        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" ;
                Mesh1_cell_x:bounds = "Mesh1_cell_contour_x" ;
        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" ;
                Mesh1_cell_y:bounds = "Mesh1_cell_contour_y" ;
        double Mesh1_cell_contour_x(nMesh1_node, nMaxMesh1_contour_pts) ;
                Mesh1_cell_contour_x:standard_name = "projection_x_coordinate" ;
                Mesh1_cell_contour_x:long_name = "List of x-points that form outline of flow cell" ;
                Mesh1_cell_contour_x:units = "m" ;
        double Mesh1_cell_contour_y(nMesh1_node, nMaxMesh1_contour_pts) ;
                Mesh1_cell_contour_y:standard_name = "projection_y_coordinate" ;
                Mesh1_cell_contour_y:units = "m" ;
                Mesh1_cell_contour_y:long_name = "List of y-points that form outline of flow cell" ;
        integer Mesh1_flow_cell(nMesh1_cell) ;
                Mesh1_flow_cell:long_name = "map from flowcell to 1D mesh node" ;
                Mesh1_flow_cell:mesh = "Mesh1" ;
                Mesh1_flow_cell:location = "node" ; // location of flow cell on topological mesh entity.

        double Mesh1_interface_x(nMesh1_interface) ;
                Mesh1_interface_x:standard_name = "projection_x_coordinate" ;
                Mesh1_interface_x:long_name = "flow cell center x-coordinate" ;
                Mesh1_interface_x:units = "m" ;
        double Mesh1_interface_y(nMesh1_interface) ;
                Mesh1_interface_y:standard_name = "projection_y_coordinate" ;
                Mesh1_interface_y:long_name = "flow link center y-coordinate" ;
                Mesh1_interface_y:units = "m" ;
        integer Mesh1_flow_link(nMesh1_interface) ;
                Mesh1_flow_link:long_name = "map from flow link to 1D mesh edge" ;
                Mesh1_flow_link:mesh = "Mesh1" ;
                Mesh1_flow_link:location = "edge" ; // location of flow link on topological mesh entity.

// The open boundary on Mesh3 is defined by means of a location map.

        double Mesh3_boundary_x(nMesh3_boundary_edges) ;
                Mesh3_boundary_x:standard_name = "projection_x_coordinate" ;
                Mesh3_boundary_x:long_name = "x-coordinate of boundary edge" ;
                Mesh3_boundary_x:units = "m" ;
        double Mesh3_boundary_y(nMesh3_boundary_edges) ;
                Mesh3_boundary_y:standard_name = "projection_y_coordinate" ;
                Mesh3_boundary_y:long_name = "y-coordinate of boundary edge" ;
                Mesh3_boundary_y:units = "m" ;
        integer Mesh3_boundary(nMesh3_boundary_edges) ;
                Mesh3_boundary:long_name = "index for open boundary edges on mesh3" ;
                Mesh3_boundary:mesh = "Mesh3" ;
                Mesh3_boundary:location = "edge" ;

// Data on Mesh1
        double Mesh1_zwl(time, nMesh1_cell) ;
                Mesh1_zwl:standard_name = "sea_surface_height_above_geoid" ;
                Mesh1_zwl:units = "m" ;
                Mesh1_zwl:location_map = "Mesh1_flow_cell" ;
                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_flow_link" ;
                Mesh1_u:coordinates = "Mesh1_interface_x Mesh1_interface_y" ;

// Data on Mesh2
        double Mesh2_depth(nMesh2_node) ;
                Mesh2_depth:standard_name = "sea_floor_depth_below_geoid" ;
                Mesh2_depth:units = "m" ;
                Mesh2_depth:positive = "down" ;
                Mesh2_depth:mesh = "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:mesh = "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:mesh = "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:mesh = "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:mesh = "Mesh2"
                Mesh2_unorm:location = "edge" ;
                Mesh2_unorm:coordinates = "Mesh2_edge_x Mesh2_edge_y" ;
        integer Mesh2_edgetype(nMesh2_edge) ;
                Mesh2_edgetype:long_name = "Type of edge" ;
                Mesh2_edgetype:valid_range = 0, 1 ;
                Mesh2_edgetype:valid_values = 0, 1 ;
                Mesh2_edgetype:flag_meanings = "closed_edge open_edge" ;
                Mesh2_edgetype:mesh = "Mesh2"
                Mesh2_edgetype:location = "edge" ;
                Mesh2_edgetype:coordinates = "Mesh2_edge_x Mesh2_edge_y" ;

// Data on Mesh3
        double Mesh3_depth(nMesh3_node) ;
                Mesh3_depth:standard_name = "sea_floor_depth_below_geoid" ;
                Mesh3_depth:units = "m" ;
                Mesh3_depth:positive = "down" ;
                Mesh3_depth:mesh = "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:mesh = "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:mesh = "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:mesh = "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:mesh = "Mesh3"
                Mesh3_unorm:location = "edge" ;
                Mesh3_unorm:coordinates = "Mesh3_edge_x Mesh3_edge_y Mesh3_layers" ;
        integer Mesh3_edgetype(nMesh3_edge) ;
                Mesh3_edgetype:long_name = "Type of edge" ;
                Mesh3_edgetype:valid_range = 0, 1 ;
                Mesh3_edgetype:valid_values = 0, 1 ;
                Mesh3_edgetype:flag_meanings = "closed_edge open_edge" ;
                Mesh3_edgetype:mesh = "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 = "Various iterations; see wiki history.";
                :Conventions = "CF-1.4:UGRID-0.1" ;
  • No labels