SMS:MIKE 21 *.mesh

From XMS Wiki
(Redirected from SMS:Load MIKE 21 Files)
Jump to navigationJump to search

A MIKE 21 mesh file is a text/plain file and has the *.mesh extension. The text file defines a simple unstructured grid and is similar to a *.2dm file. It lists the node and a simplified element table in text format using spaces as separators. The MIKE 21 program is produced and distributed by the DHI group.

If a grid/mesh is available in this format, it can be loaded into SMS and used for further model construction/management. SMS reads the grid, stores it as a two-dimensional unstructured mesh and allows the user to associate it with any of the numerical engines supported in SMS by using the Data | Switch Current Model command.

Loading a MIKE 21 *.mesh file into SMS

To load the file:

  1. File | Open... or File | Open As...
  2. In the Open file dialog change the Files of type to "Mike 21 files (*.mesh)"
  3. Select the file and press Open

MIKE 21 File Format

A MIKE 21 mesh file uses the following format:

  • Header line – The first line. This line contains two integers expressing the type and unit of the bathymetry data. This followed by the number of nodes then by a string defining the projection.
  • Node lines – Every line after the header line for as many lines as stated in the header line. Each line contains information for one node in the format as follows:
    • The node point Id
    • The x coordinate (Easting or Longitude)
    • The y coordinate (Northing or Latitude)
    • The z value (bathymetry)
    • The node type (0 for water, 1 for land and above 1 for all other boundaries)
  • Element header line – One line containing three numbers. The numbers represent the following:
    • The number of elements
    • The maximum number of nodes per element
    • Internal code for mesh type (21 for purely triangular elements, 25 if quadrangular elements exists)
  • Element lines – Every line after the element header line for as many lines as stated in the element header line. Each line contains information for one element in the format as follows:
    • The element Id
    • Id for node_1
    • Id for node_2
    • Id for node_3
    • (Id for node_4 )
Each line contains at most as many nodes as stated in the element header line. If an element has fewer nodes than the maximum number of nodes per element stated in the element header line then the remaining node Id value is 0.

For additional information, see the DHI User Guide [1].

Related Topics