knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(frame) library(dplyr) library(extraDistr) library(kableExtra) library(rmarkdown)
This script runs a deterministic prediction from the input tables stored with the package, The steps are to import the files, build a parameter file, run it, then load the database.
Enter the full path to each file in quotes
record <- 1 data(f_site) data(f_structure) data(f_flora) data(f_traits) input <- paramBuilder(f_site, f_structure, f_flora, f_traits, record)
Specify the name of the input file, name the sqLite database that it will write to, and whether you want each model run to overwrite the last (db.recreate = TRUE), or append to it. The model will first check that Java is up to date, then print "TRUE" if it could run the input file
ffm_run(input, db.path = "out.db", db.recreate = TRUE)
results<-ffm_db_load("out.db")
The database is a list of 7 dataframes, shown and described here: Gives summary flame dimensions (m, radians) for each stratum. 'repid' will always be 1 for single runs. A runIndex of 2 indicates an active crown fire, causing the model to re-run with the shelter of the canopy removed
results$FlameSummaries %>% kbl() %>% kable_material(c("striped", "hover"))
Gives x & y coordinates for the base (x0, y0) and top (x1, y1) of ignited segments in the named species, per second. The length of the segment 'length', and 'flameLength' is the length of the segment plus the flame extending beyond pathType is 'plant' if it occurs in a sinple plant, or 'stratum' if the fire is spread from plant to plant
results$IgnitionPaths %>% paged_table()
Gives ROS (m/s) in each stratum
results$ROS %>% kbl() %>% kable_material(c("striped", "hover"))
Lists the types of runIndex described above
results$Runs %>% kbl() %>% kable_material(c("striped", "hover"))
Gives the input site conditions in m/s, degrees C, radians, kg/sqm, m, and proportion
results$Sites%>% kbl() %>% kable_material(c("striped", "hover"))
Lists the component plant strata
results$Strata%>% kbl() %>% kable_material(c("striped", "hover"))
Gives wind speed at ground level (m/s), and summary flame dimensions (m, radians) for fire in surface litter
results$SurfaceResults %>% kbl() %>% kable_material(c("striped", "hover"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.