Skip to content

how are .msh files structured? #628

Answered by aliabdolali
poplarShift asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @poplarShift
WW3 uses the GMSH format as you mentioned. Here is the simplified format, required by WW3

$MeshFormat
2 0 8
$EndMeshFormat
$Nodes
    <node number>
<node index> <longitude> <latitude> <depth>
$EndNodes
$Elements
        <element number>
open boundary nodes
land boundary nodes
   element index     2     3     0     1     5  <element conections (3)> 
$EndElements

The attached matlab script writes the WW3 *msh file if you have node, open boundary nodes and elements info.
WW3_mesh_generator.m.zip
Here is the command you need,
WW3_mesh_generator(elelemt conection,longitude,latitude,depth,open boundary index,<name of the msh file>,0)

Regards
AA

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@poplarShift
Comment options

Answer selected by poplarShift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants