Skip to content

write_fuels_m: incorrect loop over internal indices causes zero ROS for all Scott & Burgan categories in fuels.m #2287

@jbarcons

Description

@jbarcons

Description:
The loop in write_fuels_m iterates k from 1 to nfuelcats and passes k directly as nfuel_cat to set_fire_params. Inside set_fire_params, k is passed through the ksb lookup table (k=ksb(int(nfuel_cat(i,j)))). The ksb array maps original S&B codes (101–204) and Anderson codes (1–13) to internal indices, but is initialized to 14 (no fuel) for all other values. Internal indices 15–54 are never assigned in ksb, so ksb(15) through ksb(54) all return 14. As a result, write_fuels_m computes zero ROS for all Scott & Burgan categories and writes misleading zeros to fuels.m

Proposed fix:
In write_fuels_m, the loop should either iterate over the original S&B codes directly (101, 102, ..., 204) instead of internal indices, or call set_fire_params bypassing ksb by setting the fuel parameters directly from the internal index k.

Impact:
The bug only affects the diagnostic output file fuels.m and does not affect the actual fire spread computation during a simulation. However, it causes users to incorrectly conclude that their S&B fuel parameters are wrong or that ROS is zero, potentially leading to misdiagnosis of real problems.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions