mesh2restart2d v3.2.3

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


Description

mesh2restart2d reformats simulation output files into restart files for further processing or analysis. It prepares the necessary data structures (mesh, bathymetry, and state variables) and saves them in the specified output format.


Usage

mesh2restart2d [OPTIONS] <inputs-path>

Options

Option

Description

-h, --help

Display this help message and exit.

-m <file>

Mesh file: Path to the input mesh file (required).

-b <file>

Bathymetry file: Path to the input bathymetry file (required).

-t <seconds>

Restart time: Time of the restart in seconds since 2004/12/01.

-s <seconds>

Time shift: Shift the restart time by the specified number of seconds.

-0

CLS format: Activate the CLS output format.

-1

CDF format: Activate the CDF output format.

Deprecated Options
| -o <rootname> | Deprecated: Rootname for the output file. Use <output-path> instead. |


Examples

Basic Usage (CLS Format)

Reformat simulation outputs into a CLS restart file:

mesh2restart2d -m mesh_file.nc -b bathymetry_file.nc -t 3600 -s 100 -0 /path/to/inputs

Basic Usage (CDF Format)

Reformat simulation outputs into a CDF restart file:

mesh2restart2d -m mesh_file.nc -b bathymetry_file.nc -t 7200 -1 /path/to/inputs

With Time Shift

Apply a time shift of 500 seconds to the restart file:

mesh2restart2d -m mesh_file.nc -b bathymetry_file.nc -t 3600 -s 500 -0 /path/to/inputs

Environment Variables

None.


Notes

  1. Required Files:

  • A mesh file (-m) and a bathymetry file (-b) are mandatory for execution.

  • The <output-path> argument is required to specify where the restart files will be saved.

  1. Time Reference:

  • The restart time (-t) is specified in seconds since 2004/12/01 00:00:00. Ensure this aligns with your simulation’s time reference.

  1. Output Formats:

  • Use -0 for CLS format or -1 for CDF format. The default behavior depends on the implementation if neither is specified.

  1. Time Shift:

  • The -s option allows you to adjust the restart time by a specified number of seconds. This is useful for synchronizing with other datasets or simulations.

  1. Error Handling:

  • If the mesh or bathymetry file is missing, the program will abort with an error message.

  • The output directory must be writable; otherwise, the program will fail.


See Also