Import Curvilinear Grid Tool

From XMS Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to navigationJump to search


Import Curvilinear Grid

The Import Curvilinear Grid tool is used to load an existing curvilinear (boundary fitted) grid into SMS as a UGrid object. This will also create cell based datasets defining the I, J index of each cell in the UGrid. Depending on the selected format and the specific data file(s).

For EFDC grid files it may also create additional cell based datasets for the UGrid that is loaded. These can include:

  • Depth
  • Z Roughness
  • Vegetation type
  • Wind shelter

Input parameters

  • Format of the data file – Select the file format for the UGrid that will be imported.
    • "CH3D" – Will import a CH3D file.
    • "EFDC" – Will import a EFDC file.
  • CH3D formatted grid file – Clicking the Select File button will open a Select File dialog where the CH3D file can be selected.
  • EFDC formatted dxdy.inp file – Clicking the Select File button will open a Select File dialog where the dxyy.inp EFDC file can be selected.
  • EFDC formatted lxly.inp file – Clicking the Select File button will open a Select File dialog where the lxly.inp EFDC file can be selected.

Output parameters

  • Output UGrid name – Enter the name of the imported UGrid.

Current location in the toolbox

Unstructured Grids/Import Curvilinear Grid

CH3D Format

Format of the CH3D file (grid.inp). This file includes a 2 line header and a line for every corner point in a rectangular grid This includes inactive regions. The locations are ordered in a row major order. SMS will export 5 columns of data including (X, Y, Z, I, J). The (I, J) columns are not used in the import process. They are implied. The first line is a name to assign to the grid.

The second line defines the size of the grid based on cell corners. The number of cells in each direction is a maximum of the number of corners minus 1. Cell corners that do not correspond to an active cell in the grid is assigned a coordinate location of (9.0x1018, 9.0x1018, 9.0x1018).

Because this file format does not include cell based information, a single row or column of inactive cells is not supported. The corners of these cells are defined by the active neighbor, so the cell is assumed to exist. File organization:

    Grid_name
    num_rows_of_pts  num_cols_of_pts
    x y z 1 1
    x y z 2 1
    .
    .
    .
    x y z num_rows 1
    x y z 1 2
    x y z 2 2
    .
    .
    .
    x y z num_rows 2
    .
    .
    .
    x y z 1 num

Format of the EFDC files (dxdy.inp, lxly.inp). This format includes two files that work together to define the grid. The "dxdy.inp" files includes a 4 line comment header and a line for every active cell in the grid The header is metadata only and is not used in the import process. The last header line defines the values in each column for the data following. This includes:

  • I J: the column and row index of the cell on this line.
  • DX DY: the width and height of this cell.
  • WATER DEPTH: the depth of the water in this cell.
  • BOTTOM ELEV: the ground elevation value for this cell (cell based).
  • ZROUGH: the roughness for this cell.
  • VEG TYPE: the vegetation type for this cell.

The "lxly.inp" files also includes a 4 line comment header and a line for every active cell in the grid The header is metadata only and is not used in the import process. The last header line defines the values in each column for the data following. This includes:

  • I J: the column and row index of the cell on this line.
  • X Y: the location of the cell center of this cell.
  • CUE CVE CUN CVN: the orientation of this cell (rotation values)
  • WIND SHELTER: a wind shelter data value for this cell.

This format defines a nonconformal grid. Neighboring cells don't explicitly define the same corner points. When SMS loads this grid, the corner locations are merged to create a conformal grid. For this reason, when a grid is loaded and then rewritten, the detail definition may not be identical.