-
Notifications
You must be signed in to change notification settings - Fork 20
2. Usage
ForeFire takes 3 input files to run:
- Fuels: This file defines the classes of fuels and their associated parameters.
- Landscape (NetCDF): This file contains data on elevation, wind, and fuel in the region of interest.
- ForeFire: This file contains the simulation commands and parameters.
To help you get started with ForeFire, we've included an example for the region of Aullène in Corsica, France. The example includes the following files:
-
fuels.ff
: The fuel parameters file. -
landscape.nc
: The NetCDF landscape file. -
aullene.ff
: The ForeFire file containing simulation commands and parameters.
Run the example with:
cd firefront/examples/aullene/
../../bin/forefire -i aullene.ff
The -i
flag is used to include the ForeFire file, here aullene.ff.
To get a sense of how the simulation works before diving into the details of parameterization, you can examine the aullene.ff
file. If you wish, you can try to edit the file and see how it affects the resulting simulation.
By default, the simulation will output results in JSON format. If you prefer GeoJSON format, you can edit the aullene.ff
file and change dumpMode=json
to dumpMode=geojson
. Then run the simulation again.
In this case, the simulation output will be in a JSON file with GeoJSON structure, with local projection. To convert this output to a standard GeoJSON (with EPSG 4326), you can use the ff2geojson.py
script:
cd firefront
python py3_tools/forefirepy/ff2geojson.py examples/aullene/1-2009-07-24T15-01-00Z.json
This will generate a standard GeoJSON file that can be used for data visualization or processing. Here is the example simulation visualized in geojson.io.
We hope this example helps you get started with ForeFire.
You can also run simulations in the example region using coord_to_ff.py
.
First, install requirements:
cd py3_tools
pip install -r requirements.txt
If you don't pass any arguments, it will run the simulation in a default location:
python coord_to_ff.py
For running in a chosen location, the script accepts latitude and longitude in epsg:4326 projection as inputs. It reprojects the coordinates into epsg:32632 projection, used in aullene's landscape.
python coord_to_ff.py --lat 41.6 --lon 9.1
The GeoJSON of geometry type Polygon will be saved in the /examples/aullene
folder
You can also use the GUI in the no-code demo simulator.
To run simulations in a region of your interest, with your custom data, you will need custom input files. Refer to Configuration.