xrspatial.flood.flood_depth#
- xrspatial.flood.flood_depth(hand_agg: DataArray, water_level: float, name: str = 'flood_depth') DataArray[source]#
Compute flood depth from a HAND raster and a water level.
depth = water_level - HANDwhereHAND <= water_level,NaNelsewhere.- Parameters:
hand_agg (xarray.DataArray) – 2D Height Above Nearest Drainage raster (output of
hand()).water_level (float) – Water surface elevation above the drainage network (>= 0).
name (str, default 'flood_depth') – Name of the output DataArray.
- Returns:
2D float64 grid of flood depths.
NaNwhere not inundated or where the input isNaN.- Return type:
xarray.DataArray