knitr::opts_chunk$set( collapse = TRUE, comment = "#>", message = FALSE, warning = FALSE, error = FALSE, tidy = TRUE ) library(alfresco)
This short vignette provides a contextualized example of usage of fire size and FMO functions from the alfresco
package,
specifically fsdf
and fmo_cb_reduction
. See the help documentation for these and other associated functions for details.
Cumulative burn reduction results are compared for different fire management scenarios applied to multiple historical JFSP ALFRESCO model runs. Results are based on a two-factor experimental design. Each factor has a control and three treatment levels covering zero, 25, 50 and 75 percent maximum suppression applied to ALFRESCO fire sensitivity and ignition factor input maps, respectively. The status quo fire management scenario involves both controls: no suppression applied to either input map.
Load the required packages.
library(alfresco) library(dplyr) library(ggplot2)
Then prepare the data from the historical_fsv.rds
file. After using fsdf
and fmo_cb_reduction
, make some additional
changes in a new data frame for better plotting.
file <- "C:/github/jfsp/data-raw/historical_fsv.rds" d <- fsdf(file) d2 <- fmo_cb_reduction(d) lev <- c("Control", "Tx: 50s/75i") dex <- select(d, 7:10) %>% filter(FMO %in% c("fmo00s00i", "fmo50s75i")) %>% mutate( FMO = factor(ifelse(FMO == "fmo00s00i", lev[1], lev[2]), levels = lev), FS = FS / 1000, CBA = CBA / 1000)
Table 1. shows results from all treatments. Below, figure 1. shows a comparison of one selected treatment with the control.
In table 1., The % Sensitivity
and % ignition
show the treatment factors. These refer to the maximum percentage suppression
applied to the ALFRESCO fire sensitivity and ignition factor input maps. For example, 25% sensitivity means that regions of the
fire sensitivity map experienced no greater than 25% reduction in sensitivity for the model run.
The following mean, lower and upper percent change columns describe the mean and associated lower and upper bounds for the percent change from the status quo control run for a given fire management treatment level. These correspond to the last three columns of cumulative burn area means and minimum and maximum bounds across 32 ALFRESCO simulations. The period for comparison of treatments is 1950 - 2013.
library(kableExtra) knitr::kable(d2, "html", digits = 1, caption = "Table 1. 1950 - 2013 cumulative burn reduction by FMO treatment.", format.args = list(big.mark = ",")) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive"), font_size = 12) %>% group_rows("No sensitivity suppression", 1, 4) %>% group_rows("Max 25% sensitivity suppression", 5, 8) %>% group_rows("Max 50% sensitivity suppression", 9, 12) %>% group_rows("Max 75% sensitivity suppression", 13, 16) dex2 <- group_by(dex, FMO, Replicate) %>% summarise(CBA = max(CBA)) %>% summarise(CBA = mean(CBA)) ggplot(dex, aes(FS, CBA, colour = FMO)) + geom_point(alpha = 0.75) + geom_hline(data = dex2, aes(yintercept = CBA, colour = FMO)) + labs(title = "FMO treatment vs. control", subtitle = "50% sensitivity and 75% ignition suppression", x = expression("Fire size"~(thousand~km^2)~""), y = expression("Burn area"~(thousand~km^2)~"")) + theme_gray(base_size = 12) + theme(legend.position = "bottom") + scale_x_continuous(breaks = seq(0, 25, by = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.