mesh-limits v3.2.3¶
Mercurial revision 5803:7164e00e8f3d | 2026-08-18
Description¶
mesh-limits is a tool designed to create model limits for mesh generation. It processes input files (such as shorelines, polygons, or existing limits) to define the boundaries of a computational domain, which can then be used for mesh generation in ocean modeling or other applications.
Usage¶
mesh-limits [OPTIONS] input
Options¶
General Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
Input/Output Options¶
Option |
Description |
|---|---|
|
Input file (e.g., shoreline file, polygon file, or existing limits file). |
|
Path to a pre-existing open limits file (for use with |
|
Path to a pre-processed limits file (for post-processing only). Disables |
|
Path to a template criteria file for mesh generation. |
|
Path to a domain polygon file. |
|
Path to the output file. Default: Derived from the input file and output format. |
|
Path to a raw shoreline file. |
|
Specify a zone (overrides |
|
Input file format. Default: Inferred from the file extension. |
|
Output file format. Default: Inferred from the file extension. |
Processing Options¶
Option |
Description |
|---|---|
|
Delimiting rectangular frame (e.g., |
|
Extract shorelines from the input. Disabled by |
|
Deprecated. Use |
|
Resolution of the output in meters (default: |
|
Subsampling level for small objects. Range: |
|
Root name for intermediate output files (default: |
|
Coordinates of an ocean point inside the domain (e.g., |
|
Paths to polygon files ( |
|
Enable debug outputs. |
|
Smooth the shoreline. Disabled by |
|
Build model limits. Disabled by |
|
Adjust coastal resolution to fit neighboring open limits (for assembly with pre-existing open limits). |
|
Use for non-open sea shorelines (e.g., lakes). |
|
Target isovalue for shoreline smoothing (optimal: |
Advanced Options¶
Option |
Description |
|---|---|
|
Background smoothing grid resolution in meters (default: |
|
Smoothing length in meters (default: |
Examples¶
Basic Usage with Polygon and Shoreline¶
Create model limits using a polygon file and a shoreline file, with an ocean point:
mesh-limits -p test.scan -s world-shoreline.shp --point '[-5;48]'
Extract Shorelines¶
Extract shorelines from a raw shoreline file:
mesh-limits -s world-shoreline.shp --extract --point '[-5;48]'
Smooth Shorelines¶
Smooth shorelines with a custom sampling length and smoothing:
mesh-limits -s world-shoreline.shp --sampling-length 2000 --smooth --point '[-5;48]'
Use Pre-Existing Open Limits¶
Use a pre-existing open limits file for assembly:
mesh-limits -a open_limits.plg -p domain_polygon.scan --adjust
Variable Resolution¶
Use variable resolution with polygon and value files:
mesh-limits -p domain_polygon.scan --resolution "resolution.nei resolution.dat" --point '[-5;48]'
Frame-Based Limits¶
Define limits using a rectangular frame:
mesh-limits --frame "-10,40,10,50" --sampling-length 1000 --point '[-5;48]'
Lake Mode¶
Create limits for a lake (non-open sea):
mesh-limits -p lake_polygon.scan -s lake_shoreline.shp --lake --point '[2;45]'
Custom Isocontour¶
Use a custom isocontour value for shoreline smoothing:
mesh-limits -s world-shoreline.shp --isocontour -0.2 --point '[-5;48]'
Output to Specific File¶
Save output to a specific file:
mesh-limits -p test.scan -s world-shoreline.shp -o output_limits.plg --point '[-5;48]'
Environment Variables¶
mesh-limits does not rely on specific environment variables. However, it may interact with system-level configurations for file paths or parallel processing if integrated with other tools.
Notes¶
Input Files:
The input file can be a shoreline file, polygon file, or an existing limits file.
If no input file is provided, shorelines will be extracted from the default shoreline database (
/home/data/shorelines/gshhs-2.2/gshhs_f.cst).
Output Files:
The output file format is inferred from the extension (e.g.,
.plg,.scan,.shp).Intermediate files (e.g., smoothed shorelines, resampled boundaries) are saved with the
--rootnameprefix.
Shoreline Extraction:
Use
--extractto extract shorelines from a raw shoreline file.Extracted shorelines are saved to a file named
<rootname>-shoreline-extraction.plg.
Smoothing:
Smoothing is applied to filter sub-scale details and aggregate small structures.
The smoothing length (
-l) and background grid resolution (-r) can be adjusted for finer control.
Model Limits:
Model limits are built from shorelines and selection polygons.
Ocean sections are flagged as
'M', while coastal sections are flagged as'T'.
Assembly:
Use
-ato assemble newly created model boundaries with pre-existing open limits.The
--adjustoption ensures coastal resolution matches neighboring open limits.
Variable Resolution:
Use
--resolutionto specify polygon and value files for variable resolution sampling.This is useful for domains requiring non-uniform mesh resolution.
Debugging:
Use
--debugto enable debug outputs, which can help diagnose issues with shoreline extraction or limit generation.
Deprecated Options:
--samplingis deprecated. Use--sampling-lengthinstead.
See Also¶
mesh-split: For splitting meshes.mesh-assembly: For assembling meshes.mesh-generator: For generating meshes from limits and criteria files.GSHHS (Global Self-consistent, Hierarchical, High-resolution Shoreline Database): Default shoreline database used if no input is provided.