Skip to content

Logic behind imprecision in FFMC calculation #6

@BadgerOnABike

Description

@BadgerOnABike

In an effort to determine what each of the systems calculating FWI are up to we noticed that FFMC had been calculated with seemingly random significant digits. The correct value is 147.27723 however, like the referenced code below we see precision being applied based on an hourly fraction rather than just using the most precise version. The rounded precision called is also different than what rounding this value would do.

if (hourFrac2 > 1e-4)
factor = 147.27723;
else
factor = 147.2;

This variety of error can be seen in a number of places, I've not documented them all yet, I'd just like clarification on why this is happening.

We have looked through the original C code and do not see these rounding structures.

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions