Add pre processor for latlon file creation
$ mhm-tools latlon -h
usage: 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]
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.
optional arguments:
-h, --help show this help message and exit
-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 {0,1,2,3,4,5,6,7,8,9}, --compression {0,1,2,3,4,5,6,7,8,9}
Compression level for the NetCDF file. (default: 9)
-b, --add_bounds Add bounds to the NetCDF axis. (default: False)
--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)
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)
Edited by Sebastian Müller