CLI usage#
The command line interface uses a single base command mhm-tools
.
All features are then provided as sub-commands as documented here.
Note
You can get help for each (sub-)command with the option -h
or --help
.
mhm-tools - CLI interface#
Command line interface for mhm-tools.
mhm-tools [-h] [-V] {bankfull,latlon} ...
mhm-tools options#
mhm-tools bankfull#
Calculate the river discharge at bankfull conditions and the bankfull width. Bankfull discharge is determined as the yearly peak flow with a recurrence interval given by “return_period”, which is 1.5 years by default. The wetted perimeter is estimated from bankfull discharge with Lacey’s formula. This routine will simply use the closest flood event in terms of its recurrence interval. Also, any input time-stepping is accepted but daily or sub-daily data is preferred. Ouput variables in the created NetCDF file are called “Q_bkfl” and “P_bkfl”.
mhm-tools bankfull [-h] [-r RETURN_PERIOD] [-w] [-v VAR] -i IN_FILE -o OUT_FILE
mhm-tools bankfull options#
-r
RETURN_PERIOD
,--return_period
RETURN_PERIOD
- The return period of the flood in years. (default:1.5
)-w
,--wetted_perimeter
- Additionally estimate the wetted perimeter.-v
VAR
,--var
VAR
- Variable name for routed streamflow in the NetCDF file (default:Qrouted
)
mhm-tools bankfull required arguments#
mhm-tools latlon#
Create the latlon.nc file required for mHM. The latlon file contains the lat-lon information for 3 levels in mHM: Level-0 (DEM), Level-1 (hydrology) and Level-11 (routing). All levels will be checked for compatibility including Level-2 (meteo). Level-0 can be given as a file or a dictionary containing an ascii grid header. Other levels can then be given by only a cell-size and will be determined from Level-0.
mhm-tools latlon [-h] -D LEVEL0 -H LEVEL1 [-R LEVEL11] [-M LEVEL2] [-c CRS] [-d DTYPE]
[-x {0,1,2,3,4,5,6,7,8,9}] [-b] [--h0 H0] [--h1 H1] [--h11 H11] [--h2 H2]
[-o OUT_FILE]
mhm-tools latlon options#
-R
LEVEL11
,--level11
LEVEL11
- Level-11 (routing) information. Either an ascii (header) file, a dictionary containing the header information or a cell-size to determine information from level-0. (default:None
)-M
LEVEL2
,--level2
LEVEL2
- Level-2 (meteorology) information. Either an ascii (header) file, a dictionary containing the header information or a cell-size to determine information from level-0. Level-2 information wont be written to the latlon file. (default:None
)-c
CRS
,--crs
CRS
- Coordinates reference system (e.g.'epsg:3035'
). If not given, headers will be interpreted as given in lat-lon ('epsg:4326'
). (default:None
)-d
DTYPE
,--dtype
DTYPE
- Data type for the latlon file and headers. (default:f4
)-x
COMPRESSION
,--compression
COMPRESSION
- Compression level for the NetCDF file. (default:9
)-b
,--add_bounds
- Add bounds to the NetCDF axis.--h0
H0
,--write_header_l0
H0
- Write the level-0 header to a given file path. (default:None
)--h1
H1
,--write_header_l1
H1
- Write the level-1 header to a given file path. (default:None
)--h11
H11
,--write_header_l11
H11
- Write the level-11 header to a given file path. (default:None
)--h2
H2
,--write_header_l2
H2
- Write the level-2 header to a given file path. (default:None
)-o
OUT_FILE
,--out_file
OUT_FILE
- The path of the output NetCDF file containing the latlon information. (default:latlon.nc
)
mhm-tools latlon required arguments#
-D
LEVEL0
,--level0
LEVEL0
- Level-0 (DEM) information. Either an ascii (header) file or a dictionary containing the header information. (default:None
)-H
LEVEL1
,--level1
LEVEL1
- Level-1 (hydrology) information. Either an ascii (header) file, a dictionary containing the header information or a cell-size to determine information from level-0. (default:None
)