From 8b6d33dcb013a5f2f70fb285cb93454925f91dde Mon Sep 17 00:00:00 2001 From: amarcozzi Date: Mon, 6 Jul 2026 10:41:52 -0600 Subject: [PATCH] Fix fuel moisture examples to use percent instead of fractions Fuel moisture is percent at the API/grid/SDK-input level; the QUIC-Fire exporter divides by 100 to produce the fraction treesmoist.dat expects. Several docstrings and the export_to_quicfire tutorial showed fractions (0.08, 0.15, ...), which store 100x too little moisture. Replace the fraction values with their percent equivalents and correct the accompanying "(0.0-1.0)" comments to "(%)". Closes #186 --- docs/v1/tutorials/export_to_quicfire.md | 10 +++++----- fastfuels_sdk/v1/convenience.py | 4 ++-- fastfuels_sdk/v1/grids/grids.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/v1/tutorials/export_to_quicfire.md b/docs/v1/tutorials/export_to_quicfire.md index 056a42f..3b9ed06 100644 --- a/docs/v1/tutorials/export_to_quicfire.md +++ b/docs/v1/tutorials/export_to_quicfire.md @@ -181,7 +181,7 @@ surface_grid = ( remove_non_burnable=["NB1", "NB2"], ) .with_uniform_fuel_moisture( - value=0.15, + value=15.0, feature_masks=["road", "water"] ) .build() @@ -264,7 +264,7 @@ This replaces the manual `.with_uniform_fuel_moisture()` call from Step 8 above: surface_config = { "fuelMoisture": { "source": "uniform", - "value": 0.05, # 5% moisture content + "value": 5, # 5% moisture content "featureMasks": ["road", "water"] } } @@ -356,7 +356,7 @@ surface_config = { "fuelMoisture": { "source": "uniform", # Currently only uniform supported - "value": 0.15, # Moisture content (0.0-1.0) + "value": 15, # Moisture content (%) "featureMasks": ["road", "water"] } } @@ -475,7 +475,7 @@ surface_config = { }, "fuelMoisture": { "source": "uniform", - "value": 0.08, # Very dry conditions (8%) + "value": 8, # Very dry conditions (8%) "featureMasks": ["road"] } } @@ -515,7 +515,7 @@ features_config = { surface_config = { "fuelMoisture": { "source": "uniform", - "value": 0.12, + "value": 12, "featureMasks": ["road"] # Only road masks } } diff --git a/fastfuels_sdk/v1/convenience.py b/fastfuels_sdk/v1/convenience.py index 098a7fd..4afe9f3 100644 --- a/fastfuels_sdk/v1/convenience.py +++ b/fastfuels_sdk/v1/convenience.py @@ -427,7 +427,7 @@ def export_roi( }, "fuelMoisture": { "source": "uniform", - "value": 0.15, # Fuel moisture content (0.0-1.0) + "value": 15, # Fuel moisture content (%) "featureMasks": ["road", "water"] } } @@ -521,7 +521,7 @@ def export_roi( >>> surface_config = { ... "fuelMoisture": { ... "source": "uniform", - ... "value": 0.05, + ... "value": 5, ... "featureMasks": ["road", "water"] ... } ... } diff --git a/fastfuels_sdk/v1/grids/grids.py b/fastfuels_sdk/v1/grids/grids.py index 76c6719..3487389 100644 --- a/fastfuels_sdk/v1/grids/grids.py +++ b/fastfuels_sdk/v1/grids/grids.py @@ -241,7 +241,7 @@ def create_surface_grid( >>> grid = grids.create_surface_grid( ... attributes=["fuelLoad", "fuelMoisture"], ... fuel_load={"source": "uniform", "value": 0.5}, - ... fuel_moisture={"source": "uniform", "value": 0.1} + ... fuel_moisture={"source": "uniform", "value": 15.0} ... ) See Also