xrspatial.fire.rate_of_spread#
- xrspatial.fire.rate_of_spread(slope_agg: DataArray, wind_speed_agg: DataArray, fuel_moisture_agg: DataArray, fuel_model: int = 1, name: str = 'rate_of_spread') DataArray[source]#
Rate of spread using a simplified Rothermel model.
Uses the Anderson 13 fuel model lookup table and computes per-pixel spread rate from slope, wind speed, and fuel moisture.
Supports NumPy, CuPy, Dask with NumPy, and Dask with CuPy backed xarray DataArrays; the output backend matches the input.
- Parameters:
slope_agg (xr.DataArray) – Terrain slope in degrees.
wind_speed_agg (xr.DataArray) – Mid-flame wind speed in km/h.
fuel_moisture_agg (xr.DataArray) – Dead fuel moisture content as a fraction (0-1).
fuel_model (int, default=1) – Anderson 13 fuel model number (1-13).
name (str, default='rate_of_spread') – Name of output DataArray.
- Returns:
Rate of spread in m/min (float32). This is the default input unit of
fireline_intensity(), so the result can be passed there directly.- Return type:
xr.DataArray
Examples
>>> import numpy as np, xarray as xr >>> from xrspatial import rate_of_spread >>> slope = xr.DataArray(np.full((2, 2), 10.0, dtype='f4')) >>> wind = xr.DataArray(np.full((2, 2), 10.0, dtype='f4')) >>> moisture = xr.DataArray(np.full((2, 2), 0.06, dtype='f4')) >>> rate_of_spread(slope, wind, moisture, fuel_model=1).values array([[106.6344, 106.6344], [106.6344, 106.6344]], dtype=float32)