From bea246d047711fab338a7adf4f898f074a91b49a Mon Sep 17 00:00:00 2001 From: CI BOT Date: Thu, 5 Jun 2025 07:33:29 +0000 Subject: [PATCH 1/9] ci: increment version [skip ci] --- src/include/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/Version.h b/src/include/Version.h index 77eb5bd..411141a 100644 --- a/src/include/Version.h +++ b/src/include/Version.h @@ -1,3 +1,3 @@ #pragma once -const char* ff_version = "v2.1.109"; +const char* ff_version = "v2.1.110"; From 63635ca913b61886713c15877730b5bbae2dba6b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Filippi Date: Sun, 15 Jun 2025 09:53:06 +0200 Subject: [PATCH 2/9] small fixup for gradient default search --- src/GradientDataLayer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GradientDataLayer.h b/src/GradientDataLayer.h index 9831137..4845174 100644 --- a/src/GradientDataLayer.h +++ b/src/GradientDataLayer.h @@ -103,11 +103,12 @@ T GradientDataLayer::getValueAt(FFPoint loc, const double& time) { // Compute the gradient in each direction and find the maximum. T maxGradient = 0.0; for (size_t i = 0; i < directions.size(); ++i) { - FFPoint nextLoc = loc + (10 * directions[i]); + double dxGrad = getDx(); + FFPoint nextLoc = loc + (dxGrad * directions[i]); T neighborValue = parent->getValueAt(nextLoc, time); // Since the displacement magnitude is dx in every case (after normalization), // the gradient is computed as the difference divided by dx. - T gradient = (neighborValue - currentValue) / 10; + T gradient = (neighborValue - currentValue) / dxGrad; if (gradient > maxGradient) { maxGradient = gradient; } From 03a1e2d48e0c7e042a3dcd78effa58741aff3d8a Mon Sep 17 00:00:00 2001 From: CI BOT Date: Sun, 15 Jun 2025 07:53:22 +0000 Subject: [PATCH 3/9] ci: increment version [skip ci] --- src/include/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/Version.h b/src/include/Version.h index 411141a..a391eb9 100644 --- a/src/include/Version.h +++ b/src/include/Version.h @@ -1,3 +1,3 @@ #pragma once -const char* ff_version = "v2.1.110"; +const char* ff_version = "v2.1.111"; From 56a8abbc7e8000ce6a731abb711eae33614fc59c Mon Sep 17 00:00:00 2001 From: th96r4ss Date: Thu, 3 Jul 2025 10:13:55 +0200 Subject: [PATCH 4/9] added a function to mask a netcdf with a kml --- .../extract_from_eu_land_cover.py | 56 ++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/tools/preprocessing/extract_from_eu_land_cover.py b/tools/preprocessing/extract_from_eu_land_cover.py index 2c4164b..7156c87 100644 --- a/tools/preprocessing/extract_from_eu_land_cover.py +++ b/tools/preprocessing/extract_from_eu_land_cover.py @@ -28,6 +28,9 @@ from rasterio.features import rasterize from shapely.geometry import mapping + +import xarray as xr + attribute_widths_road_edge_full = { 'secondary': 0.8, @@ -552,7 +555,7 @@ def fake_fuel(legend_file_path, WSEN, LBRT,output_dir,fuel_resolution = 10): -def rasterize_kml(kml_path, ref_tif, output_path, default_value=1, imbounds=None): +def rasterize_kml(kml_path, ref_tif, output_path, default_value=62, imbounds=None): print(f"Rasterizing KML {kml_path} to {output_path}") # Load reference GeoTIFF for spatial reference @@ -590,6 +593,57 @@ def rasterize_kml(kml_path, ref_tif, output_path, default_value=1, imbounds=None crs=ref_crs, transform=transform) as dst: dst.write(raster, 1) +def nc_masked_kml(ref_nc, path_kml, field='fuel', default_value=1, imbounds=None): + import fiona + fiona.drvsupport.supported_drivers['KML'] = 'rw' + + if field == 'fuel': + ny = ref_nc[field].sizes['fy'] + nx = ref_nc[field].sizes['fx'] + + else: + ny = ref_nc.sizes['ny'] + nx = ref_nc.sizes['nx'] + + attrs = ref_nc['domain'].attrs + + west, south, east, north = map(float, attrs['BBoxWSEN'].split(',')) + if imbounds is not None: + west, south, east, north = imbounds + + resx = (east - west) / nx + resy = (north - south) / ny + + transform = from_origin(west, north, resx, resy) + + + gdf = gpd.read_file( path_kml, driver='KML') + + + shapes = [] + for _, feature in gdf.iterrows(): + name = feature.get('Name', '') + try: + val = int(name) if name.isdigit() else default_value + except Exception: + val = default_value + geom = feature.geometry + shapes.append((geom, val)) + + rasterized = rasterize( + shapes, + out_shape=(ny, nx), + transform=transform, + fill=0, + dtype='int16') + + fieldnc = ref_nc[field][0,0,::-1,:] #for fuels it is upside down + fieldnc_updated = xr.where(rasterized == 1, 62, fieldnc) + + ref_nc[field][0,0,:,:] = fieldnc_updated[::-1,:] + + return ref_nc + def landcover_roads_to_fuel(S2GLC_tif,legend_file_path, WSEN, LBRT,output_dir,fuel_modifier=None, fuel_resolution = 10, no_fuel_code = 62): fuel_indices_origin = f"{output_dir}/fuel_indices_S2GLC.tif" From e5097c1b240deffb12b80e5d514573d2657ae8fc Mon Sep 17 00:00:00 2001 From: CI BOT Date: Thu, 3 Jul 2025 08:14:10 +0000 Subject: [PATCH 5/9] ci: increment version [skip ci] --- src/include/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/Version.h b/src/include/Version.h index a391eb9..7ce7ddd 100644 --- a/src/include/Version.h +++ b/src/include/Version.h @@ -1,3 +1,3 @@ #pragma once -const char* ff_version = "v2.1.111"; +const char* ff_version = "v2.1.112"; From 52a12d145e1aa385ab61ae2d8880ac328d3ec3f6 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Tue, 26 Aug 2025 05:55:29 -0300 Subject: [PATCH 6/9] comment increment version bot --- .github/workflows/increment-version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/increment-version.yml b/.github/workflows/increment-version.yml index 734674f..1329545 100644 --- a/.github/workflows/increment-version.yml +++ b/.github/workflows/increment-version.yml @@ -2,7 +2,7 @@ name: Increment Version on Dev on: push: - branches: [ dev ] + # branches: [ dev ] we can add back later if needed workflow_dispatch: jobs: From 54f87021eeecb7a4e246c4614420e9a060b3558c Mon Sep 17 00:00:00 2001 From: CI BOT Date: Tue, 26 Aug 2025 08:55:44 +0000 Subject: [PATCH 7/9] ci: increment version [skip ci] --- src/include/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/Version.h b/src/include/Version.h index 7ce7ddd..4493bfa 100644 --- a/src/include/Version.h +++ b/src/include/Version.h @@ -1,3 +1,3 @@ #pragma once -const char* ff_version = "v2.1.112"; +const char* ff_version = "v2.1.113"; From 283fd5fda12c0549dd4f1d5f1910f68cc6d06e58 Mon Sep 17 00:00:00 2001 From: antonio-leblanc Date: Tue, 26 Aug 2025 06:01:22 -0300 Subject: [PATCH 8/9] rm reduntand "context" from statement of need --- docs/source/about/statement_of_need.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/source/about/statement_of_need.rst b/docs/source/about/statement_of_need.rst index 4ac6e54..a0e3c94 100644 --- a/docs/source/about/statement_of_need.rst +++ b/docs/source/about/statement_of_need.rst @@ -26,8 +26,4 @@ ForeFire is intended for: * **Wildfire Researchers:** Investigating fire behavior, model development, sensitivity analyses, fire-atmosphere interactions. * **Operational Agencies:** Use in forecasting systems (potentially via ensemble simulations), risk assessment, and post-fire analysis. -* **Students and Educators:** A tool for learning about wildfire dynamics and simulation techniques. - -**Context:** - -ForeFire aims to complement and extend the capabilities of other existing wildfire simulation tools by focusing on high-performance computing, advanced physics coupling, and providing a flexible open-source C++ core. *(Mention specific limitations of other tools that ForeFire addresses, if appropriate, and potentially cite 1-2 key alternative tools for comparison).* \ No newline at end of file +* **Students and Educators:** A tool for learning about wildfire dynamics and simulation techniques. \ No newline at end of file From 89b78b0e1ad1f003adc22f9402d7aa9e4b83f8b6 Mon Sep 17 00:00:00 2001 From: CI BOT Date: Tue, 26 Aug 2025 09:21:44 +0000 Subject: [PATCH 9/9] ci: increment version [skip ci] --- src/include/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/Version.h b/src/include/Version.h index 4493bfa..3a45bb6 100644 --- a/src/include/Version.h +++ b/src/include/Version.h @@ -1,3 +1,3 @@ #pragma once -const char* ff_version = "v2.1.113"; +const char* ff_version = "v2.1.114";