fireSense_ignitionPredict.RmdEliot McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Ian Eddy ian.eddy@nrcan-rncan.gc.ca [aut], Jean Marchal jean.d.marchal@gmail.com [aut], Alex M Chubaty achubaty@for-cast.ca [ctb]
Each year, predicts ignitions and escapes from the models fitted by fireSense_ignitionFit and fireSense_EscapeFit, for the ignition component of fireSense (Marchal, Steve G. Cumming, et al. 2017b; Marchal, Steve G. Cumming, et al. 2017a; Marchal et al. 2019).
fireSense_igAndEscapePred_Covariates are rescaled with fireSenseUtils::prepareCovariatesOuter(), the function used for fitting (rescaleVars, modelAlgorithm).flammableRTM inside its coarse pixel.Only xgboost models are supported.
ignitionFitRTM (the coarse raster used for fitting, from fireSense_dataPrepFit) is also read from the simList, though it is not declared as an input.
modelAlgorithm and rescaleVars must have the same value in every module that defines them.
Table 1 shows the full list of module inputs.
| objectName | objectClass | desc | sourceURL |
|---|---|---|---|
| fireSense_EscapeFitted | fireSense_EscapeFit |
Fitted escape models ($modelList$model, one per fold), from fireSense_EscapeFit.
|
NA |
| fireSense_IgnitionFittedList | list |
Only with several fitted ELFs: one fireSense_IgnitionFitted per ELF, named by ELFind. Each ELF’s model predicts the coarse pixels of that ELF.
|
NA |
| fireSense_EscapeFittedList | list |
Only with several fitted ELFs: one fireSense_EscapeFitted per ELF, named as fireSense_IgnitionFittedList.
|
NA |
| rasterToMatchLargeELF | SpatRaster |
Only with several fitted ELFs: each pixel’s ELF (ELFind), from fireSense_ELFs with a studyAreaLarge.
|
NA |
| fireSense_IgnitionFitted | fireSense_IgnitionFit |
Fitted ignition models ($modelList$model, one per fold) and $modelList$fittingRes, from fireSense_ignitionFit.
|
NA |
| fireSense_igAndEscapePred_Covariates | data.table |
This year’s covariates, from fireSense_dataPrepPredict. pixelID is the cell index of ignitionFitRTM.
|
NA |
| flammableRTM | SpatRaster | Binary raster, 1 where the pixel is flammable. | NA |
Summary of user-visible parameters (Table 3)
| paramName | paramClass | default | min | max | paramDesc |
|---|---|---|---|---|---|
| modelAlgorithm | character | xgboost | NA | NA |
Algorithm used to fit the models; only xgboost is supported. Must agree with the value in the other fireSense modules.
|
| rescaleVars | logical | TRUE | NA | NA |
Rescale the covariates before predicting? With xgboost they are standardized with scale(). Must agree with the value in the other fireSense modules.
|
| .runInitialTime | numeric | 0 | NA | NA | Time of the first prediction. |
| .runInterval | numeric | 1 | NA | NA |
Interval between predictions, in years. NA predicts once.
|
| .saveInitialTime | numeric | NA | NA | NA |
Time of the save event, which does nothing. NA means never.
|
| .saveInterval | numeric | NA | NA | NA |
If not NA, the ignition probability raster is plotted each year.
|
| .studyAreaName | character | NA | NA | NA | Human-readable name for the study area used. |
| .useCache | logical | FALSE | NA | NA | Should this entire module be run with caching activated? This is generally intended for data-type modules, where stochasticity and time are not relevant |
init: schedules run at .runInitialTime, and save at .saveInitialTime if that is not NA.run: makes the predictions and draws described above; repeats every .runInterval.save: does nothing but say so. To save the predicted raster, name fireSense_IgAndEscapeProbRas in outputs(sim).If .saveInterval is not NA, the ignition probability raster is plotted each year with Plots().
Description of the module outputs (Table 5).
| objectName | objectClass | desc |
|---|---|---|
| fireSense_IgAndEscapeProbRas | SpatRaster |
Two layers, ignitionProb (expected ignitions per pixel) and escapeProb, at the resolution of ignitionFitRTM.
|
| ignitionsAndEscapes | data.table |
One row per ignited pixel, in random order: pixelID (cell index of flammableRTM), igProb, ignitions, escapeProb, escapes of the coarse pixel it was drawn from, and escaped, whether this ignition escaped: exactly escapes of a coarse pixel’s rows are TRUE.
|
Runs after fireSense_dataPrepPredict, which supplies the covariates. ignitionsAndEscapes is used by fireSense to start fires.
It is normally run as part of the fireSense module group.