diff --git a/NEWS.md b/NEWS.md index 023376a..0e9f0e5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # fireSense_dataPrepFit (development version) +- The `fireYears` default is plain `fireSenseUtils::defaultFireYears()`, which now starts in 1986 (before, this module dropped its first year with `[-1L]`). Floor `fireSenseUtils` raised to 0.2.3.9099, the first version whose `defaultFireYears()` starts in 1986 (PredictiveEcology/fireSenseUtils#158). The default fire years do not change; `fireSense_ELFs` shares them. + - Fixed: each fire year is fitted against vegetation from an earlier year. A year's satellite vegetation already shows part of that year's fires (ELF 6.6.2: pixels burned in 2010 have mean biomass 64 in the 2005 vegetation and 26 in the 2010 vegetation, while unburned pixels are near 79 in both), so the fits learned that fire burns where the vegetation already looks burned. A fire year now uses the latest data year strictly before it (1986-1990 use 1985, 1991-2000 use 1990, ...; `yearGroups()`, `lccShareForYear()`, `fitDecisionYear()`'s data year), the decision year of the structure of the model included, and every `fireYears` must be after the first of `dataYears`, with an error otherwise. The `fireYears` default therefore starts in 1986. Fits, ignition and escape alike, must be redone. Prediction is unchanged: it still uses the data year at or before the year. - `spreadFitGoogleDriveFolder` defaults to `fireSenseUtils::spreadFitLedgerFolder()`, which follows `options(fireSenseUtils.spreadFitLedgerFolder = )`. `fireSenseUtils` floor raised to 0.2.3.9097, the first version with `spreadFitLedgerFolder()`. diff --git a/fireSense_dataPrepFit.R b/fireSense_dataPrepFit.R index 37aae15..2c7a4ea 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.9097)", # dataYearFor(), dataYearElement() + "PredictiveEcology/fireSenseUtils@development (>= 0.2.3.9099)", # defaultFireYears() from 1986; dataYearFor(), dataYearElement() "FOR-CAST/fireregimetools@main (>= 0.1.0.9008)", "ggplot2", "parallel", "purrr", "raster", "sf", "sp", "PredictiveEcology/LandR@development (>= 1.2.0.9015)", @@ -53,11 +53,11 @@ defineModule(sim, list( paste("Estimate fuel classes with `fireSenseUtils::assessFuelClasses`? Skipped if the user supplies", "`nonForestedLCCGroups`, `fuelClassTable` or a `FuelClass` column that differs from LandR's,", "or if a previous SpreadFit exists for the study area.")), - defineParameter("fireYears", "integer", fireSenseUtils::defaultFireYears()[-1L], NA, NA, + defineParameter("fireYears", "integer", fireSenseUtils::defaultFireYears(), NA, NA, paste("Years of fire records to use for fitting. All must be after the first of `dataYears`,", "and `historicalClimateRasters` must cover all of them. The default runs from 1986, the", "year after the first SCANFI V2 year, to the latest year with historical climate for every tile", - "(`fireSenseUtils::defaultFireYears()` without its first year); climate is the last of the inputs to reach a year.", + "(`fireSenseUtils::defaultFireYears()`); climate is the last of the inputs to reach a year.", "`fireSense_ELFs` takes its `fireYears` default from the same function.")), defineParameter("flammabilityThreshold", "numeric", fireSenseUtils::fireSenseFlammabilityThreshold, 0, 1, paste("Minimum proportion of flammable fine-resolution land cover for a `rasterToMatch`", diff --git a/fireSense_dataPrepFit.md b/fireSense_dataPrepFit.md index 42645bb..861f631 100644 --- a/fireSense_dataPrepFit.md +++ b/fireSense_dataPrepFit.md @@ -356,7 +356,7 @@ Parameters are in Table \@ref(tab:moduleParams-fireSense-dataPrepFit).