Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ec5260a
Fix Windows portability: cstdint for int16_t, stat instead of dirent …
jaimecarrasco Jul 31, 2026
2cfb782
Portugal preset over S&B kernel, unified --fmc-shading, continuous mo…
jaimecarrasco Jul 31, 2026
85e0615
Rename fuel model files to kernel names
jaimecarrasco Jul 31, 2026
9dcf8ba
Portable makefile: Linux, macOS and Windows/MSYS2 from a single file
jaimecarrasco Jul 31, 2026
f7c4d65
Guard S_ISREG for MSVC
jaimecarrasco Jul 31, 2026
0635abf
Rename: update unit test includes to kernel names
jaimecarrasco Jul 31, 2026
96d135b
Fix l_to_b declaration and update Kitral unit tests
jaimecarrasco Aug 1, 2026
9ca90a6
Rename harvest vocabulary to firebreak
jaimecarrasco Aug 1, 2026
10945be
Vector inputs for ignitions, active front and barriers; unify barrier…
jaimecarrasco Aug 4, 2026
d9c724e
Define NOMINMAX before dirent.h for the MSVC build
jaimecarrasco Aug 6, 2026
40eaf28
Fix MSVC build of the unit test project
jaimecarrasco Aug 6, 2026
1cabfa2
Regenerate regression targets for the fork's behaviour changes
jaimecarrasco Aug 6, 2026
4dc98b3
Filter libtiff warnings in the regression test, and regenerate targets
jaimecarrasco Aug 6, 2026
b19f13f
Add Portillo instance with vector river and observed fire scar
jaimecarrasco Aug 7, 2026
bbbf584
Block barrier-crossing transitions instead of removing cells
jaimecarrasco Aug 7, 2026
16fcff9
Strip libtiff warnings from the regression targets
jaimecarrasco Aug 7, 2026
1cd69ed
Per-fuel rate-of-spread adjustment factors, and Anderson's 13 fuel mo…
jaimecarrasco Aug 8, 2026
959b2e6
Ignore the legacy FireScenario column of Weather.csv
jaimecarrasco Aug 9, 2026
e01436f
Silvicultural treatments over a polygon
jaimecarrasco Aug 10, 2026
91b07bc
Block diagonal leaks between cell-defined firebreaks
jaimecarrasco Aug 12, 2026
58caa73
Block diagonal leaks between cell-defined firebreaks
jaimecarrasco Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
*.py export-subst
*.git* export-ignore

# Los makefiles van en LF: con CRLF, la continuacion de linea (\ + CR) rompe make
makefile text eol=lf
makefile.* text eol=lf
*.sh text eol=lf
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,12 @@ test/target_results
docs/html
docs/latex
Data.csv

# Binarios con el sufijo de plataforma que espera get_ext() del plugin FAT
Cell2Fire/Cell2Fire.exe
Cell2Fire/Cell2Fire_Darwin*
Cell2Fire/Cell2Fire.Ubuntu*
Cell2Fire/Cell2Fire.Debian*

# Salidas generadas por el simulador dentro de las instancias
Results/
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ is 10.0 5.0 Oct 2014
- forgot to change the encoded version number to 5.0. now 5.0001
- updated header to FBP5.h
*/
#include "FuelModelFBP.h"
#include "CanadianFBPKernel.h"
#include "Cells.h"
#include <math.h>
#include <stdlib.h>
Expand Down
218 changes: 109 additions & 109 deletions Cell2Fire/FuelModelFBP.h → Cell2Fire/CanadianFBPKernel.h
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
/* fbp.h -- header file for fbp program bmw
function prototypes and structures for fbp.c prog
nov/92
modified for version 4.3 of the code
Aug/2005 bmw
modified for version 4.5 of the code
Nov/2007 bmw
change of name for 5.0
*/
#if !defined(_FBPHEAD)
#define _FBPHEAD
#include "Cells.h"
#include <stdio.h>
float grass(fuel_coefs* ptr, float cur, float isi, float* mu);
float mixed_wood(fuel_coefs* ptr, float isi, float* mult, int pc);
float ISF_mixedwood(fuel_coefs* ptr, float isz, int pc, float sf);
float ISF_deadfir(fuel_coefs* ptr, float isz, int pdf, float sf);
float dead_fir(fuel_coefs* ptr, int pdf, float isi, float* mult);
float D2_ROS(fuel_coefs* ptr, float isi, float bui, float* mu);
float conifer(fuel_coefs* ptr, float isi, float* mult);
float bui_effect(fuel_coefs* ptr, main_outs* at, float bui);
float ros_calc(inputs* inp, fuel_coefs* ptr, float isi, float* mu, weatherDF* wdf_ptr);
float rate_of_spread(inputs* inp, fuel_coefs* ptr, main_outs* at, weatherDF* wdf_ptr);
float slope_effect(inputs* inp, fuel_coefs* ptr, main_outs* at, float isi, weatherDF* wdf_ptr);
float surf_fuel_consump(inputs* inp, weatherDF* wdf_ptr);
float fire_intensity(float fc, float ros);
void setup_const(fuel_coefs* ptr);
char get_fueltype_number(fuel_coefs** ptr, char ft[4]);
float foliar_moisture(inputs* inp, main_outs* at);
float crit_surf_intensity(fuel_coefs* ptr, float fmc);
float critical_ros(char ft[3], float sfc, float csi);
int fire_type(float csi, float sfi);
float crown_frac_burn(float ros, float rso);
char fire_description(float cfb);
float final_ros(inputs* inp, float fmc, float isi, float cfb, float rss);
float crown_consump(inputs* inp, fuel_coefs* ptr, float cfb);
float foliar_mois_effect(float isi, float fmc);
float l_to_b(char ft[3], float ws);
float ffmc_effect(float ffmc);
float backfire_ros(inputs* inp, fuel_coefs* ptr, main_outs* at, float bisi, weatherDF* wdf_ptr);
float backfire_isi(main_outs* at);
float area(float dt, float df);
float perimeter(fire_struc* h, fire_struc* b, snd_outs* sec, float lb);
float acceleration(inputs* inp, float cfb);
float flankfire_ros(float ros, float bros, float lb);
float spread_distance(inputs* inp, fire_struc* ptr, float accn);
float flank_spread_distance(
inputs* inp, fire_struc* ptr, snd_outs* sec, float hrost, float brost, float hd, float bd, float lb, float a);
int time_to_crown(float ros, float rso, float a);
float fire_behaviour(inputs* inp, fuel_coefs* ptr, main_outs* at, fire_struc* f);
float flank_fire_behaviour(inputs* inp, fuel_coefs* ptr, main_outs* at, fire_struc* f);
void set_all(fire_struc* ptr, int time);
void calculate_fbp(inputs* data,
fuel_coefs* ptr,
main_outs* at,
snd_outs* sec,
fire_struc* hptr,
fire_struc* fptr,
fire_struc* bptr,
weatherDF* wdf_ptr);
void determine_destiny_metrics_fbp(
inputs* data, fuel_coefs* pt, main_outs* metrics, fire_struc* metrics2, weatherDF* wdf_ptr);
void zero_main(main_outs* m);
void zero_sec(snd_outs* s);
void zero_fire(fire_struc* a);
#endif
/* fbp.h -- header file for fbp program bmw
function prototypes and structures for fbp.c prog
nov/92
modified for version 4.3 of the code
Aug/2005 bmw
modified for version 4.5 of the code
Nov/2007 bmw
change of name for 5.0
*/

#if !defined(CANADIANFBPKERNEL)
#define CANADIANFBPKERNEL

#include "Cells.h"
#include <stdio.h>

float grass(fuel_coefs* ptr, float cur, float isi, float* mu);

float mixed_wood(fuel_coefs* ptr, float isi, float* mult, int pc);

float ISF_mixedwood(fuel_coefs* ptr, float isz, int pc, float sf);

float ISF_deadfir(fuel_coefs* ptr, float isz, int pdf, float sf);

float dead_fir(fuel_coefs* ptr, int pdf, float isi, float* mult);

float D2_ROS(fuel_coefs* ptr, float isi, float bui, float* mu);

float conifer(fuel_coefs* ptr, float isi, float* mult);

float bui_effect(fuel_coefs* ptr, main_outs* at, float bui);

float ros_calc(inputs* inp, fuel_coefs* ptr, float isi, float* mu, weatherDF* wdf_ptr);

float rate_of_spread(inputs* inp, fuel_coefs* ptr, main_outs* at, weatherDF* wdf_ptr);

float slope_effect(inputs* inp, fuel_coefs* ptr, main_outs* at, float isi, weatherDF* wdf_ptr);

float surf_fuel_consump(inputs* inp, weatherDF* wdf_ptr);

float fire_intensity(float fc, float ros);

void setup_const(fuel_coefs* ptr);

char get_fueltype_number(fuel_coefs** ptr, char ft[4]);

float foliar_moisture(inputs* inp, main_outs* at);

float crit_surf_intensity(fuel_coefs* ptr, float fmc);

float critical_ros(char ft[3], float sfc, float csi);

int fire_type(float csi, float sfi);

float crown_frac_burn(float ros, float rso);

char fire_description(float cfb);

float final_ros(inputs* inp, float fmc, float isi, float cfb, float rss);

float crown_consump(inputs* inp, fuel_coefs* ptr, float cfb);

float foliar_mois_effect(float isi, float fmc);

float l_to_b(char ft[3], float ws);

float ffmc_effect(float ffmc);

float backfire_ros(inputs* inp, fuel_coefs* ptr, main_outs* at, float bisi, weatherDF* wdf_ptr);

float backfire_isi(main_outs* at);

float area(float dt, float df);

float perimeter(fire_struc* h, fire_struc* b, snd_outs* sec, float lb);

float acceleration(inputs* inp, float cfb);

float flankfire_ros(float ros, float bros, float lb);

float spread_distance(inputs* inp, fire_struc* ptr, float accn);

float flank_spread_distance(
inputs* inp, fire_struc* ptr, snd_outs* sec, float hrost, float brost, float hd, float bd, float lb, float a);

int time_to_crown(float ros, float rso, float a);

float fire_behaviour(inputs* inp, fuel_coefs* ptr, main_outs* at, fire_struc* f);
float flank_fire_behaviour(inputs* inp, fuel_coefs* ptr, main_outs* at, fire_struc* f);

void set_all(fire_struc* ptr, int time);

void calculate_fbp(inputs* data,
fuel_coefs* ptr,
main_outs* at,
snd_outs* sec,
fire_struc* hptr,
fire_struc* fptr,
fire_struc* bptr,
weatherDF* wdf_ptr);
void determine_destiny_metrics_fbp(
inputs* data, fuel_coefs* pt, main_outs* metrics, fire_struc* metrics2, weatherDF* wdf_ptr);
void zero_main(main_outs* m);

void zero_sec(snd_outs* s);

void zero_fire(fire_struc* a);

#endif
Loading
Loading