mesh-split v3.2.3¶
Mercurial revision 5786:5c8b45563631 | 2026-08-04
Description¶
mesh-split is a tool designed to refine and split meshes based on input polygons or predefined zones. It supports various mesh formats and provides options for customizing the splitting process, such as discretization, line modes, and exact node placement.
Usage¶
mesh-split [OPTIONS] -m input
Options¶
Option |
Description |
|---|---|
|
Show this help and exit. |
|
Required. Path to the input mesh file. |
|
Input mesh format. See Mesh Formats for supported formats. |
|
Path to the polygon input file to split the mesh. |
|
Root name for intermediate files. Default: |
|
Output file for the final result (used with |
|
Pre-set zone to limit the working area. Supported zones: |
|
Discretization element pairs (e.g., |
|
Type of coordinates: |
|
Move original nodes to exactly split on polygon limits. |
|
Enable quadrangle grid support. |
|
Enable polar grid support. |
|
Enable debug verbose mode. |
Mesh Formats¶
The following mesh formats are supported:
Format ID |
Format Name |
|---|---|
4 |
|
4 |
|
5 |
|
0 |
|
10 |
|
11 |
|
15 |
|
12 |
|
13 |
|
14 |
|
40 |
|
31 |
|
30 |
|
32 |
|
2 |
|
42 |
|
43 |
|
Examples¶
Basic Mesh Splitting¶
Split a mesh using a polygon file:
mesh-split -m input_mesh.nc -p polygon.plg
Split Mesh with Custom Root Name¶
Split a mesh and specify a custom root name for intermediate files:
mesh-split -m input_mesh.nc -p polygon.plg -r my_mesh_split
Split Mesh with Discretization¶
Split a mesh and apply discretization to the output:
mesh-split -m input_mesh.nc -p polygon.plg --with-discretisation "LGP0xLGP1 DGP1xLGP2" -o output_mesh.nc
Split Mesh in a Predefined Zone¶
Split a mesh limited to the korea zone:
mesh-split -m input_mesh.nc -z korea
Split Mesh with Exact Node Placement¶
Split a mesh and ensure nodes are exactly placed on polygon limits:
mesh-split -m input_mesh.nc -p polygon.plg --exact
Split Mesh with Quadrangle Support¶
Split a mesh with quadrangle grid support:
mesh-split -m input_mesh.nc -p polygon.plg --quadrangle
Split Mesh with Orthodromic Line Mode¶
Split a mesh using orthodromic coordinates:
mesh-split -m input_mesh.nc -p polygon.plg --line-mode ORTHODROMIC
Split Mesh with Debug Mode¶
Enable debug mode to generate intermediate files for troubleshooting:
mesh-split -m input_mesh.nc -p polygon.plg --debug
Environment Variables¶
mesh-split does not rely on specific environment variables. However, ensure your system has sufficient resources (memory and CPU) for processing large meshes.
Notes¶
Input Mesh File:
The
-moption is required and must point to a valid mesh file in one of the supported formats.
Polygon File:
The
-poption specifies the polygon file used to split the mesh. If not provided, the mesh will not be split.
Discretization:
Use
--with-discretisationto specify element pairs for discretization. The default isLGP0xLGP1.Example pairs:
LGP0xLGP1,DGP1xLGP2,DNP1xLGP2,Q1xQ0.
Line Modes:
LOXODROMIC(default): Rhumb line (constant bearing).ORTHODROMIC: Great circle (shortest path on a sphere).CARTESIAN: Straight line in Cartesian coordinates.
Zones:
Predefined zones (
korea,north-china, etc.) limit the working area to a specific geographic region.
Exact Node Placement:
The
--exactoption ensures that nodes are moved to exactly fit the polygon limits, which can be useful for precise splitting.
Debug Mode:
The
--debugoption generates intermediate files (dump-01.plg,dump-02.plg, etc.) for troubleshooting.
See Also¶
CF Conventions (for NetCDF-based mesh formats)
GMSH (for
gmshandgmsh_wwformats)FVCOM (for
fvcomformat)SCHISM (for
schismandschism-netcdfformats)TELEMAC (for
telemac_ascii,telemac_binary, andtelemac_swappedformats)