grid-archives v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
grid-archives converts TUGOm output to simuSWOT-compliant landscape files. The output grid must be specified using either the -z (zone name) or -g (grid file) option.
Usage¶
grid-archives [OPTIONS]
Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
|
Input directory. Default: Current directory ( |
|
Input file naming convention. Default: |
|
Input topography file(s). Multiple files are allowed, processed in order of priority (highest to lowest). |
|
Output grid zone name. Mutually exclusive with |
|
Output grid file. Mutually exclusive with |
|
Flood limits polygon file. |
|
Working date in the format |
|
Output directory. Default: Current directory ( |
Examples¶
Basic Conversion with Zone Name¶
Convert TUGOm output to simuSWOT-compliant files using a predefined zone:
grid-archives -p /path/to/input -z "Europe" -d 2026/05/22_12:00:00 -o /path/to/output
Basic Conversion with Grid File¶
Convert TUGOm output using a custom grid file:
grid-archives -p /path/to/input -g /path/to/grid.nc -d 2026/05/22_12:00:00 -o /path/to/output
Specify Input Convention¶
Use a custom naming convention for input files:
grid-archives -p /path/to/input -c "custom.YYYY-MM-DD.nc" -z "Europe" -d 2026/05/22_12:00:00
Include Topography Files¶
Specify multiple topography files (processed in order of priority):
grid-archives -p /path/to/input -b topo1.nc topo2.nc -z "Europe" -d 2026/05/22_12:00:00
Apply Flood Limits¶
Use a polygon file to define flood limits:
grid-archives -p /path/to/input -z "Europe" -f flood_limits.plg -d 2026/05/22_12:00:00
Full Example¶
Combine all options for a complete conversion:
grid-archives \
-p /path/to/input \
-c "custom.YYYY-MM-DD.nc" \
-b topo1.nc topo2.nc \
-z "Europe" \
-f flood_limits.plg \
-d 2026/05/22_12:00:00 \
-o /path/to/output
Environment Variables¶
grid-archives does not rely on specific environment variables. However, ensure that:
Input and output directories are accessible and writable.
The system has sufficient memory for processing large grid files.
Notes¶
Grid Specification:
Either
-z(zone name) or-g(grid file) must be provided. Using both will result in an error.
Date Format:
The date must be specified using the
-doption in the formatYYYY/MM/DD_HH:MN:SS[...].
Input Files:
The input directory (
-p) must contain files matching the specified convention (-c).If no convention is provided, the default
analysis.YYYY-MM.ncis used.
Topography Files:
Multiple topography files can be provided using
-b. They are processed in the order they are listed (highest priority first).
Output:
The output directory (
-o) will contain the generatedgrid-archives-<zone>.ncfile.