create_latlon#
- mhm_tools.pre.latlon.create_latlon(out_file, level0, level1, level11=None, level2=None, write_header_l0=None, write_header_l1=None, write_header_l11=None, write_header_l2=None, crs=None, dtype='f4', compression=9, add_bounds=False)[source]#
Create the latlon.nc file from given ASCII headers.
- Parameters:
out_file (Pathlike) – The path of the output NetCDF file containing the latlon information.
level0 (dict or Pathlike) – Level-0 (DEM) information. Either an ascii (header) file or a dictionary containing the header information.
level1 (float or dict or Pathlike) – 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.
level11 (float or dict or Pathlike, optional) – 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.
level2 (float or dict or Pathlike, optional) – 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.
write_header_l0 (Pathlike, optional) – Write the level-0 header to a given file path.
write_header_l1 (Pathlike, optional) – Write the level-1 header to a given file path.
write_header_l11 (Pathlike, optional) – Write the level-11 header to a given file path.
write_header_l2 (Pathlike, optional) – Write the level-2 header to a given file path.
crs (str, optional) – Coordinates reference system (e.g. ‘epsg:3035’). If not given, headers will be interpreted as given in lat-lon (‘epsg:4326’).
dtype (str, optional) – Data type for the latlon file and headers, by default “f4”
compression (int, optional) – Compression level for the NetCDF file, by default 9
add_bounds (bool, optional) – Add bounds to the NetCDF axis, by default False