mesh-upgrade v3.2.3

Mercurial revision 5786:5c8b45563631 | 2026-08-04


Description

The mesh-upgrade tool refines, resamples, or subdivides edges of an existing mesh based on user-defined criteria. It is designed to improve mesh quality, handle polar regions, and ensure connectivity for unstructured ocean grids.


Usage

mesh-upgrade [OPTIONS] <meshfile> [-o <outputfile>] [-p <polyfile>] [-c <criteriafile>] [-m <maxrate>] [-d <dmax>] [-e <cmax>] [-z <zone>]

Options

Option

Description

-h, --help

Display this help message and exit.

-m <file>

Mesh file (.nei format). Use mesh-format to convert other grid format.

-p <polyfile>

Polygon file use to limit the woking area (–subdivide) or rework the mesh edge (–exact, –limited) .

-c <file>

Criteria file for meshing rules.

-o <file>

Final output mesh file. Default: mesh-upgrade.nei

--subdivide

Subdivide rigid boundaries based on criteria.

--resample

Enable boundary resampling.

--exact

Deform original mesh to excatly fit the polygon in mesh splitting.

--limited

Limit the merge of splitted meshes to the boundary of the main one.

--polar

Enandle specific routines to handle polar grid.

--debug

Enable debug verbose mode.


Examples

  1. Basic mesh refinement:

    mesh-upgrade input_mesh.nei -o refined_mesh.nei
    
  2. Refine with custom criteria:

    mesh-upgrade input_mesh.nei -c criteria.crt -o refined_mesh.nei
    
  3. Enable polar handling and debug mode:

    mesh-upgrade input_mesh.nei --polar --debug -o polar_refined_mesh.nei
    
  4. Subdivide rigid boundaries:

    mesh-upgrade input_mesh.nei --subdivide -p boundaries.plg -o subdivided_mesh.nei
    

Environment Variables

None.


Notes

  • The tool requires a valid mesh file (<meshfile>) as input.

  • If no output file is specified, the default output filename is mesh-upgrade.nei.

  • The --polar option is essential for handling meshes in polar regions (e.g., Antarctic or Arctic).

  • Debug mode (--debug) provides detailed logs for troubleshooting.


See Also