API Reference
Complete function and type documentation
This section provides comprehensive API documentation for Elmfire.jl.
Core Modules
Rothermel Fire Spread Model
The mathematical foundation of fire behavior prediction:
surface_spread_rate()- Calculate spread rate from Rothermel modelelliptical_spread()- Compute elliptical fire shape (Anderson 1982)SpreadResult- Fire behavior outputs (velocity, intensity, heat)EllipticalSpread- Head, back, and flank fire rates
Fuel Models
Types and functions for managing fuel model data:
FuelModel- Processed fuel model with derived quantitiesFuelModelTable- Collection of fuel modelscreate_standard_fuel_table()- Create standard 13 FBFM fuel models
Simulation
Fire simulation state and execution:
FireState- Main simulation state containerSimulationConfig- Configuration optionssimulate!()/simulate_full!()- Run simulationsignite!()- Start fires
Weather
Weather data management and interpolation:
ConstantWeather- Uniform weather conditionsWeatherInterpolator- Spatiotemporal weathercreate_constant_interpolator()- Create interpolator from constant weather
Geospatial I/O
Reading and writing geospatial data:
read_geotiff()/write_geotiff()- GeoTIFF I/Oread_landscape()- Load complete landscape datacompute_slope_aspect()- Derive terrain from DEM
Ensemble
Monte Carlo ensemble simulations:
EnsembleConfig- Ensemble configurationrun_ensemble!()- Run Monte Carlo ensemblerun_ensemble_threaded!()- Parallel ensemble execution
WUI & Suppression
Wildland-urban interface and fire suppression:
WUIBuilding/WUIGrid- Building representationSuppressionResource/SuppressionState- Suppression modelingsimulate_with_suppression!()- Integrated suppression simulation
Quick Reference
Main Types
| Type | Description |
|---|---|
FireState{T} |
Simulation state with level set, arrival times, burned area |
FuelModel{T} |
Fuel model properties with derived spread coefficients |
SimulationConfig{T} |
Crown fire, spotting, and solver settings |
ConstantWeather{T} |
Uniform wind and moisture conditions |
EnsembleResult{T} |
Monte Carlo ensemble results and statistics |
Main Functions
| Function | Description |
|---|---|
simulate!(state, ...) |
Run fire simulation |
simulate_full!(state, ...) |
Full simulation with crown fire/spotting |
ignite!(state, ix, iy, t) |
Ignite fire at grid location |
run_ensemble!(config, ...) |
Run Monte Carlo ensemble |
read_landscape(T, paths...) |
Load landscape from GeoTIFF files |
Constants
# Unit conversions
FT_TO_M = 0.3048 # Feet to meters
M_TO_FT = 3.28084 # Meters to feet
BTUPFT2MIN_TO_KWPM2 = 0.18956 # BTU/ft²/min to kW/m²Type Parameters
Most types in Elmfire.jl are parametric on the floating-point type T:
# Float64 for maximum precision
state = FireState{Float64}(100, 100, 30.0)
# Float32 for memory efficiency
state = FireState{Float32}(100, 100, 30.0f0)This allows trading precision for memory when running large ensembles or high-resolution simulations.