Skip to content

Commit aeeb1e5

Browse files
Merge branch 'master' into dev
2 parents e5097c1 + d222e31 commit aeeb1e5

2 files changed

Lines changed: 20 additions & 54 deletions

File tree

docs/source/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Jinja2==3.1.6
1010
MarkupSafe==3.0.2
1111
packaging==24.2
1212
Pygments==2.19.1
13-
requests==2.32.3
13+
requests==2.32.4
1414
snowballstemmer==2.2.0
1515
Sphinx==8.1.3
1616
sphinx-rtd-theme==3.0.2
@@ -22,4 +22,4 @@ sphinxcontrib-jsmath==1.0.1
2222
sphinxcontrib-qthelp==2.0.0
2323
sphinxcontrib-serializinghtml==2.0.0
2424
tomli==2.2.1
25-
urllib3==2.3.0
25+
urllib3==2.3.2

paper/paper.md

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ authors:
6262
corresponding: false
6363
- name: Alberto Alonso-Pinar
6464
orcid: 0009-0009-2051-9700
65-
affiliation: [1, 3]
65+
affiliation: "1, 3"
6666
corresponding: false
6767

6868
affiliations:
@@ -84,73 +84,39 @@ bibliography: paper.bib
8484
---
8585

8686
# Summary
87-
Wildfire forecasting is at the same time an active research area and an important need for operational decision support systems. **ForeFire** is a modular, high-performance wildland fire simulation engine implemented in C++. It is designed to model the spread of wildfire perimeters over large landscapes at meter scale resolution, serving both as a research platform and an operational forecasting tool.
88-
ForeFire can be used to forecast wildfires spanning thousands of hectares within seconds, supporting wildfire management operations, while also providing an open testbed for experimenting with new fire behavior, fire intensity, and fire flux models in a scientific context.
89-
90-
ForeFire offers multiple interfaces and utilities to maximize usability and integration.
91-
The core C++ library has Fortran and Python bindings and is accompanied by a lightweight scriptable interpreter (in custom FF language), a local HTTP service that enables a customizable graphical user interface and ability to load, save and export data in NetCDF, GeoJson, KML, png and jpg.
92-
ForeFire is discrete‑event‑driven [@filippi2009], focusing computational effort on the active region of the fire front defined as a dynamic mesh or multipolygons of fire markers.
93-
94-
Moreover, additionaly ForeFire is also capable of two-way coupling with the MesoNH [@lac2018] atmospheric model to account for fire-atmosphere interaction [@filippi2013].
87+
Wildfire forecasting is both an active research area and an important need for decision support systems. **ForeFire** is a modular, high-performance, scriptable, discrete‑event‑driven simulation engine [@filippi2009] focusing computational effort on the active region of a fire front defined as a dynamic mesh (or multipolygons) of fire markers. It is designed to model the spread of wildfire perimeters over large landscapes at meter scale resolution in seconds, serving both as a research platform and a tool for operational forecasting. The core C++ library has Fortran and Python bindings and is accompanied by a lightweight scriptable interpreter (a custom FF language), can load, save and export data in NetCDF, GeoJson, KML, PNG and JPG, and includes a local HTTP service with customizable graphical user interface. ForeFire can also account for fire-atmosphere interaction by two-way coupling with the MesoNH [@lac2018] atmospheric model [@filippi2013].
9588

9689
# Statement of need
9790

9891
Wildfire modeling tools have historically been split between **complex combustion research models** and **streamlined operational tools**, each with distinct limitations.
99-
On one end of the spectrum, computational combustion and fluid dynamics (CFD) based models (e.g., FIRETEC [@linn2005] or WFDS [@mell2007]) provide detailed physics with complete control of combustion models at flame scale but are highly computationally intensive and yet unable to provide faster than real time large wildfire forecasting.
100-
On the other end, operational wildfire simulators built for practitioners, such as widely used Farsite (now flammap) [@finney1998] or Canadian Prometheus [@garcia2008], while not resolving the combustion at flame scale, are able to simulate tens of kilometers long fire front in matter of seconds, prioritizing speed and simplicity at the expense of generality. These codes have definite built-in modeling assumptions and are distributed (freely) as compiled software with graphical interfaces and limited access to source code.
101-
While being well-packaged is advantageous for direct use, it makes it difficult for researchers to implement new modeling approaches or to streamline and script integration into different experimental frameworks. This gap between highly complex customizable models and more rigid operational tools creates a need for an intermediate solution: a wildfire simulator that is both **adaptable** and **high-performing**.
102-
ForeFire was developed to fill this need by bridging the flexibility of research-oriented code with the efficiency and user-friendliness of operational systems [@filippi2018].
103-
104-
Other open source libraries for wildland fire spread do exist as for example ElmFire [@lautenberger2013] or Cell2Fire [@pais2021], but with respect to ForeFire, these packages use a different numerical scheme, and are tied to a single spread models and do not provide a scriptable scenario interface or atmospheric coupling.
105-
Another family of wildland fire spread solvers such as WRF/SFire [@mandel2011] can resolve coupled front propagation and local meteorology but must be run within an atmospheric model that requires a large amount of processing power and data.
106-
107-
Each of the above systems addresses certain needs (e.g., operational use, physical accuracy, or atmospheric coupling) but in order not to multiply development efforts on multiple code and validation bases, there was a need for a **unified solution** that could be open, modular, and performant.
108-
ForeFire’s modular architecture and scripting interface allow users to easily swap or implement new fire models without changing the core code and test multiple simulation scenarions with same input files. It can also run fast in a standalone mode (for purely surface fire simulations) or be coupled with atmospheric models, all under a consistent interface and parameterization.
92+
Computational combustion and fluid dynamics (CFD) based models (e.g., FIRETEC [@linn2005] or WFDS [@mell2007]) are highly computationally intensive and yet unable to provide large wildfire forecasts faster than real time.
93+
Atmospheric coupled codes, such as WRF/SFire [@mandel2011] must be run within an atmospheric model and require a large amount of processing power and data.
94+
Operational wildfire simulators, such as widely used Farsite (now Flammap) [@finney1998], or Canadian Prometheus [@garcia2008], are able to simulate fire fronts spanning tens of kilometers in a matter of seconds, but have definite built-in modeling assumptions and are distributed as compiled software with graphical interfaces with limited scriptability.
10995

110-
ForeFire’s support for **multiple language bindings** (HTTP, C++ API, Python/NumPy, Fortran) is also unique and further expands its usability across different domains. These capabilities enable rapid prototyping and experimentation on large datesets, and also support operational needs by allowing integration into decision support pipelines including coupled with atmospheric models.
96+
ForeFire was developed as a community tool to fill the gap between highly complex customizable models and more rigid operational tools: a **unified** wildfire simulator that is both **adaptable** and **high-performing**.
11197

11298
# Typical Use Cases
11399

114-
## Rapid prototyping of new spread or flux models
115-
The software also implements several standard fire fluxes and spread rate models, including different variants of the widely used semi-empirical Rothermel model [@andrews2018] as well as Balbi semi‑physical formulation [@balbi2009], with an architecture that makes it trivial to switch, extend or add to this model base.
116-
Researchers who wish to experiment with alternative formulations can add a new model by adding a single `.cpp` file from the `src/propagation` or `src/flux` using any existing model file as template and implement the `getSpeed()` or `getValue()` function. Input variables—including fuel descriptors, wind components, or slope—are declared at the top of the file.
117-
Internally these quantities are handled as *layers* that can come from Python NumPy array, supplied from input NetCDF files or generated on the fly by ForeFire (e.g. slope derived from the elevation layer).
118-
Once compiled, the new model is available in the scripting interface and in the C++/Python APIs without additional changes.
119-
120-
Developping a Rate Of Spread wildfire model was the original purpose of this simulation code and helped to iterate versions the Balbi Rate Of Spread formulation on real-cases studies in [@balbi2009] and [@santoni2011]. It also served to implement various heat and chemical species flux models used for volcanic eruption in [@filippi2021], wildfire plume chemical compounds in [@strada2012] or industrial fires in [@baggio2022].
121-
There is also a generic `ANNPropagationModel` that expects a trained graph input file that will be used in place of these functions.
100+
## Rapid prototyping of new models
101+
ForeFire implements several standard fire flux and spread rate models, such as Rothermel [@andrews2018] or Balbi [@balbi2009], but also makes it trivial to switch, extend or add to this base with a single `.cpp` using any existing model file as a template.
102+
Internally data is handled as *layers* that can come from a NumPy array, read from NetCDF or generated on the fly by ForeFire (e.g. slope derived from the elevation layer).
103+
Developing a Rate Of Spread wildfire model was the original purpose of this simulation code and helped to iterate versions of the Balbi Rate Of Spread formulation on case studies in [@balbi2009] and [@santoni2011]. It also served to implement various heat and chemical species flux models used for volcanic eruption in [@filippi2021], plume chemistry [@strada2012] or industrial fires in [@baggio2022]. In addition, the code includes a generic `ANNPropagationModel`, which implements a feedforward artificial neural network (ANN) that expects a pre-trained graph file.
122104

123105
## Batch simulations with the ForeFire scripting
124-
Custom FF language allows to easily generate multiple scenarios, including fire-fighting strategies or ensemble forecasts, with light scripting efforts. The interpreter run these scripts either from a file or from another process (piped trough the shell). A FF script is a set of instructions that are interpreted at a specific date (starting at a run date, with 0 defined as `00:00` and updated with a `step`or a `goTo` commands) or if the command is post-fixed by a `@t=` operator that schedules the execution of a command.
125-
126-
Each of these commands (such as, `goTo[t=42]`, `print[state.ff]`, `include[state.ff]`, or `plot[parameter=speed;filename=ROS.png]`) of ForeFire is bound or can directly be called from HTTP, C++, Fortran or Python, and are the core logic of the library. Help messages and autocompletion are directly available from the shell interpreter that can be run interactively, with several examples provided in the repository.
127-
128-
A typical script that loads data at a date and time, starts a fire, schedules a wind shift and prints outputs is written :
129-
```text
130-
setParameter[propagationModel=Rothermel]
131-
loadData[data.nc;2025-02-10T17:35:54Z]
132-
startFire[lonlat=(-8.1, 39.9,0)]
133-
trigger[wind;vel=(10.0,0.0,0.)]@t=75000
134-
step[dt=36000]
135-
print[]
136-
```
137-
But the interface can also be run interactively using a highly customizable web‑based graphical interface (command `listenHTTP[host:port]`), that starts a local HTTP service with ForeFire bindings and serves standard or user‑defined web pages as shown in \autoref{fig:gui}.
106+
Custom FF language allows users to easily generate multiple scenarios, including fire-fighting strategies, model evaluation [@filippi2014], ensemble forecasts [@allaire2020] or generate a deep learning database [@allaire2021]. A FF script is a set of scheduled instructions that are interpreted real-time, advancing the simulation clock with a `step[dt=]` or a `goTo[t=]` command.
107+
Each of these commands (such as `goTo[t=42]`, `include[state.ff]`, `startFire[lonlat=(-8.1, 39.9,0)]@t=42`, `setParameter[propagationModel=Rothermel]` or `plot[parameter=speed;filename=ROS.png]`) can also be called from HTTP, C++, Fortran or Python, and constitutes the core logic of the library. Help and autocompletion are directly available in the interactive shell interpreter that also includes a batch mode. The graphical user interface is web‑based through an embedded HTTP service (command `listenHTTP[host:port]`) with user‑defined or default pages as shown in \autoref{fig:gui}.
138108

139-
![Default web interface accessed trough ForeFire internal HTTP service and exposing interactive commands. The simulation here is a wildfire in Portugal with ForeFire coupled with an atmospheric model that provides winds.\label{fig:gui}](gui.jpg)
109+
![Default web interface with data layers on the left pane, commands displayed as buttons and displaying an atmospheric coupled simulation of a wildfire in Portugal.\label{fig:gui}](gui.jpg)
140110

141-
By utilizing pre-compiled datasets over extensive regions, this approach supports continent-wide operational forecasting services.
142-
It has been applied to identify optimal escape routes [@kamilaris2023], integrated into the French national WildFire Decision Support System [OPEN DFCI](https://opendfci.fr/), showcased on the [FireCaster demonstration platform](https://forefire.univ-corse.fr/), and also currently used in commercial simulation services [AriaFire Firecaster](https://firecaster.ariafire.com), [UmGraueMeio Pantera](https://www.umgrauemeio.com/) and [Ororatech FireSpread](https://ororatech.com/all-products/fire-spread).
111+
By utilizing pre-compiled datasets over extensive regions, this approach supports continent-wide operational forecasting services. It has been deployed to identify optimal escape routes [@kamilaris2023], integrated into the French National WildFire Decision Support System [OPEN DFCI](https://opendfci.fr/), showcased on the [FireCaster demonstration platform](https://forefire.univ-corse.fr/), and also currently used in commercial simulation services [AriaFire Firecaster](https://firecaster.ariafire.com), [UmGraueMeio Pantera](https://www.umgrauemeio.com/) and [Ororatech FireSpread](https://ororatech.com/all-products/fire-spread).
143112

144-
But the ability to run as batch also means it can be used to perform systematic model evaluation [@filippi2014] generate simulation ensembles [@allaire2020] or large simulation databases for deep learning [@allaire2021],[@allaire2022].
145113

146-
### 3. Two-way coupling with the MesoNH atmospheric model
147-
The same scripts and input data can be executed in a coupled mode with the Open-Source atmospheric model [MesoNH](https://mesonh.cnrs.fr/) [@lac2018] with sample coupled cases available in the main [MesoNH Repository](https://src.koda.cnrs.fr/mesonh/).
148-
In this configuration MesoNH launches ForeFire (FORTRAN Bindings) as an MPI enabled sub-process, a master process integrates the fire perimeter using surface fields from the atmospheric model and distributes fluxes fields to the atmosphic model. Coupled simulation can be run on a laptop at field scale to evaluate model ability on prescribed well instrumented experiments [@filippi2013], but also on more than 400 processors to perform faster than real-time high resolution simulation of fire-induced winds on a large wildfire [@filippi2018], fire-induced convection during an extreme wildfire event [@couto2024],[@campos2023] or even to estimate wildfire spotting (firebrands) with a resolved fire plume [@alonsopinar2025].
114+
### Two-way coupling with the MesoNH atmospheric model
115+
The same scripts can be executed in coupled mode with the Open-Source atmospheric model [MesoNH](https://mesonh.cnrs.fr/) [@lac2018] with fire propagating using surface fields (wind) from MesoNH and forcing heat and other flux fields into the atmosphere. An idealized coupled simulation can be run on a laptop at field scale [@filippi2013], but also on a supercomputer to forecast fire-induced winds of large wildfires [@filippi2018], fire-induced convection [@couto2024],[@campos2023] or even to estimate wildfire spotting [@alonsopinar2025].
149116

150-
While simulations in coupled mode can take significantly more time and generate much larger output files, they are designed to run efficiently on a supercomputing cluster with some specific routines to generate 3D output files through ForeFire.
151-
Python helper scripts available in the ForeFire repository convert these simulation outputs to VTK/VTU files, allowing three-dimensional rendering of fire-atmosphere variables in Open-Source [ParaView](https://www.paraview.org/) as shown in \autoref{fig:coupled}.
117+
Coupled simulations generate gigabytes of 3D data that can be converted to VTK/VTU files using Python helper scripts to visualize in the open-source tool ParaView as shown in \autoref{fig:coupled}.
152118

153-
![Coupled simulation of the Pedrogao Grande wildfire [@couto2024], rendered in Paraview. On the ground, the burned area is in orange, while among atmospheric variables, downbursts are highlighted in red and pyrocu clouds in blue.\label{fig:coupled}](coupled.jpg)
119+
![Coupled simulation of the Pedrogao Grande wildfire [@couto2024] (Paraview). On the ground, the burned area is in orange, while among atmospheric variables, downbursts are highlighted in red and pyro-cumulonimbus clouds in blue.\label{fig:coupled}](coupled.jpg)
154120

155121
# Acknowledgements
156122
This work has been supported by the Centre National de la Recherche Scientifique and French National Research Agency under grants **ANR-09-COSI-006-01 (IDEA)** and **ANR-16-CE04-0006 (FIRECASTER)**. The authors thank all contributors and collaborators who have assisted in the development and testing of the ForeFire software.

0 commit comments

Comments
 (0)