From 66b69aa65d2d53ed20e68da55334a554e8883ced Mon Sep 17 00:00:00 2001 From: Eliot McIntire Date: Wed, 14 Oct 2026 19:45:40 -0700 Subject: [PATCH] spreadFitGoogleDriveFolder default from fireSenseUtils Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6 --- NEWS.md | 1 + fireSense_dataPrepFit.R | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index a31d58c..92c62bc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # fireSense_dataPrepFit (development version) +- `spreadFitGoogleDriveFolder` defaults to `fireSenseUtils::spreadFitLedgerFolder()`, which follows `options(fireSenseUtils.spreadFitLedgerFolder = )`. `fireSenseUtils` floor raised to 0.2.3.9094, the first version with `spreadFitLedgerFolder()`. - Changed: the defaults are the values production already passes. `spreadIntercept` is `TRUE` (spread formula `~ 1 + ...`, free intercept with centred covariates) and `areaMultiplier` is `function(size) 10 * fireSenseUtils::multiplier(size)`, 10 times the old default, built to be `identical()` to what runs pass so their caches are unchanged. Fits that relied on the old defaults now get the intercept and the 10x buffers. - Fixed: the structure of the spread model is decided at fit time, for the fit's decision year, and a hindcast's run of this module makes the same decision. Whether treed wetland is a spread covariate (`minCovariateProp`), the land-cover shares used to estimate fuel classes, and the dominant/secondary fuel classes are decided on the data year the last fire year uses (`fitDecisionYear()` = `max(fireYears)`; `fireSenseUtils::dataYearFor()`: the data year closest to and not after a year, the rule `yearGroups()` assigns vegetation to fire years with, now also used by `yearGroups()`), read from the per-year lists (`rstLCCs`, `flammableRTMs`, `cohortDatas`, ...), not from `sim$rstLCC_RTM`/`sim$flammableRTM` or the last element of the lists. `fireSense_dataPrepPredict` overwrites those two with the year it predicts, so a hindcast (e.g. 1985) rebuilt the spread formula on 1985 land cover and could add a `treedWetland_agb` term the fit did not have. Results of a fit are unchanged. Needs fireSenseUtils >= 0.2.3.9093 (`dataYearFor()`, `dataYearElement()`). diff --git a/fireSense_dataPrepFit.R b/fireSense_dataPrepFit.R index 6d1e8f3..dcdf6a4 100644 --- a/fireSense_dataPrepFit.R +++ b/fireSense_dataPrepFit.R @@ -17,7 +17,7 @@ defineModule(sim, list( reqdPkgs = list("data.table", "fastDummies", "Require", "PredictiveEcology/reproducible@development (>= 3.2.1.9042)", # CacheGeo re-reads a changed local file "PredictiveEcology/climateData@development (>= 2.2.3.9006)", - "PredictiveEcology/fireSenseUtils@development (>= 0.2.3.9093)", # dataYearFor(), dataYearElement() + "PredictiveEcology/fireSenseUtils@development (>= 0.2.3.9094)", # dataYearFor(), dataYearElement() "FOR-CAST/fireregimetools@main (>= 0.1.0.9008)", "ggplot2", "parallel", "purrr", "raster", "sf", "sp", "PredictiveEcology/LandR@development (>= 1.2.0.9015)", @@ -115,7 +115,7 @@ defineModule(sim, list( "Set it for every fireSense module at once with `.globals = list(heldOutFold = 1L)`;", "`Init()` stops if `fireSense_spreadFit` has a different value. Any other value is an error.")), defineParameter("spreadFitGoogleDriveFolder", "character", - "https://drive.google.com/drive/folders/1X9-mRjyLMNpgkP_cfqhbr_AQEPOsVCHf", + fireSenseUtils::spreadFitLedgerFolder(), NA, NA, paste("URL of the Google Drive folder holding the ledger of previous SpreadFit results", "(`spreadFitFilename`), read with `reproducible::CacheGeo`.")), defineParameter("spreadFitFilename", "character", "latest",