From c8c86e3002316647e68ab2ddc74b1e98579906e9 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 8 May 2025 00:43:57 -0300 Subject: [PATCH 1/6] ignore docs --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index b64aa330..3863fc4f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,6 +19,7 @@ Dockerfile # Python virtual environments and cache .venv/ venv/ +docs __pycache__/ *.pyc *.pyo From 4fdb7c0ae657be7237d639d9eefeb48e7dee3c2f Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 8 May 2025 00:53:52 -0300 Subject: [PATCH 2/6] add wind to run ff --- tests/runff/run.ff | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/runff/run.ff b/tests/runff/run.ff index 5fa7d2d7..140cdede 100644 --- a/tests/runff/run.ff +++ b/tests/runff/run.ff @@ -17,6 +17,7 @@ setParameter[windReductionFactor=0.4] loadData[data.nc;2025-02-10T17:35:54Z] # --- Ignition --- startFire[lonlat=(8.70, 41.952, 0);t=0] +trigger[wind;loc=(0.,0.,0.);vel=(10,5,0.)]@t=60 # --- Run Simulation --- goTo[t=3600] From c4b2881961073d88e171fb68090a142f50a83ce5 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 8 May 2025 02:49:41 -0300 Subject: [PATCH 3/6] printing geojson --- .gitignore | 12 +++++++----- tests/runff/run.ff | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 3a481649..d2db5efb 100644 --- a/.gitignore +++ b/.gitignore @@ -34,12 +34,16 @@ docs/doxygen/html CMakeLists.txt build.sh -#other +#tools tools/postprocessing/loadInParaview.py tests/config_firecast_local.bash tools/config_firecast_local.bash +tools/ai +changeLicense.py +httpConnectInfo.txt + +#tests tests/python/FF_FS4roslog.csv -.gitignore tests/python/ros_computation.py tests/python/ros_sampling.py tests/python/test_logdb.csv @@ -47,6 +51,4 @@ tests/runff/altitude.png tests/runff/httpConnectInfo.txt tests/python/log.txt tests/python/runROS.bash -changeLicense.py -httpConnectInfo.txt -tools/ai +simulation_result.geojson diff --git a/tests/runff/run.ff b/tests/runff/run.ff index 140cdede..69c8cd4f 100644 --- a/tests/runff/run.ff +++ b/tests/runff/run.ff @@ -12,6 +12,7 @@ setParameter[perimeterResolution=10] setParameter[spatialIncrement=3] setParameter[propagationSpeedAdjustmentFactor=0.6] setParameter[windReductionFactor=0.4] +setParameter[dumpMode=geojson] # --- Load Data & Domain --- loadData[data.nc;2025-02-10T17:35:54Z] @@ -23,5 +24,5 @@ trigger[wind;loc=(0.,0.,0.);vel=(10,5,0.)]@t=60 goTo[t=3600] # --- End --- -print[] +print[simulation_result.geojson] # Omit quit[] if using listenHTTP \ No newline at end of file From 0c2d112642616563da6da18cc59bbe3db61f9b34 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Thu, 8 May 2025 18:16:30 -0300 Subject: [PATCH 4/6] fix demo site url --- docs/source/index.rst | 2 +- tools/preprocessing/READMEscripts.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 57b3a767..9170a1be 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,7 +6,7 @@ Welcome to the official documentation for ForeFire — the open-source wildfire **Key Links:** - `GitHub Repository `_ -- `Online Demo Simulator `_ +- `Online Demo Simulator `_ .. toctree:: :maxdepth: 1 diff --git a/tools/preprocessing/READMEscripts.md b/tools/preprocessing/READMEscripts.md index 8251b757..28fa611d 100644 --- a/tools/preprocessing/READMEscripts.md +++ b/tools/preprocessing/READMEscripts.md @@ -4,7 +4,7 @@ ForeFire is an [open-source code for wildland fire spread models](https://www.researchgate.net/publication/278769168_ForeFire_open-source_code_for_wildland_fire_spread_models), developed and maintained by Université de Corse Pascal Paoli. -Access the [demo simulator here](http://forefire.univ-corse.fr/sim/dev/) +Access the [demo simulator here](http://forefire.univ-corse.fr/sim) ![demo](./doc/sim-forefire.jpg) From 945a1ad7b1a75b14d2e8b9bd44f11fa3739e7142 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Mon, 12 May 2025 21:42:45 -0300 Subject: [PATCH 5/6] easier run.ff without @ operator --- tests/runff/run.ff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/runff/run.ff b/tests/runff/run.ff index 69c8cd4f..fec52cca 100644 --- a/tests/runff/run.ff +++ b/tests/runff/run.ff @@ -18,7 +18,7 @@ setParameter[dumpMode=geojson] loadData[data.nc;2025-02-10T17:35:54Z] # --- Ignition --- startFire[lonlat=(8.70, 41.952, 0);t=0] -trigger[wind;loc=(0.,0.,0.);vel=(10,5,0.)]@t=60 +trigger[wind;loc=(0.,0.,0.);vel=(10,5,0.)] # --- Run Simulation --- goTo[t=3600] From aef5a74b4d43e0301c2faf9d97efc82ab9f2d415 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Wed, 14 May 2025 20:06:06 -0300 Subject: [PATCH 6/6] fix ` in docs --- docs/source/reference/commands.rst | 4 ++-- docs/source/user_guide/basic_configuration.rst | 6 +++--- docs/source/user_guide/core_concepts.rst | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/source/reference/commands.rst b/docs/source/reference/commands.rst index 6a4c4810..3ac31efe 100644 --- a/docs/source/reference/commands.rst +++ b/docs/source/reference/commands.rst @@ -135,7 +135,7 @@ Creates the smallest possible triangular fire front (an ignition point) at the s **Arguments:** * ``loc=(x,y,z)``: Starting location using Cartesian coordinates (x,y,z) in meters. -* ``lonlat=(lon,lat)``: Starting location using WGS84 coordinates (longitude, latitude). *Use either ``loc`` or ``lonlat``.* +* ``lonlat=(lon,lat)``: Starting location using WGS84 coordinates (longitude, latitude). *Use either loc or lonlat.* * ``t=seconds|date=YYYY-MM-DDTHH:MM:SSZ``: Time when the fire is started, either in seconds since simulation start or as an absolute ISO 8601 GMT date/time. **Example:** @@ -344,7 +344,7 @@ Triggers a change in simulation data at a specific time and location. Can be use Prints a representation of the current simulation state (primarily the fire front location) to the console or to a specified file. The output format is determined by the `dumpMode` parameter (set via `setParameter`). -**Output Formats (`dumpMode`):** +**Output Formats (dumpMode):** * `ff`: Native format, potentially re-parsable by ForeFire. * `json`: Compact Cartesian JSON format. diff --git a/docs/source/user_guide/basic_configuration.rst b/docs/source/user_guide/basic_configuration.rst index 9fcb0f41..9de43d7d 100644 --- a/docs/source/user_guide/basic_configuration.rst +++ b/docs/source/user_guide/basic_configuration.rst @@ -3,13 +3,13 @@ Basic Configuration ForeFire simulations typically require three main input files to run: -1. **Fuels File (`.csv`)**: Defines the classes of fuels and their associated parameters used by the fire spread model (e.g., Rothermel). -2. **Landscape File (`.nc`)**: A NetCDF file containing geospatial data layers for the simulation domain, typically including: +1. **Fuels File (.csv)**: Defines the classes of fuels and their associated parameters used by the fire spread model (e.g., Rothermel). +2. **Landscape File (.nc)**: A NetCDF file containing geospatial data layers for the simulation domain, typically including: - Elevation (Digital Elevation Model - DEM) - Fuel types map (matching the indices in the Fuels File) - (Optionally) Pre-defined wind fields or other environmental data. -3. **ForeFire Script File (`.ff`)**: A text file containing commands and parameters that control the simulation execution. This includes: +3. **ForeFire Script File (.ff)**: A text file containing commands and parameters that control the simulation execution. This includes: - Setting simulation parameters (e.g., propagation model, output format). - Loading the landscape and fuels data. diff --git a/docs/source/user_guide/core_concepts.rst b/docs/source/user_guide/core_concepts.rst index 4592d368..a02e7d7c 100644 --- a/docs/source/user_guide/core_concepts.rst +++ b/docs/source/user_guide/core_concepts.rst @@ -20,14 +20,14 @@ Key Simulation Components The simulation engine relies on several key C++ components (classes) to manage the fire spread process: -* **`Simulator` & `TimeTable` (Event-Driven Core)** +* **Simulator & TimeTable (Event-Driven Core)** * ForeFire uses an **event-driven** approach. Instead of fixed time steps for the entire simulation, it maintains a `TimeTable` (a prioritized queue) of future events. * Each event typically corresponds to a `FireNode` needing an update at a specific future time. * The `Simulator` processes events from the `TimeTable` in chronological order. It retrieves the next event, tells the associated object (like a `FireNode`) to update its state and calculate its next move, and then the object schedules its *next* update event back into the `TimeTable`. * **This event-driven approach means the simulation doesn't use fixed global time steps; different parts of the front can advance according to their own calculated timings.** -* **`FireDomain` (The Simulation World)** +* **FireDomain (The Simulation World)** * Represents the overall simulation area and context. * Manages the simulation's current time. @@ -37,7 +37,7 @@ The simulation engine relies on several key C++ components (classes) to manage t * Manages the `TimeTable` of simulation events. * May handle discretization of the domain into cells (e.g., for flux calculations or burning map outputs). -* **`FireFront` & `FireNode` (Representing the Fire)** +* **FireFront & FireNode (Representing the Fire)** * ForeFire uses a **Lagrangian** approach to track the fire's edge. * A `FireFront` represents a continuous segment of the fire perimeter. It is essentially a linked list of `FireNode` objects. @@ -55,7 +55,7 @@ The simulation engine relies on several key C++ components (classes) to manage t * **Splitting:** Not explicitly mentioned in summary, but might occur if front self-intersects or hits complex boundaries. * **Inner Fronts:** `FireFront` s can be nested to represent unburned islands within the main fire perimeter. -* **`DataBroker` & `DataLayer` (Accessing Environmental Data)** +* **DataBroker & DataLayer (Accessing Environmental Data)** * The `DataBroker` is the central hub for all environmental data needed by the simulation (terrain, fuel, weather). * It manages a collection of `DataLayer` objects. Each `DataLayer` provides access to a specific type of data (e.g., elevation, fuel index, wind speed). @@ -69,13 +69,13 @@ The simulation engine relies on several key C++ components (classes) to manage t * Interpolating data in space and potentially time (e.g., for time-varying wind fields). * When a `FireNode` needs environmental data to calculate its speed, it asks the `DataBroker`, which efficiently retrieves the necessary values from the relevant `DataLayer` (s) at the node's location. -* **`PropagationModel` & `FluxModel` (The Physics)** +* **PropagationModel & FluxModel (The Physics)** * ForeFire uses a **Strategy pattern** for physical calculations, allowing different models to be plugged in. * `PropagationModel` subclasses (e.g., `Rothermel`, `Balbi`, `Iso`) implement specific algorithms to calculate the Rate of Spread (ROS) based on properties fetched via the `DataBroker`. The active model is chosen using the :ref:`propagationModel ` parameter. * `FluxModel` subclasses (e.g., `HeatFluxBasicModel`) calculate fluxes (like heat, water vapor) from the burning area, often needed for coupled simulations or specific research outputs. -* **`SimulationParameters` (Configuration)** +* **SimulationParameters (Configuration)** * A central place (likely a Singleton class internally) holding the global configuration values set by the user via :ref:`setParameter ` or :ref:`setParameters ` commands. This includes things like model choices, resolution parameters, output settings, etc. @@ -88,10 +88,10 @@ Simulation Workflow Summary * Commands from a script file (or interactive input) are processed. * :doc:`Parameters ` are set. * The :ref:`FireDomain ` is created. - * :ref:`loadData ` populates the `DataBroker` with `DataLayer`s from the :doc:`/user_guide/landscape_file`. The :doc:`/user_guide/fuels_file` information is associated. + * :ref:`loadData ` populates the `DataBroker` with `DataLayer` from the :doc:`/user_guide/landscape_file`. The :doc:`/user_guide/fuels_file` information is associated. * The initial fire state is defined using :ref:`startFire ` or custom `FireFront`/`FireNode` commands, scheduling the first update events for the initial nodes into the `TimeTable`. -2. **Simulation Loop (driven by `step` or `goTo`):** +2. **Simulation Loop (driven by step or goTo):** * The `Simulator` gets the chronologically next event (usually a `FireNode` update) from the `TimeTable`. * The `Simulator` advances the global simulation time to the event time.