<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>ForeFire open source wildfire front propagation model solver and programming interface</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jean-Baptiste Filippi Corte</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>France filippi@univ-corse.fr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CNRS, University of Corsica, UMR SPE 6134</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>19</fpage>
      <lpage>20</lpage>
      <abstract>
        <p>ForeFire code is an API, a library and an interpreter with a ”pythonesque” syntax available under the GPL open source licence. Its purpose is to simulate the evolution of reactive fronts on a large domain at high resolution, ad is particularly applicable to rapid (subminute) simulation of large wildland fire. It is designed such as it can easily be run from the command line, coupled with other codes and extended with user defined propagation and surface emission (fluxes) models. Users of the code can therefore easily extend it to use it as a numerical testbed for new models. The code includes a solver that tracks the propagation of a fire front line. The fire front moves upon the earth surface according to several factors such as topography, fuel and wind. An analytical model is used to represent these effects on the propagation velocity of the front. The front is then tracked by approximating the fire front line with connected Lagrangian markers called nodes. Advection of these nodes according to the propagation velocity is carried through a constant-CFL asynchronous methodology that focus on zones of high velocity.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>ForeFire code has been developed to bridge the gap between research and operational code, based on
[Filippi et al.(2009)], [Filippi et al.(2011)] and [Balbi et al.(2009)]. It is now open source, designed for large
scale fire simulation, can be easily extended with any new model formulations and can take typical landscape
data as input. The code is composed of a simulation engine that may be integrated into other scientific
environments ranging from SciPy/Numpy to Fortran numerical weather models [Filippi et al.(2013)]. Validation cannot
be strictly achieved for such phenomenon, but simulation has been tested in various scenarios on Mediterranean
landscape in [Filippi et al.(2014)] and [Santoni et al.(2011)]. This paper briefly presents first the numerical
method that is used in the solver and in the last section the different components and uses cases of the
simulation code.
1. the code can be run standalone or coupled with an atmospheric model, with similar and simple initialization
procedures,
3. Velocity model(s) prescribing the propagation models may be added as well as flux(es) models for diagnostic.
These specificities have been chosen at the design stage of the code with the simulation of large wildfire in mind
and maximum flexibility in terms of physical parametrization. It implies a particular processing of the fire front
propagation and numerical physical diagnoses that can be extrapolated from the front dynamics.
2.1</p>
      <sec id="sec-1-1">
        <title>Tracking the fire front propagation</title>
        <p>Though usually resolved by Eulerian methods in the literature such as the level-set method, this family of method
(called front-capturing as the front is captured according to the values taken by a ’marker’ field) has proved to
be computationally expansive as it simulates the spatial evolution of the state of the system in the whole domain
[Maitre(2006)].</p>
        <p>Front-tracking methods [Karimabadi et al.(2005)] on the contrary are designed to simulate only the spatial
evolution of the interface and not a state evolution on the whole domain. The interface is described as a set
of markers or vertices with coordinates that can evolve continuously in the domain (as opposed to fixed grids
coordinates or particles in cell as [Coen and Schroeder(2013)]). By dealing only with the frontier, front-tracking
methods need to discretize objects of smaller dimension than front-capturing methods. For example in wildland
fire the discretization of the fire front is carried by approximating only the fire front line which is a 1D object,
whereas front-capturing methods would have to approximate a 2D surface. Moreover the avection of each
marker is relatively easy and computationally efficient way. The benefit in computational time is obvious but the
counterpart is the need to handle topological changes with care. The objectives of the method used in ForeFire
is to be as precise as possible to track the position of the fire front, deducing fuel loss, and requires to be less
dependent on the input data resolution (wind, fuel), with less constraints on time-step.
2.1.1</p>
      </sec>
      <sec id="sec-1-2">
        <title>Constant-CFL asynchronous advection of markers</title>
        <p>Unlike conventional Lagrange methods for the advection of markers in a flow, Discrete Event Simulation (DES)
advect its markers by solving the inverse problem, i.e. fixing a quantum distance rather than a time step.
Instead of computing the spatial displacement while moving towards its new location in time t + dt the proposed
algorithm computes the duration taken by a marker to move towards its next location.</p>
        <p>This paradigm for solving advection results in a continuous discretization of time, i.e. ti(n) can take arbitrary
values. This means that:
1. markers will not move at adjacent times, i.e. a record of which markers are to be advected according to
their final time ti(n+1) has to be handled,
2. advection for markers with a large velocity is processed much more often than markers with slow motion.
This feature is of great interest in strongly inhomogeneous flows such as wildland fires as it focuses the
computation on the areas of high velocity, which usually corresponds to the areas of interest. Indeed the markers with
low velocities will have large time-steps and thus will only be re-computed in a large amount of time, leaving
space for the computation of high velocity markers.
3</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>ForeFire Software Architecture</title>
      <p>
        ForeFire assumes that all the input data is contained in a single NetCDF file (fuel, wind, domain). Generating
this landscape file is part of companion scripts and may be done using either atmospheric models or simple raw
station data. One the data input is available, simulation in itself may be performed in various ways described
in this section. Specifically, this is possible because the software compiles in a shared library, that has optional
bindings to different programming languages and data formats to use as input/outputs (figure 1).
Interaction with the simulation is made with so-called commands, these can be either software calls (functions
available in Fortran/Python/C++/Java interfaces) or command calls from the interpreter (a binary file launched
from the command line) (figure 2).
Adding a velocity model such as Balbi
        <xref ref-type="bibr" rid="ref3 ref4 ref5">(Balbi et al, 2009)</xref>
        is simply done by adding a C++ file that defines a
getSpeed function, a name, and a constructor to specify the required parameters (figure 3).
The originality of the code is its ability to be used in a variety of contexts, so the same developments (on a
flux or velocity model, dataset, algorithm...) may be used to be tested in a pure analytic research mode, make
its way to operations, and be compared easily with other approaches available from the same code. Python /
Numpy bindings have been built to help C++ model development in a scientific environment (figure 4), with
simulations that can benefit from all other Python bindings.
Here, user does not have to take time to prepare data, so everything is already available (a NetCDF file for each
small region with all data layers). and the simulation is just run by using the loadData, then addFire, and print
functions in a loop on the server and sent back to the web browser (figure 5).
      </p>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>The philosophy of the tool presented here is typical of both scientific and operational software, with sources
available, self compiling and expandable code but also having connections with data formats that allows to
simulate real fire on existing data in a very limited time. Further work is focused on coupling with real-time
data feed, enhance the python interface and add more interaction methods.</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgements</title>
      <p>This research is supported the Agence Nationale de la Recherche, grant ANR-16-CE04-0006 FireCaster.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>[Finney</surname>
          </string-name>
          (
          <year>2004</year>
          )] Finney,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>FARSITE: Fire Area SimulatorModel Development</article-title>
          and
          <string-name>
            <surname>Evaluation-Research Paper</surname>
          </string-name>
          RMRS-RP-4
          <string-name>
            <surname>Revised ; Technical Report</surname>
            ; U.S. Department of Agriculture, Forest Service, Rocky Mountain Research Station: Ogden,
            <given-names>UT</given-names>
          </string-name>
          , USA,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [Filippi et al.(
          <year>2011</year>
          )] Filippi,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Bosseur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            ;
            <surname>Pialat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            ;
            <surname>Santoni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ;
            <surname>Strada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ;
            <surname>Mari</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Simulation of Coupled Fire/Atmosphere Interaction with the MesoNH-ForeFire Models</article-title>
          . J.
          <string-name>
            <surname>Combust</surname>
          </string-name>
          .
          <year>2011</year>
          ,
          <year>2011</year>
          ,
          <fpage>1</fpage>
          -
          <lpage>13</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [Balbi et al.(
          <year>2009</year>
          )] Balbi,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Morandini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            ;
            <surname>Silvani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            ;
            <surname>Filippi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Rinieri</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          <article-title>A Physical Model for Wildland Fires</article-title>
          .
          <source>Combust. Flame</source>
          <year>2009</year>
          ,
          <volume>156</volume>
          ,
          <fpage>2217</fpage>
          -
          <lpage>2230</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [Filippi et al.(
          <year>2009</year>
          )] Filippi,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Morandini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            ;
            <surname>Balbi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Hill</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Discrete Event Front-tracking Simulation of a Physical Fire-spread Model</article-title>
          .
          <source>Simulation</source>
          <year>2009</year>
          ,
          <volume>86</volume>
          ,
          <fpage>629</fpage>
          -
          <lpage>646</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Filippi et al.(
          <year>2009</year>
          )] Filippi,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Bosseur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            ;
            <surname>Mari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ;
            <surname>Lac</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ;
            <surname>Moigne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.L.</given-names>
            ;
            <surname>Cuenot</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ;
            <surname>Veynante</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ;
            <surname>Cariolle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ;
            <surname>Balbi</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          <article-title>Coupled atmosphere-wildland fire modelling</article-title>
          .
          <source>J. Adv. Model. Earth Syst</source>
          .
          <year>2009</year>
          ,
          <volume>1</volume>
          , doi:10.3894/JAMES.
          <year>2009</year>
          .
          <volume>1</volume>
          .11.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [Filippi et al.(
          <year>2013</year>
          )] Filippi,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Pialat</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            ;
            <surname>Clements</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Assessment of ForeFire/Meso-NH for wildland fire/atmosphere coupled simulation of the FireFlux experiment</article-title>
          .
          <source>Proc. Combust. Inst</source>
          .
          <year>2013</year>
          ,
          <volume>34</volume>
          ,
          <fpage>2633</fpage>
          -
          <lpage>2640</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>[Maitre</surname>
          </string-name>
          (
          <year>2006</year>
          )] Maitre,
          <string-name>
            <surname>E.</surname>
          </string-name>
          <article-title>Review of numerical methods for free interfaces</article-title>
          .
          <source>Ecole Th´ematique ”</source>
          Mod`eles de champ de phase pour l'´evolution de structures complexes”.
          <source>Les Houches</source>
          <year>2006</year>
          ,
          <volume>27</volume>
          ,
          <fpage>31</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [Filippi et al.(
          <year>2014</year>
          )] Filippi,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Mallet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            ;
            <surname>Nader</surname>
          </string-name>
          ,
          <string-name>
            <surname>B.</surname>
          </string-name>
          <article-title>Evaluation of forest fire models on a large observation database</article-title>
          .
          <source>Nat. Hazards Earth Syst. Sci</source>
          .
          <year>2014</year>
          ,
          <volume>14</volume>
          ,
          <fpage>3077</fpage>
          -
          <lpage>3091</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [Karimabadi et al.(
          <year>2005</year>
          )] Karimabadi,
          <string-name>
            <given-names>H.</given-names>
            ;
            <surname>Driscoll</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          ; Omelchenko,
          <string-name>
            <given-names>Y.</given-names>
            ;
            <surname>Omidi</surname>
          </string-name>
          ,
          <string-name>
            <surname>N.</surname>
          </string-name>
          <article-title>A new asynchronous methodology for modeling of physical systems: breaking the curse of courant condition</article-title>
          .
          <source>J. Comput. Phys</source>
          .
          <year>2005</year>
          ,
          <volume>205</volume>
          ,
          <fpage>755</fpage>
          -
          <lpage>775</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [Santoni et al.(
          <year>2011</year>
          )] Santoni,
          <string-name>
            <given-names>P.</given-names>
            ;
            <surname>Filippi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Balbi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Bosseur</surname>
          </string-name>
          ,
          <string-name>
            <surname>F.</surname>
          </string-name>
          <article-title>Wildland Fire Behaviour Case Studies and Fuel Models for Landscape-Scale Fire Modeling</article-title>
          . J.
          <string-name>
            <surname>Combust</surname>
          </string-name>
          .
          <year>2011</year>
          ,
          <year>2011</year>
          ,
          <volume>613424</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <source>[Coen and Schroeder</source>
          (
          <year>2013</year>
          )] Coen,
          <string-name>
            <given-names>J.</given-names>
            ;
            <surname>Schroeder</surname>
          </string-name>
          ,
          <string-name>
            <surname>W.</surname>
          </string-name>
          <article-title>Use of spatially refined satellite remote sensing fire detection data to initialize and evaluate coupled weather-wildfire growth model simulations</article-title>
          .
          <source>Geophys. Res. Lett</source>
          .
          <year>2013</year>
          ,
          <volume>40</volume>
          ,
          <fpage>5536</fpage>
          -
          <lpage>5541</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>