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 - HAND where HAND <= water_level, NaN elsewhere.

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. NaN where not inundated or where the input is NaN.

Return type:

xarray.DataArray