Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In an unstructured grid the data can be defined either on the nodes, the edges or the faces of the mesh (staggerLocations). Also see http://ugrid-conventions.github.io/ugrid-conventions/#data-defined-on-unstructured-meshes. Each grid definition in grids.xml is valid for only one staggerLocation and this should match the staggerLocation of the data that you are going to import using the grid definition. The staggerLocation on which the data is defined can be deduced from the data variable in a netcdf file that contains the data to import. The data variable (e.g. "water_level") has an attribute called "location" and a dimension (e.g. nmesh2d_face) that both indicate its staggerLocation. In the grid geometry choose the corresponding staggerLocation. If you want to import different data variables that are defined on different staggerLocations in the same mesh, then you will have to create separate grid definitions for different staggerLocations using the same mesh and from the same netcdf file, e.g.:

Code Block
<irregular locationId="SFBayFM_data_on_faces">
    <netcdfFile>
        <file>sfbay_flowgeom.nc</file>
        <geoDatum>UTM10N</geoDatum>
        <meshTopologyVariableName>mesh2d</meshTopologyVariableName>
        <staggerLocation>face</staggerLocation>
    </netcdfFile>
</irregular>
<irregular locationId="SFBayFM_data_on_nodes">
    <netcdfFile>
        <file>sfbay_flowgeom.nc</file>
        <geoDatum>UTM10N</geoDatum>
        <meshTopologyVariableName>mesh2d</meshTopologyVariableName>
        <staggerLocation>node</staggerLocation>
    </netcdfFile>
</irregular>

...