Skip to content
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# fireSense_dataPrepPredict (development version)

* New parameters `replaySave` (default `FALSE`) and `replayFrom` (default `NA`): no change unless set. `replaySave = TRUE` writes, once after the first covariate build, the spread-prediction inputs that do not depend on the spread parameters to `outputPath(sim)` through SpaDES.core's `outputs()` (its `save` event): `fireSense_SpreadCovariates`, `flammableRTM`, `rasterToMatch`, `rasterToMatchELF`, `rasterToMatchLargeELF`, `studyAreaWithSpreadParams`, `nonEscapedFireSizesHa`, `ignitionFirePoints` and `firePolys` (those present), as `replay_<name>_year<time>.<ext>`: `.tif` (`terra::writeRaster()`, keeps categories), `.gpkg` for vectors (`terra::writeVector()`; `firePolys` stacked into one, element names in a column), `.qs2` for tables and `studyAreaWithSpreadParams` (its list columns survive). `replayFrom = <that folder>` reads them back in `.inputObjects` through `inputs()`/`loadFiles()` and schedules no covariate event, so a job needs no climate, vegetation, fit or ELF module. The module declares the objects other modules make as inputs only. `qs2` is now in `reqdPkgs`.

* Inside one year (the reps of a hindcast, `fireTimeStep` < 1) the ignition and spread covariates are built once, not at every step. They are rebuilt when the year, the climate, `cohortData`, `pixelGroupMap`, `flammableRTM`, `landcoverDT`, `rstLCC_RTM`, the non-forest time since disturbance, `lightningMaps` (ignition) or the fitted rows (`studyAreaWithSpreadParams`: ELF, polygons, fitted parameter names) changed; inputs are compared by rlang::hash() of their values (`covariatesBuilt()`, `inputDigest()`). Same covariates; their `year` label is the first step's time. About 12 s per rep saved on a hindcast year.
* The land cover of the per-ELF fuel sets (`mod$ELFrstLCC`, `mod$ELFlandcoverDTs`) was made once per run and never refreshed, so a change of `rstLCC_RTM` or `flammableRTM` inside a run was not seen; it is now made again when either changed. `rlang` is in `reqdPkgs`.

* `dataYear` defaults to 2020 (was 2011), the default of Biomass_core, Biomass_borealDataPrep, Biomass_speciesData and burnSummaries, and may be up to 2025. `.inputObjects` stops when another module has a different `dataYear` (`SpaDES.core::paramCheckOtherMods()`). It is read only when `fireSense_dataPrepFit` does not supply the land cover, stand age and non-forest time since disturbance (a run that only predicts), so runs with `fireSense_dataPrepFit` predict as before.

* A run without `fireSense_dataPrepFit` (one that only predicts) now works: `.inputObjects` reads the stored fits of the ELFs the study area touches from the SpreadFit ledger (`predictInputsFromLedger()`, with `fireSenseUtils::readSpreadFitLedger()`), sets the per-ELF `sppEquivs`, `nonForestedLCCGroupsList` and `missingLCCgroupList`, asks canClimateData for the fits' climate variables (`climateVariables`, `climateVariablesForFire`; the 'MDC' default made the ignition covariates fail with "[subset] invalid name(s)"), and makes `lightningMaps` (`fireSenseUtils::prepare_LightningData()`). `prepIgAndEscPredictData` makes `ignitionFitRTM`, the coarse grid of the ignition covariates, unless another module supplies it (`fireSense_ignitionPredict` stopped on a NULL one). New parameters `fitFileSuffix`, `spreadFitFilename`, `spreadFitGoogleDriveFolder` (as in `fireSense_dataPrepFit`). A `studyAreaWithSpreadParams` supplied as `NULL` predicts without stored fits, as before.
Expand Down
Loading
Loading