xrspatial.flood.travel_time#
- xrspatial.flood.travel_time(flow_length_agg: DataArray, slope_agg: DataArray, mannings_n: float | DataArray, name: str = 'travel_time') DataArray[source]#
Estimate overland flow travel time via simplified Manning’s equation.
Velocity is estimated as
v = (1/n) * sqrt(tan(slope))and travel time asflow_length / v. Near-zero slopes are clamped totan(0.001 deg)(same as TWI) to avoid division by zero.The time of concentration for a catchment is simply
travel_time(...).max().- Parameters:
flow_length_agg (xarray.DataArray) – 2D flow length raster (output of
flow_length()).slope_agg (xarray.DataArray) – 2D slope raster in degrees.
mannings_n (float or xarray.DataArray) – Manning’s roughness coefficient (> 0). A scalar applies uniformly; a DataArray allows spatially varying roughness.
name (str, default 'travel_time') – Name of the output DataArray.
- Returns:
2D float64 travel time grid (same time units as flow_length distance units and velocity units, typically seconds when flow_length is in metres).
- Return type:
xarray.DataArray