mesh-topo v3.2.3¶
Mercurial revision 5786:5c8b45563631 | 2026-08-04
Description¶
Interpolates bathymetry and its gradient onto a given finite element (FE) mesh. This tool is designed for ocean modeling applications, allowing for the integration of bathymetric data into unstructured grids.
Usage¶
mesh-topo [OPTIONS] -m <mesh_file> -b <bathymetry_file> -p <paire>
Options¶
Option |
Description |
|---|---|
|
Print this help message. |
|
Input mesh file ( |
|
Bathymetry file (netCDF or |
|
Variable name in the bathymetry file (e.g., |
|
Output file name (optional). If not specified, files are auto-generated. |
|
Computational element pair. Required. Valid options: |
|
Root name for output files (e.g., |
|
Number of smoothing iterations to apply to the bathymetry (default: 0). |
|
Change the sign of bathymetry values (default: |
|
Missing value threshold (default: |
|
Replace masked values in the bathymetry file with zero. |
|
Enable debug mode for verbose output. |
|
Deprecated: Zone identifier (optional). |
|
Deprecated: Discretisation type. Use |
Examples¶
Basic Usage¶
Interpolate bathymetry onto a mesh using the LGP0xLGP1 pair:
mesh-topo -m mesh.nei -b bathymetry.nc -p LGP0xLGP1
Smoothing Bathymetry¶
Apply 5 smoothing iterations to the bathymetry:
mesh-topo -m mesh.nei -b bathymetry.nc -p LGP0xLGP1 --smoothed 5
Custom Output Root Name¶
Specify a root name for output files:
mesh-topo -m mesh.nei -b bathymetry.nc -p LGP0xLGP1 --rootname my_output
Disable Sign Change¶
Disable the automatic sign change for bathymetry values:
mesh-topo -m mesh.nei -b bathymetry.nc -p LGP0xLGP1 --change-sign=no
Multiple Bathymetry Files¶
Use multiple bathymetry files (prioritized in order):
mesh-topo -m mesh.nei -b bathymetry1.nc -b bathymetry2.grd -p LGP0xLGP1
Environment Variables¶
None.
Notes¶
Sign Convention: By default,
mesh-topoconverts negative depths (common in databases) to positive depths (expected by most ocean models). Use--change-sign=noto disable this.Masked Values: Masked values in the bathymetry file are replaced with the
--missingthreshold. Use-nomaskto replace them with zero.Discretisation Pairs: The
-poption determines the computational pair for topography and its gradient. For example:LGP0xLGP1: Topography on elevation nodes, gradient on velocity nodes.DGP1xLGP2: Higher-order discretisation for complex geometries.
Output Files: If
-ois not specified, output files are auto-generated with names liketopo-{discretisation}-0.s2r(raw interpolation) ortopo-{discretisation}-1.s2r(optimal estimate).
See Also¶