hydromt_sfincs.SfincsModel.setup_subgrid#
- SfincsModel.setup_subgrid(datasets_dep: List[dict], datasets_rgh: List[dict] = [], datasets_riv: List[dict] = [], buffer_cells: int = 0, nlevels: int = 10, nbins: int = None, nr_subgrid_pixels: int = 20, nrmax: int = 2000, max_gradient: float = 99999.0, z_minimum: float = -99999.0, huthresh: float = 0.01, q_table_option: int = 2, manning_land: float = 0.04, manning_sea: float = 0.02, rgh_lev_land: float = 0.0, write_dep_tif: bool = False, write_man_tif: bool = False)[source]#
Setup method for subgrid tables based on a list of elevation and Manning’s roughness datasets.
These datasets are used to derive relations between the water level and the volume in a cell to do the continuity update, and a representative water depth used to calculate momentum fluxes.
This allows that one can compute on a coarser computational grid, while still accounting for the local topography and roughness.
- Parameters:
datasets_dep (List[dict]) –
List of dictionaries with topobathy data. Each should minimally contain a data catalog source name, data file path, or xarray raster object (‘elevtn’). Optional merge arguments include: ‘zmin’, ‘zmax’, ‘mask’, ‘offset’, ‘reproj_method’, and ‘merge_method’, see example below. For a complete overview of all merge options, see
hydromt.workflows.merge_multi_dataarrays()
[ {'elevtn': 'merit_hydro', 'zmin': 0.01}, {'elevtn': 'gebco', 'offset': 0, 'merge_method': 'first', reproj_method: 'bilinear'} ]
datasets_rgh (List[dict], optional) –
List of dictionaries with Manning’s n datasets. Each dictionary should at least contain one of the following:
manning: filename (or Path) of gridded data with manning values
lulc (and reclass_table): a combination of a filename of gridded landuse/landcover and a mapping table.
In additon, optional merge arguments can be provided, e.g.:
[ {'manning': 'manning_data'}, {'lulc': 'esa_worlcover', 'reclass_table': 'esa_worlcover_mapping'} ]
datasets_riv (List[dict], optional) –
- List of dictionaries with river datasets. Each dictionary should at least
contain a river centerline data and optionally a river mask:
centerlines: filename (or Path) of river centerline with attributes rivwth (river width [m]; required if not river mask provided), rivdph or rivbed (river depth [m]; river bedlevel [m+REF]), manning (Manning’s n [s/m^(1/3)]; optional)
mask (optional): filename (or Path) of river mask
point_zb (optional): filename (or Path) of river points with bed (z) values
river attributes (optional): “rivdph”, “rivbed”, “rivwth”, “manning” to fill missing values
arguments to the river burn method (optional): segment_length [m] (default 500m) and riv_bank_q [0-1] (default 0.5) which used to estimate the river bank height in case river depth is provided.
For more info see
hydromt.workflows.bathymetry.burn_river_rect()
[{'centerlines': 'river_lines', 'mask': 'river_mask', 'manning': 0.035}]
buffer_cells (int, optional) – Number of cells between datasets to ensure smooth transition of bed levels, by default 0
nbins (int, optional) – Number of bins in which hypsometry is subdivided, by default 10 Note that this keyword is deprecated and will be removed in future versions.
nlevels (int, optional) – Number of levels to describe hypsometry, by default 10
nr_subgrid_pixels (int, optional) – Number of subgrid pixels per computational cell, by default 20
nrmax (int, optional) – Maximum number of cells per subgrid-block, by default 2000 These blocks are used to prevent memory issues while working with large datasets
max_gradient (float, optional) – If slope in hypsometry exceeds this value, then smoothing is applied, to prevent numerical stability problems, by default 5.0
z_minimum (float, optional) – Minimum depth in the subgrid tables, by default -99999.0
huthresh (float, optional) – Threshold depth in SFINCS model, by default 0.01 m
q_table_option (int, optional) – Option for the computation of the representative roughness and conveyance depth at u/v points, by default 2. 1: “old” weighting method, compliant with SFINCS < v2.1.1, taking the avarage of the adjacent cells 2: “improved” weighting method, recommended for SFINCS >= v2.1.1, that takes into account the wet fractions of the adjacent cells
manning_land (float, optional) – Constant manning roughness values for land and sea, by default 0.04 and 0.02 s.m-1/3 Note that these values are only used when no Manning’s n datasets are provided, or to fill the nodata values
manning_sea (float, optional) – Constant manning roughness values for land and sea, by default 0.04 and 0.02 s.m-1/3 Note that these values are only used when no Manning’s n datasets are provided, or to fill the nodata values
rgh_lev_land (float, optional) – Elevation level to distinguish land and sea roughness (when using manning_land and manning_sea), by default 0.0
write_dep_tif (bool, optional) – Write geotiff of the merged topobathy / roughness on the subgrid resolution. These files are not used by SFINCS, but can be used for visualisation and downscaling of the floodmaps. Unlinke the SFINCS files it is written to disk at execution of this method. By default False
write_man_tif (bool, optional) – Write geotiff of the merged topobathy / roughness on the subgrid resolution. These files are not used by SFINCS, but can be used for visualisation and downscaling of the floodmaps. Unlinke the SFINCS files it is written to disk at execution of this method. By default False