From 6d33f075b565d549846a3e712d2615c7c11de1f0 Mon Sep 17 00:00:00 2001 From: Antonio Leblanc Date: Tue, 10 Nov 2026 12:24:34 -0300 Subject: [PATCH 1/2] farsite: apply Farsite.adjustementWind to the wind --- CHANGELOG.md | 4 ++++ src/propagation/FarsitePropagationModel.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85963b1..dca28f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,9 @@ history, so they summarise each release rather than list every change. The ### Fixed +- `Farsite.adjustementWind` now scales the wind of the Farsite model, as + `BalbiNov2011.adjustementWind` does for Balbi. It was read and ignored. + The default, 1, leaves results unchanged. ([#265]) - Commands that need a domain print an error when there is none, instead of segfaulting: `FireNode`, `FireFront`, `startFire`, `goTo`, `save[]`, `trigger[fuel]`, `trigger[fuelIndice]`, any command scheduled with `@t` or @@ -337,3 +340,4 @@ repository stays easy to return to. [#171]: https://github.com/forefireAPI/forefire/issues/171 [#172]: https://github.com/forefireAPI/forefire/issues/172 [#242]: https://github.com/forefireAPI/forefire/pull/242 +[#265]: https://github.com/forefireAPI/forefire/issues/265 diff --git a/src/propagation/FarsitePropagationModel.cpp b/src/propagation/FarsitePropagationModel.cpp index 144e7af..78897ee 100644 --- a/src/propagation/FarsitePropagationModel.cpp +++ b/src/propagation/FarsitePropagationModel.cpp @@ -53,6 +53,7 @@ namespace libforefire size_t idx_heatl; /*! local variables */ + double adjustementWind; std::ofstream csvfile; /*! result of the model */ double getSpeed(double *); @@ -115,7 +116,7 @@ namespace libforefire /* registering the model in the data broker */ dataBroker->registerPropagationModel(this); - double adjustementWind = 1.0; + adjustementWind = 1.0; if (params->isValued("Farsite.adjustementWind")) adjustementWind = params->getDouble("Farsite.adjustementWind"); @@ -182,7 +183,7 @@ namespace libforefire //----------------------------------------------------------------------------- // 2) Read actual values from valueOf //----------------------------------------------------------------------------- - double windspd = valueOf[idx_wind]; // wind along the normal, m/s + double windspd = adjustementWind * valueOf[idx_wind]; // wind along the normal, m/s double slope = valueOf[idx_slope]; // tangent of the slope along the normal // moinstures variables double m_ones = valueOf[idx_m_ones]; From 4bfe4b0c3db2b52cfeba51e49bee2f26b7dd4b5b Mon Sep 17 00:00:00 2001 From: Antonio Leblanc Date: Tue, 10 Nov 2026 12:33:38 -0300 Subject: [PATCH 2/2] coupling: remove unused atmoSurf; drop adjustementWind CHANGELOG line --- CHANGELOG.md | 4 ---- src/CLibForeFire.cpp | 2 -- 2 files changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dca28f8..85963b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,9 +39,6 @@ history, so they summarise each release rather than list every change. The ### Fixed -- `Farsite.adjustementWind` now scales the wind of the Farsite model, as - `BalbiNov2011.adjustementWind` does for Balbi. It was read and ignored. - The default, 1, leaves results unchanged. ([#265]) - Commands that need a domain print an error when there is none, instead of segfaulting: `FireNode`, `FireFront`, `startFire`, `goTo`, `save[]`, `trigger[fuel]`, `trigger[fuelIndice]`, any command scheduled with `@t` or @@ -340,4 +337,3 @@ repository stays easy to return to. [#171]: https://github.com/forefireAPI/forefire/issues/171 [#172]: https://github.com/forefireAPI/forefire/issues/172 [#242]: https://github.com/forefireAPI/forefire/pull/242 -[#265]: https://github.com/forefireAPI/forefire/issues/265 diff --git a/src/CLibForeFire.cpp b/src/CLibForeFire.cpp index 7af7518..b25de75 100644 --- a/src/CLibForeFire.cpp +++ b/src/CLibForeFire.cpp @@ -496,7 +496,6 @@ void FFGetDoubleArray(const char* mname, double t } if (tmpname == "injectedAtGround"){ double atmosphericTimeStep = SimulationParameters::GetInstance()->getDouble("atmosphericTimeStep"); - double atmoSurf = SimulationParameters::GetInstance()->getDouble("atmosphericCellLength") * SimulationParameters::GetInstance()->getDouble("atmosphericCellWidth"); double sumInjected = SimulationParameters::GetInstance()->getDouble("sumInjected"); @@ -507,7 +506,6 @@ void FFGetDoubleArray(const char* mname, double t if (tmpname == "spotAtGround"){ double atmosphericTimeStep = SimulationParameters::GetInstance()->getDouble("atmosphericTimeStep"); - double atmoSurf = SimulationParameters::GetInstance()->getDouble("atmosphericCellLength") * SimulationParameters::GetInstance()->getDouble("atmosphericCellWidth"); double sumSedimented = SimulationParameters::GetInstance()->getDouble("sumSedimented"); sumSedimented = sumSedimented + ((fullMatrix->sum()) * atmosphericTimeStep );;