hydromt_sfincs.SfincsModel.setup_subgrid#
- SfincsModel.setup_subgrid(datasets_dep: List[dict], datasets_rgh: List[dict] = [], buffer_cells: int = 0, nbins: int = 10, nr_subgrid_pixels: int = 20, nrmax: int = 2000, max_gradient: float = 5.0, z_minimum: float = -99999.0, 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’. e.g.: [{‘elevtn’: merit_hydro, ‘zmin’: 0.01}, {‘elevtn’: gebco, ‘offset’: 0, ‘merge_method’: ‘first’, reproj_method: ‘bilinear’}] For a complete overview of all merge options, see :py:function:~hydromt.workflows.merge_multi_dataarrays
datasets_rgh (List[dict], optional) – List of dictionaries with Manning’s n datasets. Each dictionary should at least contain one of the following: * (1) manning: filename (or Path) of gridded data with manning values * (2) 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.: merge_method, gdf_valid_fn
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 the subgrid tables, 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) – Maximum gradient in the subgrid tables, by default 5.0
z_minimum (float, optional) – Minimum depth in the subgrid tables, by default -99999.0
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) – Create geotiff of the merged topobathy on the subgrid resolution, by default False
write_man_tif (bool, optional) – Create geotiff of the merged roughness on the subgrid resolution, by default False