| title | fireSense Manual | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| subtitle | v.0.0.0.9000 | ||||||||||||||
| date | Last updated: 2025-04-08 | ||||||||||||||
| output |
|
||||||||||||||
| editor_options |
|
||||||||||||||
| link-citations | true | ||||||||||||||
| always_allow_html | true |
(ref:fireSense) fireSense
Jean Marchal jean.d.marchal@gmail.com [aut, cre], Alex M. Chubaty achubaty@for-cast.ca [ctb]
A landscape fire model sensitive to environmental changes (e.g., weather and land cover).
- [@Marchal:2017a; @Marchal:2017b; @Marchal:2019]
Provide a brief summary of what the module does / how to use the module.
Module documentation should be written so that others can use your module. This is a template for module documentation, and should be changed to reflect your module.
Describe input data required by the module and how to obtain it (e.g., directly from online sources or supplied by other modules)
If sourceURL is specified, downloadData("fireSense", "..") may be sufficient.
Table @ref(tab:moduleInputs-fireSense) shows the full list of module inputs.
| objectName | objectClass | desc | sourceURL |
|---|---|---|---|
| fireSense_IgnitionPredicted | SpatRaster | A SpatRaster of ignition probabilities. | NA |
| fireSense_EscapePredicted | SpatRaster | A SpatRaster of escape probabilities. | NA |
| fireSense_SpreadPredicted | SpatRaster | A SpatRaster of spread probabilities. | NA |
Provide a summary of user-visible parameters (Table @ref(tab:moduleParams-fireSense))
| paramName | paramClass | default | min | max | paramDesc |
|---|---|---|---|---|---|
| plotIgnitions | logical | FALSE | NA | NA | whether to plot ignitions, escapes, and burns |
| .plotInitialTime | numeric | NA | NA | NA | optional. When to start plotting. |
| .plotInterval | numeric | NA | NA | NA | optional. Interval between plot events. |
| .runInitialTime | numeric | 0 | NA | NA | time to simulate initial fire |
| .runInterval | numeric | NA | NA | NA | optional. Interval between two runs of this module, expressed in units of simulation time. By default, 1 year. |
| .saveInitialTime | numeric | NA | NA | NA | optional. When to start saving output to a file. |
| .saveInterval | numeric | NA | NA | NA | optional. Interval between save events. |
| whichModulesToPrepare | character | fireSens.... | NA | NA | Which fireSense predict modules to prep? Defaults to all 3. Must include `fireSense_IgnitionPredict`. |
- ignite fires
- determine which fires escape
- spread escaped fires
- save
- plot
- Burn map: Pixels burned this timestep.
- Cumulative burn map: Number of times each pixel burned during the simulation..
burnMap: ARasterLayerdescribing how which pixels burned this timestep.burnMapCumul: ARasterLayerdescribing how many times each pixel burned over the course of the simulation.
Description of the module outputs (Table @ref(tab:moduleOutputs-fireSense)).
| objectName | objectClass | desc |
|---|---|---|
| burnDT | data.table | Data table with pixel IDs of most recent burn. |
| burnMap | SpatRaster | A raster of cumulative burns |
| burnSummary | data.table | Describes details of all burned pixels. |
| rstAnnualBurnID | SpatRaster | annual raster whose values distinguish individual fires |
| rstCurrentBurn | SpatRaster | A binary raster with 1 values representing burned pixels. |
Require(c("SpaDES.core", "SpaDES.tools"))
set.seed(1)
nx <- ny <- 100L
n <- nx * ny
r <- raster(nrows = ny, ncols = nx, xmn = -nx/2, xmx = nx/2, ymn = -ny/2, ymx = ny/2)
# Create a map ignition probabilities
ignitionProbRaster <- gaussMap(r, scale = 10, var = .0001, speedup = nx/5e2, inMemory = TRUE)
# Create a map of escape probabilities
escapeProbRaster <- gaussMap(r, scale = 50, var = .01, speedup = nx/5e2, inMemory = TRUE)
# Create a map of spread probabilities
spreadProbRaster <- gaussMap(r, scale = 300, var = .05, speedup = nx/5e2, inMemory = TRUE)
#outputDir <- file.path(tempdir(), "outputs")
times <- list(start = 1, end = 100, timeunit = "year")
modules <- list("fireSense")
# Pass objects found in the global environment to the simList environment
objects <- list(
ignitionProbRaster = ignitionProbRaster,
escapeProbRaster = escapeProbRaster,
spreadProbRaster = spreadProbRaster
)
paths <- list(
# cachePath = file.path(outputDir, "cache"),
modulePath = ".."
# inputPath = inputDir,
# outputPath = outputDir
)
mySim <- simInit(times = times, params = parameters, modules = modules, objects = objects, paths = paths)
spades(mySim)This module should be coupled with a dynamic vegetation model.
