Reference (generated)¶
Every public name, its signature and its docstring, read from the source. The hand-written API reference explains the same functions with examples.
fwi_chain ¶
Canadian Fire Weather Index chain (Van Wagner 1987).
STANDARD_PARAMS
module-attribute
¶
STANDARD_PARAMS = FwiParams(ffmc_start=85.0, dmc_start=6.0, dc_start=15.0, day_length_dmc=(6.5, 7.5, 9.0, 12.8, 13.9, 13.9, 12.4, 10.9, 9.4, 8.0, 7.0, 6.0), day_length_dc=(-1.6, -1.6, -1.6, 0.9, 3.8, 5.8, 6.4, 5.0, 2.4, 0.4, -1.6, -1.6))
Van Wagner's spring start-up codes (§4) and day-length factors for 46°N (Tables 2 and 3, January first).
FwiOutputs
dataclass
¶
A day's full chain: the new state plus the three derived indices.
FwiParams
dataclass
¶
What a deployment may choose, as opposed to what Van Wagner fixed.
day_length_dmc and day_length_dc are the 12 monthly factors
(January first) for the latitude band in use. Van Wagner tabulates them
for 46°N; a deployment far from that latitude, or in the southern
hemisphere, passes its own tables.
FwiState
dataclass
¶
The three recursive codes carried from one day to the next.
advance ¶
advance(state: FwiState, *, month: int, temperature_c: float, relative_humidity_pct: float, wind_speed_kmh: float, rain_24h_mm: float, params: FwiParams) -> FwiOutputs
One day of the chain: yesterday's codes plus today's noon reading.
buildup_index ¶
buildup_index(dmc: float, dc: float) -> float
Eqs. 27-28. Total fuel available to the fire.
drought_code ¶
drought_code(previous: float, *, temperature_c: float, rain_24h_mm: float, day_length: float) -> float
Eqs. 18-23. Deep, compact organic layers — the seasonal drought memory.
duff_moisture_code ¶
duff_moisture_code(previous: float, *, temperature_c: float, relative_humidity_pct: float, rain_24h_mm: float, day_length: float) -> float
Eqs. 11-17. Moisture of loosely compacted organic layers.
fine_fuel_moisture_code ¶
fine_fuel_moisture_code(previous: float, *, temperature_c: float, relative_humidity_pct: float, wind_speed_kmh: float, rain_24h_mm: float) -> float
Eqs. 1-10. Fine fuel moisture on the 0-101 FFMC scale.
fire_weather_index ¶
fire_weather_index(isi: float, bui: float) -> float
Eqs. 29-31. The published index: intensity of a spreading fire.
initial_spread_index ¶
initial_spread_index(ffmc: float, *, wind_speed_kmh: float) -> float
Eqs. 24-26. Expected rate of spread — where wind enters the chain.