Skip to content

humnetlab/Cell2Fire

Repository files navigation

Fire Spread Simulations Using Cell2Fire on Synthetic and Real Landscapes

Minho Kim, Cristobal Pais, Marta C. Gonzalez

Highlights⚡

  • 🔥 Cell2Fire accurately simulates in homogeneous and real landscapes in the US, Canada, and Chile.
  • 🇺🇸 Cell2Fire applied for the first time in the US (Southern California).
  • ⚙️ Blackbox optimization (BBO) used to better replicate real burns (2001 Dogrib Fire).
  • 📊 Comprehensive uncertainty analysis on weather data variables and global adjustment factors.
  • 📈 Sensitivity analysis including feature importance with SHAP values (using surrogate ML model)


Graphical abstract: Cell2Fire simulation of real landscape in the US compared to FarSite

Abstract

Fire spread models (FSMs) are used to reproduce fire behavior and can simulate fire propagation over landscapes. As wildfires have emerged into a global phenomenon with far-reaching impacts on the natural and built environments, FSM simulations provide crucial information to better understand and predict fire behavior in various landscapes. In this study, we tested Cell2Fire, a recently developed cellular automata-based FSM, against benchmarking models used in the U.S., Canada, and Chile. We experimented on synthetically generated landscapes (homogeneous and heterogeneous mix of fuels), applying Cell2Fire for the first time on U.S. landscapes, and found a high level of agreement between Cell2Fire and existing FSMs. However, FSMs may not always produce realistic simulations. In response, we used two optimization methods to improve the simulation’s accuracy. First, we adopted a multi-objective optimization algorithm that scales the elliptical shape of the Cell2Fire’s output based on rate of spread (ROS) and eccentricity. Second, we optimized four adjustment factors related to the fire spread (head ROS, back ROS, flank ROS, and eccentricity) using blackbox optimization (i.e., derivative-free optimization), minimizing the discrepancy of the output with respect to real burn data. We assessed the effectiveness of the optimization on the 2001 Dogrib Fire in Alberta, Canada and found that the optimized Cell2Fire result more accurately predicted the real burn in comparison to Prometheus (standard Canadian FSM), increasing F1-score from 0.74 to 0.83. Further, Cell2Fire exhibited better computational efficiency, with simulation runtime increasing linearly compared to Prometheus’ runtime increasing exponentially. From these results, users can adjust Cell2Fire and simulate more realistic burns and surpass the capabilities of benchmark FSMs, integrating local or custom-made FSM data to expand the simulator’s application.

Contents

  1. File directories
  2. Notebooks
  3. Data
  4. Running Cell2Fire
  5. Code Requirements
  6. Other key resources

File Directories

  • Cell2Fire (Fire spread simulator): Cell2Fire (Python) and Cell2FireC (C++)
  • Cell2Fire_results: Output folder for Cell2Fire simulations
  • data: Data used for simulations, model training, optimization
  • figures: Figures used in the publication
  • notebooks: Main .ipynb notebooks to reproduce results
  • plot: Main .ipynb notebooks to visualize results

Notebooks

Cell2Fire + Uncertainty analysis

Elliptical optimization

Visualization

ML model + SHAP

Data

Cell2Fire simulations

  • Homogeneous Data: Canada (20x20 grids sampled from Dogrib Fire), US (fuel type 101 at multiple wind speeds), Chile (80x80 grids)
  • Canada (Dogrib Fire): 2001 Dogrib Fire with sampled weather (for uncertainty analysis)
  • Canada (Dogrib Fire Reference): 2001 Dogrib Fire with all observations, GIS data, and case report (Retrieved from Prometheus software website)
  • US (Real): Samples of real US landscape (e.g., at 10th hour of simulation)
  • Chile (Real): Chile's portuzeuelo fire

Training data for ML model (SHAP analysis)

Installation

  1. Clone the Repository: Clone the repository containing the environment YAML file to your local system.
    git clone https://github.com/humnetlab/Cell2Fire.git
  2. Change your current directory to the repository directory.
    cd Cell2Fire
    
  3. Create the environment from the YAML file
    conda env create -f environment.yml
    

Running Cell2Fire

Cell2Fire is provided for the US (Scott & Burgan fuels based on Behave), Canada (FBP), and Chile (KITRAL).

1) Compile and build Cell2Fire executable

CMAKE BUILD Under the folder

cd /Users/minho/Documents/GitHub/Cell2Fire/Cell2FireC (Use full path)
mkdir build
cd build
cmake ..
make

2) Execute Cell2Fire

# The executable file has to be moved from the "build" folder to the Cell2FireC folder*
mv Cell2Fire .. 
cd ../..
# Example (Needs to be adjusted)
python main.py --input-instance-folder data_BP/f101/ --output-folder results/BP_f101_test/ --ignitions --sim-years 1 --nsims 1 --grids --finalGrid --weather rows --nweathers 1 --Fire-Period-Length 1.0 --ROS-CV 0.0 --output-messages --seed 123 --IgnitionRad 1 --stats --verbose --allPlots

Code Requirements for Cell2Fire

C++

  • Boost
  • Eigen

Python

  • numpy
  • pandas
  • matplotlib
  • seaborn
  • tqdm
  • rasterio
  • networkx (for stats module)

Python (Uncertainty + Sensitivity Analysis)

  • skimage
  • rasterio
  • scikit-learn
  • xgboost
  • shap
  • optuna

Other Key Resources on Cell2Fire

  • Cell2Fire: Github, Paper
  • Cell2Fire-KITRAL: C2F+K
  • Cell2Fire-Scott&Burgan C2F+S&B
  • Cell2Fire for FBP, Scott&Burgan, KITRAL: C2F-W <-- Most recent update and ongoing work by the Fire2A team!
  • A great tutorial can be found at C2F+K Tutorial

Acknowledgements

The authors acknowledge the support of C3.ai through the grant Multiscale analysis for Improved Risk Assessment of Wildfires facilitated by Data and Computation.

Citation


Please cite the journal paper if this code is useful and helpful for your research.

Kim, M., Pais, C. & Gonzalez, M.C. Fire spread simulations using Cell2Fire on synthetic and real landscapes. Sci Rep 15, 25173 (2025). https://doi.org/10.1038/s41598-025-05706-6

About

Fire Spread Simulations Using Cell2Fire on Synthetic and Real Landscapes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published