hydromt_sfincs.utils.downscale_floodmap#
- hydromt_sfincs.utils.downscale_floodmap(zsmax: DataArray, dep: DataArray, hmin: float = 0.05, gdf_mask: GeoDataFrame | None = None, floodmap_fn: str | Path | None = None, reproj_method: str = 'nearest', **kwargs) Dataset [source]#
Create a downscaled floodmap for (model) region.
- Parameters:
zsmax (xr.DataArray) – Maximum water level (m). When multiple timesteps provided, maximum over all timesteps is used.
dep (xr.DataArray) – High-resolution DEM (m) of model region.
hmin (float, optional) – Minimum water depth (m) to be considered as “flooded”, by default 0.05
gdf_mask (gpd.GeoDataFrame, optional) – Geodataframe with polygons to mask floodmap, example containing the landarea, by default None Note that the area outside the polygons is set to nodata.
floodmap_fn (Union[Path, str], optional) – Name (path) of output floodmap, by default None. If provided, the floodmap is written to disk.
reproj_method (str, optional) – Reprojection method for downscaling the water levels, by default “nearest”. Other option is “bilinear”.
kwargs (dict, optional) – Additional keyword arguments passed to RasterDataArray.to_raster.
- Returns:
hmax – Downscaled and masked floodmap.
- Return type:
xr.Dataset
See also
hydromt.raster.RasterDataArray.to_raster