"latest" is how readers find fits, not a file: a fit goes to the file named for its own fire years and model (fireSenseUtils::spreadFitFilenameFor()), which is then the latest one that has this polygon. Any other spreadFitFilename is used as it is.

ledgerWriteFile(spreadFitFilename, fireYears, annualNames)

Arguments

spreadFitFilename

The module's spreadFitFilename parameter.

fireYears

fireSense_dataPrepFit's fireYears, the window the fit used; NULL when that module is not in the simulation.

annualNames

Names of sim$fireSense_annualSpreadFitCovariates ("year2001", ...), for the window when fireYears is not available.

Value

A file name.