diff --git a/LandWeb_manual.epub b/LandWeb_manual.epub
index dcdfd947..9562f078 100644
Binary files a/LandWeb_manual.epub and b/LandWeb_manual.epub differ
diff --git a/LandWeb_manual.pdf b/LandWeb_manual.pdf
index c0814b87..c62e049b 100644
Binary files a/LandWeb_manual.pdf and b/LandWeb_manual.pdf differ
diff --git a/running-landweb.html b/running-landweb.html
index 90c3b9a1..193fac46 100644
--- a/running-landweb.html
+++ b/running-landweb.html
@@ -305,7 +305,7 @@
Customizing model run configuration
-
See SpaDES.config/R/config.landweb.R.
+See box/landweb.R
file, and 02a-user-config.R
.
(TODO)
diff --git a/search.json b/search.json
index d6d26a25..4577edd1 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"index.html","id":"overview","chapter":"Overview","heading":"Overview","text":"manual live document automatically updated changes made underlying model code documentation.","code":""},{"path":"index.html","id":"background","chapter":"Overview","heading":"0.1 Background","text":"","code":""},{"path":"index.html","id":"the-landweb-model","chapter":"Overview","heading":"0.2 The LandWeb Model","text":"LandWeb first large scale, data-driven approach simulating historic natural range variation (H/NRV) (https://landweb.ca).\ndeveloping model, analyses, well infrastructure host data, strove implement single, reproducible workflow facilitate running simulations, analyses, model reuse future expansion.\ntight linkage data simulation model made possible via implementation using SpaDES family packages (Chubaty & McIntire 2019) within R Statistical Language Environment (R Core Team 2023).\ninformation SpaDES, see https://spades.predictiveecology.org/.LandWeb model integrates two well-used models forest stand succession wildfire simulation, implemented SpaDES simulation platform collection submodels (implement SpaDES modules).\nVegetation dynamics modeled using LandR Biomass suite modules, reimplement LANDIS-II Biomass Succession model (Scheller et al. 2007; Scheller & Mladenoff 2004) R.\nWildfire dynamics modeled using implementation LandMine (Andison 1996; Andison 1998).\nSimulations run entire LandWeb study area, spans western Canadian boreal forest.\nsummary results presented using web app, can run locally.\nFigure 0.1: LandWeb study area (blue) mountain boreal caribou ranges highlighted (pink).\n","code":""},{"path":"index.html","id":"data-preparation","chapter":"Overview","heading":"0.2.1 Data preparation","text":"Input data derived multiple sources, including several publicly available well proprietary datasets.Detailed descriptions sources provided relevant sections manual.","code":""},{"path":"index.html","id":"public-data-sources","chapter":"Overview","heading":"0.2.1.1 Public data sources","text":"Land Cover Classification 2005 map (longer available Government Canada’s Open Data website);LANDIS-II species traits: https://github.com/dcyr/LANDIS-II_IA_generalUseFiles;LANDIS-II parameterization tables data: https://github.com/LANDIS-II-Foundation/Extensions-Succession-Archive/master/biomass-succession-archive/trunk/tests/v6.0-2.0/;Canada biomass, stand volume, species data (Beaudoin et al. 2014): http://tree.pfc.forestry.ca;National ecodistrict polygons: http://sis.agr.gc.ca/cansis/nsdb/ecostrat/district/ecodistrict_shp.zip;National ecoregion polygons: http://sis.agr.gc.ca/cansis/nsdb/ecostrat/region/ecoregion_shp.zip;National ecozone polygons: http://sis.agr.gc.ca/cansis/nsdb/ecostrat/zone/ecozone_shp.zip.","code":""},{"path":"index.html","id":"proprietary-data-sources","chapter":"Overview","heading":"0.2.1.2 Proprietary data sources","text":"proprietary data used model stored access-controlled Google Drive location.biomass species maps created Pickell & Coops (2016) resolution 100m x 100m LandSat kNN based CASFRI;various reporting polygons used summarize model results app.request access, please contact Alex Chubaty (achubaty@-cast.ca).","code":""},{"path":"index.html","id":"vegetation-dynamics","chapter":"Overview","heading":"0.2.2 Vegetation dynamics","text":"Vegetation growth succession modeled using re-implementation LANDIS-II Biomass model, widely used well-documented dynamic vegetation succession model (Scheller et al. 2007; Scheller & Mladenoff 2004).\nre-implemented model largely follows original LANDIS-II source code (v 3.6.2; Scheller & Miranda (2015a)), modifications respect species traits parameterization.\nmodel simulates landscape-scale forest dynamics spatio-temporally explicit manner, using cohorts tree species within pixel.\nMultiple ecological processes captured model, including vegetation growth, mortality, seed dispersal, post-disturbance regeneration.submodel described detail Vegetation submodel.","code":""},{"path":"index.html","id":"wildfire-dynamics","chapter":"Overview","heading":"0.2.3 Wildfire dynamics","text":"Wildfire simulated using re-implementation fire submodel Andison’s (1996; 1998) LandMine model landscape disturbance.submodel described detail Wildfire submodel.","code":""},{"path":"index.html","id":"summary-maps-and-statistics","chapter":"Overview","heading":"0.2.4 Summary maps and statistics","text":"Summaries derived simulation outputs, consist maps showing time since fire well histogram summaries 1) number large patches (.e., patches number hectares specified user) contained within selected spatial area; 2) vegetation cover within selected spatial area.\nHistograms provided spatial area polygon, age class, species.\nAuthorized users can additionally overlay current stand conditions onto histograms.\nSimulation outputs summarized several publicly available reporting polygons (including Alberta Natural Ecoregions Caribou Ranges).described detail Model outputs.","code":""},{"path":"index.html","id":"landweb-app","chapter":"Overview","heading":"0.2.5 LandWeb app","text":"Using web app described Web app.","code":""},{"path":"index.html","id":"previous-manual-versions","chapter":"Overview","heading":"0.3 Previous Manual Versions","text":"available, archived copies previous manual versions provided links .LandR Manual v3.0.0 (current)","code":""},{"path":"getting-started.html","id":"getting-started","chapter":"1 Getting started","heading":"1 Getting started","text":"","code":""},{"path":"getting-started.html","id":"prerequisites","chapter":"1 Getting started","heading":"1.1 Prerequisites","text":"Minimum system requirements:Windows 10, macOS 10.13 High Sierra, Ubuntu 20.04 LTS;20 GB storage space, plus additional storage model outputs;128 GB RAM run model full area (less sub-areas);High-speed internet connection.following section provides details installing prerequisite software running LandWeb.","code":""},{"path":"getting-started.html","id":"docker","chapter":"1 Getting started","heading":"1.1.1 Docker","text":"prefer use Docker, skip subsection.Due idiosyncratic difficulties installing multiple pieces software ensuring correct versions used throughout, provide prebuilt Docker images, better provides consistent reproducible software environment running model.Thus, using images preferred ‘bare-metal’ installation.Install Docker system following https://docs.docker.com/get-docker/.Next, pull image Docker Hub:container running, open web browser go localhost:8080.Login Rstudio session user rstudio password (change password launching container ).finished, can stop destroy container:","code":"## get the image\ndocker pull achubaty/landweb-standalone:latest\n\n## launch a new container based on this image\ndocker run -d -it \\\n -e GITHUB_PAT=$(cat ${HOME}/.Renviron | grep GITHUB_PAT | cut -d '=' -f 2) \\\n -e PASSWORD='' \\\n --memory=128g \\\n --cpus=32 \\\n -p 127.0.0.1:8080:8787 \\\n --name LandWeb \\\n achubaty/landweb-standalone:latestdocker stop LandWeb\ndocker rm LandWeb"},{"path":"getting-started.html","id":"bare-metal-installation","chapter":"1 Getting started","heading":"1.1.2 Bare metal installation","text":"","code":""},{"path":"getting-started.html","id":"development-tools","chapter":"1 Getting started","heading":"1.1.2.1 Development tools","text":"","code":""},{"path":"getting-started.html","id":"windows","chapter":"1 Getting started","heading":"1.1.2.1.1 Windows","text":"Download Rtools version 4.2 https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html install administrator.\nRtools provides necessary compilers etc. build install R packages source Windows.\ninstallation, sure check option add Rtools PATH.\nDownload Rtools version 4.2 https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html install administrator.\nRtools provides necessary compilers etc. build install R packages source Windows.installation, sure check option add Rtools PATH.Download install proper text editor, e.g. Notepad++ (https://notepad-plus-plus.org/downloads/).Download install proper text editor, e.g. Notepad++ (https://notepad-plus-plus.org/downloads/).","code":""},{"path":"getting-started.html","id":"macos","chapter":"1 Getting started","heading":"1.1.2.1.2 macOS","text":"","code":""},{},{},{"path":"getting-started.html","id":"ubuntu-linux","chapter":"1 Getting started","heading":"1.1.2.1.3 Ubuntu Linux","text":"","code":"sudo apt-get update\n\nsudo apt-get -y install \\\n build-essential \\\n biber \\\n ccache \\\n cmake \\\n curl \\\n libarchive-dev \\\n libcairo2-dev \\\n libcurl4-openssl-dev \\\n libgit2-dev \\\n libglpk-dev \\\n libgmp3-dev \\\n libicu-dev \\\n libjq-dev \\\n libmagick++-dev \\\n libnode-dev \\\n libpng-dev \\\n libprotobuf-dev \\\n libprotoc-dev \\\n libssh2-1-dev \\\n libssl-dev \\\n libxml2-dev \\\n libxt-dev \\\n make \\\n p7zip-full p7zip-rar \\\n pandoc pandoc-citeproc \\\n protobuf-compiler \\\n qpdf \\\n screen \\\n sysstat \\\n texinfo texlive-base texlive-bibtex-extra \\\n texlive-fonts-extra texlive-latex-extra texlive-xetex \\\n wget \\\n xauth \\\n xfonts-base \\\n xvfb \\\n zlib1g-dev"},{"path":"getting-started.html","id":"geospatial-libraries","chapter":"1 Getting started","heading":"1.1.2.2 Geospatial libraries","text":"order work geospatial data, recent versions GDAL, PROJ, GEOS geospatial libraries need available system.","code":""},{"path":"getting-started.html","id":"windows-1","chapter":"1 Getting started","heading":"1.1.2.2.1 Windows","text":"additional needed, recent versions R geospatial packages include pre-bundled versions GDAL, PROJ, GEOS.","code":""},{"path":"getting-started.html","id":"macos-1","chapter":"1 Getting started","heading":"1.1.2.2.2 macOS","text":"Use homebrew install required geospatial software libraries:","code":"brew install pkg-config\nbrew install gdal\n# brew install geos\n# brew install proj\nbrew install udunits"},{"path":"getting-started.html","id":"ubuntu-linux-1","chapter":"1 Getting started","heading":"1.1.2.2.3 Ubuntu Linux","text":"default Ubuntu 20.04 LTS package repositories ship older versions geospatial libraries using, need add additional repositories get latest versions.Install additional system dependencies serve prerequisites running LandWeb model R.Optionally, install mapshaper geospatial library used speed polygon simplification.","code":"## add GIS repository\nsudo add-apt-repository ppa:ubuntugis-unstable/ppa\nsudo apt-get updatesudo apt-get -y install \\\n gdal-bin \\\n libgdal-dev \\\n libgeos-dev \\\n libproj-dev \\\n libudunits2-dev \\\n python3-gdal## mapshaper installation\nsudo apt-get remove -y libnode-dev\n\ncurl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -\n\nsudo apt install nodejs\nsudo npm install npm@latest -g\nsudo npm install -g mapshaper"},{"path":"getting-started.html","id":"version-control","chapter":"1 Getting started","heading":"1.1.2.3 Version control","text":"git version control software used throughout project, required ‘checkout’ specific versions code well make changes ‘push’ changes model code repository.Install latest version git https://git-scm.com/downloads via package manager.Windows users install administrator.\nUse nano (instead vi/vim) default text editor.\nchoices, use recommended settings.macOS users, git included Xcode command line tools.Create GitHub (https://github.com) account don’t already one, configure Personal Access Token (PAT).GitHub (https://github.com) account required assist package installation accessing model code.Several packages used LandWeb available GitHub.\ninstalling several , want ensure can without GitHub rate-limiting requests.\nWithout PAT, packages may temporarily fail install, can retried little later (usually 1 hour).Create GitHub Personal Acess Token (PAT):Create GitHub Personal Acess Token (PAT):either ‘manually’ following instructions2, making sure check repo, workflow, user:email scopes;either ‘manually’ following instructions2, making sure check repo, workflow, user:email scopes;directly R session:Securely store token using credential store, R session:\n> gitcreds::gitcreds_set()\n\n? Enter password token: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-> Adding new credentials...\n-> Removing credentials cache...\n-> Done.Securely store token using credential store, R session:Storing GitHub credentials .Renviron longer recommended.See https://usethis.r-lib.org/articles/git-credentials.html.Optional. Install latest version GitKraken https://www.gitkraken.com/download/.free version sufficient access public repositories used project.\nHowever, paid pro version required access private repositories.","code":"```r\n# install.packages(\"usethis\")\nusethis::create_github_token()\n```> gitcreds::gitcreds_set()\n\n? Enter password or token: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-> Adding new credentials...\n-> Removing credentials from cache...\n-> Done."},{"path":"getting-started.html","id":"r-and-rstudio","chapter":"1 Getting started","heading":"1.1.2.4 R and Rstudio","text":"Download install R version 4.2.3.WindowsDownload R https://cran.r-project.org/bin/windows/base/R-4.2.3-win.exe;Install R administrator.macOSInstall rig (https://github.com/r-lib/rig) manage multiple R installations.Ubuntu LinuxUse rig (https://github.com/r-lib/rig) easily manage multiple R installations, easily switch among .Add apt repository install rig:Install R version 4.2.3Download install latest version Rstudio https://www.rstudio.com/products/rstudio/download/.Windows users install Rstudio administrator.(optional) Linux, configure ccache speed R package re-installation updates3.\n## configure ccache R package installation\nmkdir -p ~/.ccache\nmkdir -p ~/.R\n{ echo 'VER='; \\\n echo 'CCACHE=ccache'; \\\n echo 'CC=$(CCACHE) gcc$(VER)'; \\\n echo 'CXX=$(CCACHE) g++$(VER)'; \\\n echo 'CXX11=$(CCACHE) g++$(VER)'; \\\n echo 'CXX14=$(CCACHE) g++$(VER)'; \\\n echo 'FC=$(CCACHE) gfortran$(VER)'; \\\n echo 'F77=$(CCACHE) gfortran$(VER)'; } >> ~/.R/Makevars\n{ echo 'max_size = 5.0G'; \\\n echo 'sloppiness = include_file_ctime'; \\\n echo 'hash_dir = false'; } >> ~/.ccache/ccache.conf(optional) Linux, configure ccache speed R package re-installation updates3.","code":"brew tap r-lib/rig\nbrew install --cask rig\n\nrig install 4.2.3\n\n## start Rstudio using a specific R version:\nrig rstudio ~/GitHub/LandWeb.Rproj 4.2.3## add apt repository\nsudo curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg\nsudo sh -c \"echo 'deb [arch=amd64] http://rig.r-pkg.org/deb rig main' > /etc/apt/sources.list.d/rig.list\"\n\n## install (NB: rig is different package; use r-rig!)\nsudo apt update\nsudo apt install r-rigrig add 4.2.3\n\nrig system make-links\n\nsudo ln -s /opt/R/4.2.3/bin/Rscript /usr/local/bin/Rscript-4.2.3\n\nrig list## configure ccache for R package installation\nmkdir -p ~/.ccache\nmkdir -p ~/.R\n{ echo 'VER='; \\\n echo 'CCACHE=ccache'; \\\n echo 'CC=$(CCACHE) gcc$(VER)'; \\\n echo 'CXX=$(CCACHE) g++$(VER)'; \\\n echo 'CXX11=$(CCACHE) g++$(VER)'; \\\n echo 'CXX14=$(CCACHE) g++$(VER)'; \\\n echo 'FC=$(CCACHE) gfortran$(VER)'; \\\n echo 'F77=$(CCACHE) gfortran$(VER)'; } >> ~/.R/Makevars\n{ echo 'max_size = 5.0G'; \\\n echo 'sloppiness = include_file_ctime'; \\\n echo 'hash_dir = false'; } >> ~/.ccache/ccache.conf"},{"path":"getting-started.html","id":"getting-the-code","chapter":"1 Getting started","heading":"1.2 Getting the code","text":"modules written R model code developed collaboratively using GitHub (https://github.com), module contained repository.\nCode shared among modules bundled R packages, hosted GitHub repositories.\npackage code automatically regularly tested using cross-platform continuous integration frameworks ensure code reliable free errors.Windows users ensure GitHub/ directory accessible ~/GitHub ~/Documents/GitHub creating directory junction:","code":"mkdir -p ~/GitHub\ncd ~/GitHub\n\n## get development branch (app and deploy are private submodules)\ngit clone --recurse-submodules \\\n -j8 https://github.com/PredictiveEcology/LandWebmklink /J C:\\\\Users\\\\username\\\\Documents\\\\GitHub C:\\\\Users\\\\username\\\\GitHub"},{"path":"getting-started.html","id":"project-directory-structure","chapter":"1 Getting started","heading":"1.3 Project directory structure","text":"Model code organized following directories summarized table .NOTE: may useful store data different location, map location back e.g., cache/, inputs/, /outputs/ directories using symbolic links.\nSee R’s ?file.link set machine.\nTable 1.1: LandWeb project directory structure\n","code":""},{"path":"getting-started.html","id":"updating-the-code","chapter":"1 Getting started","heading":"1.4 Updating the code","text":"cloned LandWeb code repository, users can keep --date using preferred graphical git tools (e.g., GitKraken) command line.","code":""},{"path":"getting-started.html","id":"using-gitkraken","chapter":"1 Getting started","heading":"1.4.1 Using GitKraken","text":"\nFigure 1.1: Screenshot showing showing code commits Git Kraken. submodules pane highlighted bottom left.\nOpen LandWeb repo, moments see commit history update reflect latest changes server.Open LandWeb repo, moments see commit history update reflect latest changes server.‘Pull’ latest changes repo, noting status git submodules (left hand side) may change.‘Pull’ latest changes repo, noting status git submodules (left hand side) may change.submodules changed status, one, right-click select ‘Update ’.submodules changed status, one, right-click select ‘Update ’.","code":""},{"path":"getting-started.html","id":"using-the-command-line","chapter":"1 Getting started","heading":"1.4.2 Using the command line","text":"WARNING: experienced git users !","code":"git pull\ngit submodule update"},{"path":"getting-started.html","id":"data-requirements","chapter":"1 Getting started","heading":"1.5 Data requirements","text":"order access use proprietary data LandWeb simulations, need granted access shared Google Drive directory.\nfirst-run model, required data downloaded inputs/ directory.request access, please contact Alex Chubaty (achubaty@-cast.ca).","code":""},{"path":"getting-started.html","id":"getting-help","chapter":"1 Getting started","heading":"1.6 Getting help","text":"https://github.com/PredictiveEcology/LandWeb/issues","code":""},{"path":"running-landweb.html","id":"running-landweb","chapter":"2 Running LandWeb","heading":"2 Running LandWeb","text":"Launch Rstudio open LandWeb Rstudio project (LandWeb.Rproj);sure use R 4.2.3 running model!using rig manage multiple R versions, use following launch Rstudio correct version R:Open file 00-global.R run line sequence, responding prompts required.can run model, first need install packages required project restoring project’s snapshot file.","code":"cd ~/GitHub/LandWeb\nrig rstudio renv.lock\noptions(\n renv.config.mran.enabled = FALSE,\n renv.config.pak.enabled = FALSE\n)\nrenv::restore()"},{"path":"running-landweb.html","id":"model-setup-and-configuration","chapter":"2 Running LandWeb","heading":"2.1 Model setup and configuration","text":"default settings study area, model version, scenario defined 01a-globalvars.R.\ndefaults defined ‘dot-variables’ (e.g., .studyAreaName) can set externally main script\n(e.g., .studyAreaName defined running 01a-globalvars.R, user-set value used, rather default defined script).Advanced setup model run customization described Advanced setup.","code":""},{"path":"running-landweb.html","id":"select-a-study-area","chapter":"2 Running LandWeb","heading":"2.1.1 Select a study area","text":"model can run entire study area, certain individual provinces (currently AB, SK, MB, NWT), groups predefined FMAs (see Fig. 1 Table 1).","code":""},{"path":"running-landweb.html","id":"fma-boundaries","chapter":"2 Running LandWeb","heading":"2.1.1.1 FMA boundaries","text":"Currently, subset FMAs within LandWeb study area predefined run (.e., without needing run model entire study area; see Table 2).","code":""},{"path":"running-landweb.html","id":"choosing-a-study-area","chapter":"2 Running LandWeb","heading":"2.1.1.2 Choosing a study area","text":"model can run several pre-defined study areas summarized table .\nselect one predefined study areas, set .studyAreaName use one following, corresponding polygon IDs map .run LandWeb entire province use one provAB, provMB, provNWT, provSK.run entire LandWeb study area, use LandWeb.","code":""},{"path":"running-landweb.html","id":"select-a-scenario","chapter":"2 Running LandWeb","heading":"2.1.2 Select a scenario","text":"version 2.0.0 LandWeb model, seed dispersal distances needed adjusted ensure sufficient regeneration following fire.\nadjustments cause model behave like state-transition model, rather process-based one.Version 3.0.0 relaxes parameter forcings behave like standard LANDIS-II model.dispersal scenario principally set via .version can overridden set via .dispersalType:Additionally, v2.0.0 model uses adjusted fire return intervals (FRI) log-adjusted rates spread (ROS).\nVersion 3.0.0 uses LandMine defaults.fire scenario principally set via .version can overridden specifying .ROStype:define scenario run, select one dispersal scenario one fire scenario tables .\nLandWeb v2.0.0 runs 2019 run using .dispersalType = \"high\" .ROStype = \"log\".\nUsing v3.0.0 model, .dispersalType = \"default\" .ROStype = \"default\".","code":""},{"path":"running-landweb.html","id":"replication","chapter":"2 Running LandWeb","heading":"2.1.3 Replication","text":"run multiple replicates given run, set .rep integer corresponding replicate id.\nreplicate runs use different random seed, seed saved output reuse event replicate needs rerun.\nrerun replicate using different seed, sure delete run’s seed.rds file.\nseed used also saved human-readable seed.txt file.","code":""},{"path":"running-landweb.html","id":"running-the-model","chapter":"2 Running LandWeb","heading":"2.2 Running the model","text":"NOTE: first time model run, automatically download additional data install additional R packages, can take time complete.","code":""},{"path":"running-landweb.html","id":"interactive-r-session","chapter":"2 Running LandWeb","heading":"2.2.1 Interactive R session","text":"working R session, sure set working directory LandWeb project directory.\nfirst time running model, open file 00-global.R, step line ensure prompts etc. answered correctly.authenticating Google Drive, sure check box allow access files.","code":"\n.mode <- \"development\"\n.studyAreaName <- \"random\"\n.rep <- 1L\n.version <- 2\n\nsource(\"00-global.R\")"},{"path":"running-landweb.html","id":"commandline-interface","chapter":"2 Running LandWeb","heading":"2.2.2 Commandline interface","text":"addition running model interactive R session, provide command line interface run replicates model study areas defined (.e., batch mode).example, run replicate number 7 model \\(250 m\\) resolution using FRI multiple \\(1\\) Alberta FMU L11, use:FMU command line runs use modified dispersal fire scenarios, thus require study area, replicate, FRI multiple defined.run replicate number 7 model entire province Alberta, use:FMA command line runs use highDispersal_logROS scenarios \\(250 m\\) resolution, thus require study area replicate defined.run entire LandWeb study area, replicate number needs passed.\nexample:LandWeb command line run set dispersal fire scenarios , pixel resolution (.pixelSize) \\(250 m\\), thus require study area replicate defined.","code":"cd ~/GitHub/LandWeb\n\n## ./run_fmu.sh \n./run_fmu.sh L11 1 250 7cd ~/GitHub/LandWeb\n\n## ./run_fma.sh \n./run_fma.sh provAB 7\n# ./run_fma_win.sh provAB 7 ## if on Windows!## ./run_landweb.sh \n./run_landweb.sh 7"},{"path":"running-landweb.html","id":"post-processing-analyses","chapter":"2 Running LandWeb","heading":"2.3 Post-processing analyses","text":"run several reps model given study area, results combined subsequent post-processing analyses generate following outputs set reporting polygons within study area:boxplots leading vegetation cover;histograms leading vegetation cover;histograms large patches.run processing, use .mode = \"postprocess\" sure set number replicates run config.","code":""},{"path":"running-landweb.html","id":"advanced-setup","chapter":"2 Running LandWeb","heading":"2.4 Advanced setup","text":"","code":""},{"path":"running-landweb.html","id":"customizing-model-run-configuration","chapter":"2 Running LandWeb","heading":"2.4.1 Customizing model run configuration","text":"See SpaDES.config/R/config.landweb.R.(TODO)","code":""},{"path":"running-landweb.html","id":"cache-backend","chapter":"2 Running LandWeb","heading":"2.4.2 Cache backend","text":"Simulation caching provided reproducible SpaDES.core packages, enabled default.default cache uses SQLite database backend stores cache files cache/.\nHowever, database backends can also used, advanced users running multiple parallel simulations may wish set use PostgreSQL database cache.See https://github.com/PredictiveEcology/SpaDES/wiki/Using-alternate-database-backends--Cache ensure following options added user-specific config 02a-user-config.R:","code":"reproducible.cacheSaveFormat = \"qs\",\nreproducible.conn = SpaDES.config::dbConnCache(\"postgresql\"),"},{"path":"running-landweb.html","id":"speeding-up-disk-based-operations","chapter":"2 Running LandWeb","heading":"2.4.3 Speeding up disk-based operations","text":"Caching disk-based file operations benefit using solid state drive (SSD) instead conventional spinning hard drive.\nAdvanced users can move cache/ directory SSD mountpoint create symlink location project directory.\nLikewise, users can configure scratch path temporary raster file operations point SSD location.","code":""},{"path":"running-landweb.html","id":"additional-resources","chapter":"2 Running LandWeb","heading":"2.5 Additional Resources","text":"Resources (re)learning R spatial data:https://rspatial.org","code":""},{"path":"study-areas.html","id":"study-areas","chapter":"Study areas","heading":"Study areas","text":"Lorem ipsum … (TODO)","code":""},{"path":"landweb_preamble-module.html","id":"landweb_preamble-module","chapter":"3 LandWeb_preamble Module","heading":"3 LandWeb_preamble Module","text":"(ref:LandWeb_preamble) LandWeb_preamble","code":""},{"path":"landweb_preamble-module.html","id":"authors","chapter":"3 LandWeb_preamble Module","heading":"3.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [aut], Ceres Barros cbarros@mail.ubc.ca [aut]\n","code":""},{"path":"landweb_preamble-module.html","id":"module-overview","chapter":"3 LandWeb_preamble Module","heading":"3.1 Module Overview","text":"","code":""},{"path":"landweb_preamble-module.html","id":"module-summary","chapter":"3 LandWeb_preamble Module","heading":"3.1.1 Module summary","text":"Set study areas parameters LandWeb simulations.","code":""},{"path":"landweb_preamble-module.html","id":"parameters","chapter":"3 LandWeb_preamble Module","heading":"3.2 Parameters","text":"Provide summary user-visible parameters.","code":""},{"path":"landweb_preamble-module.html","id":"data-dependencies","chapter":"3 LandWeb_preamble Module","heading":"3.3 Data dependencies","text":"","code":""},{"path":"landweb_preamble-module.html","id":"input-data","chapter":"3 LandWeb_preamble Module","heading":"3.3.1 Input data","text":"Description module inputs.","code":""},{"path":"landweb_preamble-module.html","id":"output-data","chapter":"3 LandWeb_preamble Module","heading":"3.3.2 Output data","text":"Description module outputs.","code":""},{"path":"landweb_preamble-module.html","id":"links-to-other-modules","chapter":"3 LandWeb_preamble Module","heading":"3.4 Links to other modules","text":"Originally developed use LandR Biomass suite modules, LandMine fire model.\n## References\n","code":""},{"path":"vegetation-submodel.html","id":"vegetation-submodel","chapter":"Vegetation submodel","heading":"Vegetation submodel","text":"LandR ecosystem SpaDES modules variety data /calibration modules used obtain pre-process input data, well estimate input parameters required core forest landscape simulation module Biomass_core.\nmodules presented subsequent chapters.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"landr-biomass_speciesdata-module","chapter":"4 LandR Biomass_speciesData Module","heading":"4 LandR Biomass_speciesData Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/Biomass_speciesData/issues.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"authors-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [aut], Ceres Barros cbarros@mail.ubc.ca [aut]\n","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-overview-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1 Module Overview","text":"","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-summary-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.1 Module summary","text":"module downloads pre-process species % cover data layers \npassed LandR data modules (e.g., Biomass_borealDataPrep) \nLandR forest simulation module Biomass_core.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-inputs-and-parameters-at-a-glance","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.2 Module inputs and parameters at a glance","text":"full list input objects (Table\n4.1) parameters (Table\n4.2) Biomass_speciesData expects.\n, input must provided (.e., Biomass_speciesData\ndefault ) studyAreaLarge.Raw data layers downloaded module saved dataPath(sim), can\ncontrolled via options(reproducible.destinationPath = ...).Table 4.1: List Biomass_speciesData input objects description.Table 4.2: List Biomass_speciesData parameters description.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"events","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.3 Events","text":"Biomass_speciesData runs two events:Module “initiation” (init event), species %\ncover layers downloaded processed.Plotting processed species cover layers (initPlot event).","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-outputs","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.4 Module outputs","text":"module produces following outputs (Table\n4.3):Table 4.3: List Biomass_speciesData output objects description.automatically saves processed species cover layers output path\ndefined getPaths(sim)$outputPath.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"links-to-other-modules-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.5 Links to other modules","text":"Intended used LandR data modules (e.g.,\nBiomass_borealDataPrep) require species cover data LandR forest\nsimulation Biomass_core module. can see potential module linkages\nwithin LandR ecosystem\n. Select\nBiomass_speciesData drop-menu see linkages.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"getting-help-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.6 Getting help","text":"https://github.com/PredictiveEcology/Biomass_speciesData/issues","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-manual","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2 Module manual","text":"","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"detailed-description","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.1 Detailed description","text":"module accesses processes species percent cover (% cover)\ndata parametrisation initialization LandR Biomass_core. \nmodule ensures 1) data use geospatial geometries 2) \ncorrectly re-projected studyAreaLarge, 3) attempts sequentially\nfill-replace lowest quality data higher quality data \nseveral data sources used. ’s primary output RasterStack species\n% cover, layer corresponding species.Currently, module can access Canadian Forest Inventory forest attributes\nkNN dataset [default; Beaudoin et al. (2017)], Common Attribute Schema \nForest Resource Inventories [CASFRI; Cosco (2011)] dataset, Ontario Forest\nResource Inventory (ONFRI), dataset specific Alberta compiled Paul\nPickell, Alberta forest inventory datasets. However, NFI\nkNN data freely available – access datasets must granted\nmodule developers data owners, Google account required.\nNevertheless, module flexible enough user can use process\nadditional datasets, provided adequate R function passed \nmodule (see types parameter details Parameters)multiple data sources used, module use replace lower quality\ndata higher quality data following order specified parameter\ntypes (see Parameters).multiple species given data source grouped, %\ncover summed across species group within pixel. Please see\nsppEquiv input Input objects information species groups\ndefined.module can also exclude species % cover layers don’t\nminimum % cover value least one pixel. means \nuser still inspect many pixels species deemed present,\npossible data pixels high %\ncover given species. case, user may choose exclude \nspecies posteriori. summary plot automatically shown \nBiomass_speciesData can help diagnose whether certain species present \npixels (see Fig. 4.1).","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"initialization-inputs-and-parameters","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.2 Initialization, inputs and parameters","text":"Biomass_speciesData initializes prepares inputs provided \ninternet access download raw data layers (layers\npreviously downloaded stored folder specified \noptions(\"reproducible.destinationPath\")).module defaults processing cover data fo species listed \nBoreal column default sppEquiv input data.table object, \navailable % cover layers kNN dataset (Table\n4.4; see ?LandR::sppEquivalencies_CA \ninformation):Table 4.4: List species cover data downloaded default Biomass_speciesData.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"input-objects","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.2.1 Input objects","text":"Biomass_speciesData requires following input data layersTable 4.5: List Biomass_speciesData input objects description.inputs Table 4.5, \nfollowing particularly important deserve special attention:studyAreaLarge – polygon defining area species cover\ndata area desired. can larger (never smaller) study area\nused simulation forest dynamics (.e., studyArea object \nBiomass_core).studyAreaLarge – polygon defining area species cover\ndata area desired. can larger (never smaller) study area\nused simulation forest dynamics (.e., studyArea object \nBiomass_core).sppEquiv – table correspondences different species naming\nconventions. table used across several LandR modules, including\nBiomass_core. particularly important determine\nwhether species (cover layers) merged, \ndesired user. instance, user wishes simulate generic\nPicea spp. includes, Picea glauca, Picea mariana Picea\nengelmannii, need provide three species names \ndata column (e.g., KNN obtaining forest attribute kNN data layers \nCanadian Forest Inventory), name (e.g., “Pice_Spp”) \ncoumn chosen naming convention used throughout simulation (\nsppEquivCol parameter); see Table\n4.6 example).sppEquiv – table correspondences different species naming\nconventions. table used across several LandR modules, including\nBiomass_core. particularly important determine\nwhether species (cover layers) merged, \ndesired user. instance, user wishes simulate generic\nPicea spp. includes, Picea glauca, Picea mariana Picea\nengelmannii, need provide three species names \ndata column (e.g., KNN obtaining forest attribute kNN data layers \nCanadian Forest Inventory), name (e.g., “Pice_Spp”) \ncoumn chosen naming convention used throughout simulation (\nsppEquivCol parameter); see Table\n4.6 example).Table 4.6: Example species merging simulation. user wants model Abies balsamea, . lasiocarpa Pinus contorta separate species, Picea spp. genus-level group. , six species identified 'KNN' column, % cover layers can obtained, 'Boreal' column (defines naming convention used simulation example) Picea spp. name. Biomass_speciesData merge % cover data single layer summing cover per pixel.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"parameters-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.2.2 Parameters","text":"Table 4.7 lists parameters used \nBiomass_speciesData detailed information.Table 4.7: List Biomass_speciesData parameters description.parameters listed Table 4.7,\nfollowing particularly important:coverThresh – integer. Defines minimum % cover value (\n0-100) species must least one pixel considered\npresent study area, otherwise excluded final stack \nspecies layers. Note affect species data \neventual simulation user need adjust simulation parameters\n(e.g., species trait tables need match species cover\nlayers) accordingly.coverThresh – integer. Defines minimum % cover value (\n0-100) species must least one pixel considered\npresent study area, otherwise excluded final stack \nspecies layers. Note affect species data \neventual simulation user need adjust simulation parameters\n(e.g., species trait tables need match species cover\nlayers) accordingly.types – character. % cover data sources used\n(see Detailed description). Several data sources can passed, \ncase module overlay lower quality layers higher quality\nones following order data sources specified types – .e.,\ntypes == c(\"KNN\", \"CASFRI\", \"ForestInventory\"), KNN assumed \nlowest quality data set ForestInventory highest: values \nKNN layers replaced overlapping values CASFRI layers \nvalues KNN CASFRI layers replaced overlapping values\nForestInventory layers.types – character. % cover data sources used\n(see Detailed description). Several data sources can passed, \ncase module overlay lower quality layers higher quality\nones following order data sources specified types – .e.,\ntypes == c(\"KNN\", \"CASFRI\", \"ForestInventory\"), KNN assumed \nlowest quality data set ForestInventory highest: values \nKNN layers replaced overlapping values CASFRI layers \nvalues KNN CASFRI layers replaced overlapping values\nForestInventory layers.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"simulation-flow","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.3 Simulation flow","text":"general flow Biomass_speciesData processes :Download (necessary) spatial processing species cover layers\nfirst data source listed types parameter. Spatial\nprocessing consists sub-setting data area defined \nstudyAreaLarge ensuring spatial projection resolution\nmatch rasterToMatchLarge. spatial processing, species\nlayers pixels values >= coverThresh parameter\nexcluded.Download (necessary) spatial processing species cover layers\nfirst data source listed types parameter. Spatial\nprocessing consists sub-setting data area defined \nstudyAreaLarge ensuring spatial projection resolution\nmatch rasterToMatchLarge. spatial processing, species\nlayers pixels values >= coverThresh parameter\nexcluded.one data source listed types, second set species\ncover layers downloaded processed .one data source listed types, second set species\ncover layers downloaded processed .second set layers assumed highest quality dataset \nused replaced overlapping pixel values first (including \nspecies whose layers may initially excluded applying \ncoverThresh filter).second set layers assumed highest quality dataset \nused replaced overlapping pixel values first (including \nspecies whose layers may initially excluded applying \ncoverThresh filter).Steps 2 3 repeated remaining data sources listed types.Steps 2 3 repeated remaining data sources listed types.Final layers saved disk plotted. summary number pixels\nforest cover calculated (treedand numTreed output objects; see\nModule outputs).Final layers saved disk plotted. summary number pixels\nforest cover calculated (treedand numTreed output objects; see\nModule outputs).","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"usage-example","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3 Usage example","text":"","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"load-spades-and-other-packages.","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.1 Load SpaDES and other packages.","text":"","code":"\nif (!require(Require)) {\n install.packages(\"Require\")\n library(Require)\n}\n\nRequire(c(\"PredictiveEcology/SpaDES.install\", \"SpaDES\", \"PredictiveEcology/SpaDES.core@development\",\n \"PredictiveEcology/LandR\"), install_githubArgs = list(dependencies = TRUE))"},{"path":"landr-biomass_speciesdata-module.html","id":"get-module-necessary-packages-and-set-up-folder-directories","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.2 Get module, necessary packages and set up folder directories","text":"","code":"\ntempDir <- tempdir()\npaths <- list(inputPath = normPath(file.path(tempDir, \"inputs\")),\n cachePath = normPath(file.path(tempDir, \"cache\")), modulePath = normPath(file.path(tempDir,\n \"modules\")), outputPath = normPath(file.path(tempDir,\n \"outputs\")))\n\ngetModule(\"PredictiveEcology/Biomass_speciesData\", modulePath = paths$modulePath,\n overwrite = TRUE)\n\n## make sure all necessary packages are installed:\nmakeSureAllPackagesInstalled(paths$modulePath)"},{"path":"landr-biomass_speciesdata-module.html","id":"setup-simulation","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.3 Setup simulation","text":"demonstration using default parameter values, except\ncoverThresh , lowered 5%. species layers (\nmajor output interest) saved automatically, need tell\nspades save using outputs argument (see\n?SpaDES.core::outputs).pass global parameter .plotInitialTime = 1 simInitAndSpades\nfunction activate plotting.","code":"\n# User may want to set some options -- see\n# ?reproducibleOptions -- e.g., often the path to the\n# 'inputs' folder will be set outside of project by user:\n# options(reproducible.inputPaths =\n# 'E:/Data/LandR_related/') # to re-use datasets across\n# projects\nstudyAreaLarge <- Cache(randomStudyArea, size = 1e+07, cacheRepo = paths$cachePath) # cache this so it creates a random one only once on a machine\n\n# Pick the species you want to work with -- here we use the\n# naming convention in 'Boreal' column of\n# LandR::sppEquivalencies_CA (default)\nspeciesNameConvention <- \"Boreal\"\nspeciesToUse <- c(\"Pice_Gla\", \"Popu_Tre\", \"Pinu_Con\")\n\nsppEquiv <- LandR::sppEquivalencies_CA[get(speciesNameConvention) %in%\n speciesToUse]\n# Assign a colour convention for graphics for each species\nsppColorVect <- LandR::sppColors(sppEquiv, speciesNameConvention,\n newVals = \"Mixed\", palette = \"Set1\")\n\n## Usage example\nmodules <- list(\"Biomass_speciesData\")\nobjects <- list(studyAreaLarge = studyAreaLarge, sppEquiv = sppEquiv,\n sppColorVect = sppColorVect)\nparams <- list(Biomass_speciesData = list(coverThresh = 5L))"},{"path":"landr-biomass_speciesdata-module.html","id":"run-module","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.4 Run module","text":"Note data module (.e., attempts prepare data \nsimulation) iterating start end times \nset 1 .outputs Biomass_speciesData (dominant species) \nrandomly generated study area within Canada.\nFigure 4.1: Biomass_speciesData automatically generates plot species dominance number presences study area .plotInitialTime=1 passed argument.\n","code":"\nopts <- options(reproducible.useCache = TRUE, reproducible.inputPaths = paths$inputPath)\n\nmySimOut <- simInitAndSpades(times = list(start = 1, end = 1),\n modules = modules, parameters = params, objects = objects,\n paths = paths, .plotInitialTime = 1)\noptions(opts)"},{"path":"landr-biomass_speciesdata-module.html","id":"references","chapter":"4 LandR Biomass_speciesData Module","heading":"4.4 References","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"landr-biomass_borealdataprep-module","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5 LandR Biomass_borealDataPrep Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/Biomass_borealDataPrep/issues.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"authors-2","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.0.0.1 Authors:","text":"Yong Luo Yong.Luo@gov.bc.ca [aut], Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Ceres Barros ceres.barros@ubc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [aut]\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"module-overview-2","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1 Module Overview","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"quick-links","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1.1 Quick links","text":"General functioningGeneral functioningList input objectsList input objectsList parametersList parametersList outputsList outputsSimulation flow module eventsSimulation flow module events","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"summary","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1.2 Summary","text":"LandR Biomass_borealDataPrep (hereafter Biomass_borealDataPrep), prepares\nnecessary inputs Biomass_core based data available forests\nacross Canada forests, focused Western Canada boreal forest systems.\nNevertheless, provides good foundation develop modules aimed \ndifferent geographical contexts. keeping data preparation parameter\nestimation outside Biomass_core, promote modularity \nLandR-based model systems facilitate interoperability parameter\nestimation procedures.Specifically, prepares adjusts invariant spatially-varying species\ntrait values, well ecolocation-specific parameters, probabilities \ngermination initial conditions necessary run Biomass_core. ,\nBiomass_borealDataPrep requires internet access retrieve default\ndata4.advise future users run Biomass_borealDataPrep defaults inspect\nresulting input objects like supplying alternative data (data\nURLs).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-links-modules","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1.3 Links to other modules","text":"Biomass_borealDataPrep intended used \nBiomass_core, can \nlinked data modules prepare inputs. See\n\navailable modules LandR ecosystem select Biomass_borealDataPrep\ndrop-menu see potential linkages.Biomass_core: core\nforest dynamics simulation module. Used downstream \nBiomass_borealDataPrep;Biomass_core: core\nforest dynamics simulation module. Used downstream \nBiomass_borealDataPrep;Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory. Used\nupstream Biomass_borealDataPrep;Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory. Used\nupstream Biomass_borealDataPrep;Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada. Used downstream\nBiomass_borealDataPrep.Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada. Used downstream\nBiomass_borealDataPrep.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"module-manual-1","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2 Module manual","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-general-functioning","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.1 General functioning","text":"Biomass_borealDataPrep prepares inputs necessary run realistic\nsimulation forest dynamics Western Canadian boreal forests using\nBiomass_core. Part process involves cleaning input data \nimputing missing data cases, discussed detail Data\nacquisition treatment.cleaning formatting raw input data, module:calculates species biomass per pixel multiplying observed species\n% cover observed stand biomass adjustment factor,\ncan statistically calibrated study area. Given \nadjusts species biomass, calibration step contributes \ncalibration maxB maxANPP trait values, whose estimation also\nbased species biomass (see Initial species age biomass per\npixel Adjustment species\nbiomass);calculates species biomass per pixel multiplying observed species\n% cover observed stand biomass adjustment factor,\ncan statistically calibrated study area. Given \nadjusts species biomass, calibration step contributes \ncalibration maxB maxANPP trait values, whose estimation also\nbased species biomass (see Initial species age biomass per\npixel Adjustment species\nbiomass);prepares invariant species traits – spatio-temporally\nconstant species traits influence population dynamics (e.g., growth,\nmortality, dispersal) responses fire (see Invariant species\ntraits);prepares invariant species traits – spatio-temporally\nconstant species traits influence population dynamics (e.g., growth,\nmortality, dispersal) responses fire (see Invariant species\ntraits);defines ecolocations – groupings pixels similar biophysical\nconditions. default, ecolocations defined spatial combination\necodistricts National Ecological Framework Canada, \nLand Cover Canada 2010 map (see Defining simulation pixels \necolocations). Note ecolocation\ntermed ecoregionGroup across LandR modules.defines ecolocations – groupings pixels similar biophysical\nconditions. default, ecolocations defined spatial combination\necodistricts National Ecological Framework Canada, \nLand Cover Canada 2010 map (see Defining simulation pixels \necolocations). Note ecolocation\ntermed ecoregionGroup across LandR modules.prepares ecolocation-specific parameters probabilities \ngermination – one ecolocation-specific parameter used, \nminimum relative biomass thresholds, defines \nlevel shade pixel. Together level shade \nprobabilities germination influence germination\nsuccess given pixel;prepares ecolocation-specific parameters probabilities \ngermination – one ecolocation-specific parameter used, \nminimum relative biomass thresholds, defines \nlevel shade pixel. Together level shade \nprobabilities germination influence germination\nsuccess given pixel;estimates spatio-temporally varying species traits – species traits\ncan vary ecolocation time. maximum biomass\n(maxB), maximum -ground net primary productivity (maxANPP; see\nMaximum biomass maximum aboveground net primary\nproductivity) species establishment probability\n(SEP, called establishprob module traits table; see Species\nestablishment probability). default,\nBiomass_borealDataPrep estimates temporally constant values maxB,\nmaxANPP SEP;estimates spatio-temporally varying species traits – species traits\ncan vary ecolocation time. maximum biomass\n(maxB), maximum -ground net primary productivity (maxANPP; see\nMaximum biomass maximum aboveground net primary\nproductivity) species establishment probability\n(SEP, called establishprob module traits table; see Species\nestablishment probability). default,\nBiomass_borealDataPrep estimates temporally constant values maxB,\nmaxANPP SEP;creates initial landscape conditions – Biomass_borealDataPrep\nperforms data-based landscape initialisation, creating species cohort\ntable (cohortData) corresponding map (pixelGroupMap; used \ninitialise track cohorts across landscape) based observed stand\nage species biomass.creates initial landscape conditions – Biomass_borealDataPrep\nperforms data-based landscape initialisation, creating species cohort\ntable (cohortData) corresponding map (pixelGroupMap; used \ninitialise track cohorts across landscape) based observed stand\nage species biomass.Biomass_core simulates tree species dynamics, Biomass_borealDataPrep\nprepares inputs estimates parameters pixels within forested\nland-cover classes (see Defining simulation pixels \necolocations).studyAreaLarge supplied, module uses parameter estimation\naccount larger spatial variability.next sections, describe greater detail various data processing\nparameter estimation steps carried Biomass_borealDataPrep.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-dataprep","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2 Data acquisition and treatment","text":"two objects user must supply shapefiles define \nstudy area used derive parameters (studyAreaLarge) study area \nsimulation happen (studyArea). two objects can identical \nuser chooses parametrise run simulations area. \nidentical, studyArea must fully within studyAreaLarge. \nstudyAreaLarge studyArea Canada, module can automatically\nestimate prepare input parameters objects Biomass_core, \ndefault raw data FAIR data (sensu Wilkinson et al. 2016) \nnational-scale.inputs supplied, Biomass_borealDataPrep create raster\nlayer versions studyAreaLarge studyArea (rasterToMatchLarge \nrasterToMatch, respectively), using stand biomass map layer\n(rawBiomassMap) template (.e., source information spatial\nresolution).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-forestedPix-ecolocations","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.1 Defining simulation pixels and ecolocations","text":"Biomass_borealDataPrep uses land-cover data define assign parameter\nvalues pixels forest dynamics simulated (forested pixels).\ndefault uses land-cover classes Land Cover Canada 2010 v1\nmap,\nraster-based database distinguishes several forest non-forest\nland-cover types. Pixels classes 1 6 included forested pixels\n(see parameter forestedLCCClasses).land-cover raster (rstLCC) includes transient cover types (e.g.,\nrecent burns) user may pass vector transient class IDs (via \nparameter LCCClassesToReplaceNN) reclassified “stable”\nforested class (defined via parameter forestedLCCClasses). \nreclassification done searching focal neighbourhood replacement\nforested cover class (radius 1250m focal cell). \nforested class found within perimeter, pixel used simulate\nforest dynamics. Reclassified pixels omitted fitting statistical\nmodels used parameter estimation, assigned predicted values \nmodels.Sub-regional spatial variation maxBiomass, maxANPP, SEP species\ntraits accounted ecolocation. Ecolocations used proxies \nbiophysical variation across landscape estimating model parameters \nvary spatially. default, defined combination \n“ecodistricts” National Ecological Framework \nCanada\n(broad-scale polygon layer captures sub-regional variation)\n(ecoregionLayer) land cover (rstLCC), user can change\nsupplying different ecozonation land-cover layers.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-sppcover","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.2 Species cover","text":"Species cover (% cover) raster layers (speciesLayers) can \nautomatically obtained pre-processed Biomass_borealDataPrep. module\nensures :data geospatial properties (extent, resolution);layers correctly re-projected studyAreaLarge \nrasterToMatchLarge;species cover values 10% excluded.default uses species % cover rasters derived MODIS\nsatellite imagery 2001, obtained Canadian National Forest\nInventory (Beaudoin et al. 2017) – hereafter ‘kNN species data’.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-init-B-age","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.3 Initial species age and biomass per pixel","text":"Stand age aboveground stand biomass (hereafter ‘stand biomass’) used \nderive parameters define initial species age biomass across \nlandscape. also derived MODIS satellite imagery 2001\nprepared NFI (Beaudoin et al. 2017) default.Biomass_borealDataPrep downloads data performs number data\nharmonization operations deal data inconsistencies. first searches\nmismatches stand age (standAge), stand biomass (standB) \ntotal stand cover (standCover), assuming cover accurate \nthree, biomass least, following order:Pixels standCover < 5% removed;Pixels standCover < 5% removed;Pixels standAge == 0, assigned standB == 0;Pixels standAge == 0, assigned standB == 0;Pixels standB == 0, assigned standAge == 0.Pixels standB == 0, assigned standAge == 0., species assigned one cohort per pixel according corrected stand\nage, stand biomass % cover values. Cohort age assumed \nstand age biomass product stand biomass species\n% cover. , stand cover rescaled vary 0\n100%.next set data inconsistencies cohort age (age), biomass (B) \ncover (cover) looked solved following order:cover > 0 age == 0, B set 0 (stand biomass\nrecalculated);cover > 0 age == 0, B set 0 (stand biomass\nrecalculated);cover == 0 age > 0, age == NA, age empirically\nestimated using remainder data fit model supplied \nP(sim)$imputeBadAgeModel, defaults :cover == 0 age > 0, age == NA, age empirically\nestimated using remainder data fit model supplied \nP(sim)$imputeBadAgeModel, defaults :Cohort biomass adjusted reflect different cover biomass\nrelationship conifer broadleaf species (see Adjustment initial\nspecies biomass).","code":"## [[1]]\n## lme4::lmer(age ~ log(totalBiomass) * cover * speciesCode + (log(totalBiomass) | \n## initialEcoregionCode))"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-spin-up","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.4 Replacing initial biomass and age within known fire perimeters","text":"Biomass_borealDataPrep can use fire perimeters correct stand ages. \n, downloads latest fire perimeter data Canadian Wildfire Data\nBase changes pixel age inside fire\nperimeters match time since last fire, using fire years first\nyear simulation.Taking two independent datasets stand age (fire perimeters) stand\nbiomass (derived MODIS satellite imagery) can cause discrepancies (e.g.\nstand age = 5 aboveground biomass = 10000 m2/ha). may due errors\ncoming ) stand replacing disturbance reset age zero years\n, biomass layer zeroed, b) disturbance \nstand-replacing (leaving biomass), age still zeroed. means \neither, aboveground biomass wrong age .Options address include 1) get better data two variables \ncontradict one another (currently available us) 2) estimate one\n. obvious way decide one incorrect, unless\nindependent data source.current Biomass_borealDataPrep module version, chose correct\n. P(sim)$fireURL provided P(sim)$overrideBiomassInFires \nTRUE, fire perimeters used source information age, \nBiomass_core used generate corresponding biomassvalues based \nestimated growth parameters known species presence/absence (species\ncover layers).assumes 1) recorded fires stand-replacing, time since fire\nnew stand age 2) first year simulation later \nfirst fire year fire perimeter data. biomass spin-\nBiomass_core run pixels stand ages corrected, long\nnew stand age (.e., time since last fire). specie start age\n= 0 biomass = 0, grow time since last fire achieved. \nresulting species biomass used initial biomass values species\ncohort actual simulation.user want perform imputation, step can bypassed\nsetting parameter P(sim)$overrideBiomassInFires FALSE \nP(sim)$fireURL NULL NA.Also pixels suffered kind data imputation (e.g., age\ncorrections detailed previous section) can \nexcluded simulation setting P(sim)$rmImputedPix == TRUE.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-invariant-traits","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.5 Invariant species traits","text":"invariant species traits obtained available species trait tables\nused LANDIS-II applications Canada’s boreal forests (available Dominic\nCyr’s GitHub repository).\nadapted minor adjustments match Western Canadian boreal\nforests using published literature. Others (key growth mortality traits) can\ncalibrated Biomass_speciesParameters (see Calibrating species\ngrowth/mortality traits using\nBiomass_speciesParameters).LANDIS-II species trait table contains species trait values \nCanadian Ecozone (NRCan 2013), default filtered Boreal\nShield West (BSW), Boreal Plains (BP) Montane Cordillera Canadian Ecozones\n(via P(sim)$speciesTableAreas). trait values vary across \necozones given species, minimum value used.function LandR::speciesTableUpdate used default \nadjustments trait values table (intended, custom\nfunction call NULL can passed P(sim)$speciesUpdateFunction):Longevity values adjusted match values Burton & Cumming (1995a), \nmatch BSP, BP MC ecozones. adjustments result higher longevity\nspecies;Longevity values adjusted match values Burton & Cumming (1995a), \nmatch BSP, BP MC ecozones. adjustments result higher longevity\nspecies;Shade tolerance values lowered Abies balsamifera, Abies\nlasiocarpa, Picea engelmanii, Picea glauca, Picea mariana, Tsuga\nheterophylla Tsuga mertensiana better relative shade tolerance\nlevels Western Canada. relative shade tolerances, \nuser always check values respect study\nareas species pool.Shade tolerance values lowered Abies balsamifera, Abies\nlasiocarpa, Picea engelmanii, Picea glauca, Picea mariana, Tsuga\nheterophylla Tsuga mertensiana better relative shade tolerance\nlevels Western Canada. relative shade tolerances, \nuser always check values respect study\nareas species pool.user can also pass one function call \nP(sim)$speciesUpdateFunction want make adjustments \naddition listed (see ?LandR::updateSpeciesTable).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-prob-germ","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.6 Probabilities of germination","text":"default, Biomass_borealDataPrep uses probabilities germination\n(called sufficientLight module) Biomass_core. obtained\npublicly available LANDIS-II\ntable.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"parameter-estimationcalibration","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3 Parameter estimation/calibration","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-adjustB","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.1 Adjustment of initial species biomass","text":"Biomass_borealDataPrep estimates initial values species aboveground biomass\n(B) based stand biomass (standB) individual species %\ncover. Initial B estimated species pixel multiplying\nstandB species % cover. default cover layers \nsatellite-derived, relationship relative cover relative biomass\nbroadleaf conifer species needs adjusted reflect different\ncanopy architectures (using P(sim)$deciduousCoverDiscount).default, Biomass_borealDataPrep uses previously estimated\nP(sim)$deciduousCoverDiscount based Northwest Territories data. However,\nuser can chose re-estimate setting\nP(sim)$fitDeciduousCoverDiscount == TRUE. case, default\nBiomass_borealDataPrep fit following model:relates estimated biomass (B) interaction term \nlog-age (logAge), standB (‘totalBiomass’), speciesCode (.e. species ID)\nland cover (‘lcc’). model fitted standB species cover \nstudyAreaLarge, using optimization routine searches best\nconversion factor broadleaf species cover B minimizing AIC.","code":"## [[1]]\n## glm(I(log(B/100)) ~ logAge * I(log(totalBiomass/100)) * speciesCode * \n## lcc)"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-maxB-maxANPP","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.2 Maximum biomass and maximum aboveground net primary productivity","text":"Biomass_borealDataPrep statistically estimates maximum biomass (maxB) \nmaximum aboveground net primary productivity (maxANPP) using processed\nspecies ages biomass.maxB estimated modelling response species biomass (B) \nspecies age cover, accounting variation ecolocations\n(ecoregionGroup ):coefficients estimated maximum likelihood model fit calculated\nproportion explained variance explained fixed effects \n(marginal r2) entire model (conditional r2) – \nprinted messages.model can take fit, default sample pixels within\nspecies ecolocation combination (sample size defined \nP(sim)$subsetDataBiomassModel parameter).convergence issues occur P(sim)$fixModelBiomass == TRUE, module\nattempts refit model re-sampling data, re-fitting lmer \nbobyqa optimizer, re-scaling continuous predictors (default,\ncover logAge). steps tried additively convergence\nissue resolved. module still unable solve convergence issue\nmessage printed module uses last fitted model.Note convergence issues usually problematic estimation \ncoefficient values, estimation standard errors. However, \nuser always inspect final model (especially converged) \nmake sure problems significant fitted model meets\nresidual assumptions. , user make sure model objects \nexported simList using exportModels parameter.Alternative model calls/formulas can supplied via P(sim)$biomassModel\nparameter. Note supplying model call use lme4::lmer\nrefitting process likely fail may disabled (via \nP(sim)$fixModelBiomass parameter).Another consideration add respect estimation maxB, \nchoosing linear model relate B ~ log(age) + cover. \nideal ecological point view, biomass unlikely vary linearly\nage cover, likely saturate beyond certain high value \ncover follow hump-shaped curve age (.e., reaching maximum values \ngiven age, starting decrease trees approach longevity). Also,\nfitting linear model can lead negative B values young ages low\ncover. However, tests revealed linear mixed effects model \nproducing abnormal estimates B maximum values age cover (hence,\nmaxB estimates), allowing leverage powerful statistical\nmachinery lme4.Finally, highlight modelling log(B) appropriate solution,\nwrongly assume exponential relationship \nB ~ log(age) + cover, leading serious overestimation maxB(Fig.\n5.1) steep increases species biomasses\nfirst years simulation (Fig. 5.2).\nFigure 5.1: Modelling biomass linear vs. exponential relationship. ) modelBiomass B ~ logAge * speciesCode + cover * speciesCode + (logAge + cover | ecoregionGroup). b) modelBiomass logB ~ logAge * speciesCode + cover * speciesCode + (logAge + cover | ecoregionGroup). Blue dots marginal mean B values (back-transformed b) cross ages confidence intervals bars.\n\nFigure 5.2: Thirty years simulation maxB values estimated logB ~ ... biomassModel (see Fig. 5.1). steep increase little time abnormal.\nbiomass model fit, maxB predicted species ecolocation\ncombination, maximum species cover values (100%) maximum\nlog-age (log species longevity). using Biomass_speciesParameters,\nmaxB calibrated species can achieve maximum observed biomass\nsimulation (see Calibrating species growth/mortality traits using\nBiomass_speciesParameters).maxANPP calculated maxB * mANPPproportion/100, \nmANPPproportion defaults 3.33, unless calibrated \nBiomass_speciesParameters (see Calibrating species growth/mortality traits\nusing Biomass_speciesParameters). default\nvalue, 3.33, comes inversion rationale used calculate maxB\nScheller & Mladenoff (2004). , authors estimated maxANPP using \nmodel PnET-II (adjusted values manually) estimates\ncalculated maxB multiplying estimated maxANPP 30.","code":"## [[1]]\n## lme4::lmer(B ~ logAge * speciesCode + cover * speciesCode + (logAge + \n## cover | ecoregionGroup))"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-SEP","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.3 Species establishment probability","text":"Species establishment probability (SEP, establishprob module) \nestimated modelling probability observing given species \necolocation. , Biomass_borealDataPrep models relationship \nprobability occurrence species (\\(\\pi\\)) using following model \ndefault:whereby probability occurrence species (\\(\\pi\\)) – calculated \nproportion pixels % cover > 0 – modelled per species\necolocation following binomial distribution logit link function.\ndata sub-sampling done fitting SEP statistical model, \nmodel fits quickly even large sample sizes (e.g., > 20 million\npoints).SEP predicted species ecolocation combination resulting\nvalues integrated length succession time step\n(successionTimestep parameter) :important, since seed establishment occurs every\nP(sim)$successionTimestep, thus probabilities seed establishment\nneed temporally integrated reflect probability seed\nestablishing period time.Finally, since observed species cover used fit coverModel result\nseed establishment resprouting/clonal growth, final species\nestablishment probabilities calculated function temporally\nintegrated presence probabilities species’ probabilities resprouting\n(resproutprob, species table) (bounded 0 1):\\(SEP > 1\\), :\\(SEP < 0\\), :","code":"## [[1]]\n## glm(cbind(coverPres, coverNum - coverPres) ~ speciesCode * ecoregionGroup, \n## family = binomial)"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-minRelB","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.4 Ecolocation-specific parameter – minimum relative biomass","text":"Minimum relative biomass (minRelativeB) spatially-varying parameter used\ndetermine shade level pixel. shade class (X0-X5) defined\nminimum relative biomass threshold compared pixel’s current relative\nbiomass, calculated sum pixel’s total biomass divided \ntotal potential maximum biomass pixel (sum maxB \npixel’s ecolocation).Since found data base parametrisation shade class\nthresholds, default values based publicly available values used \nLANDIS-II applications Canada’s boreal forests (available Dominic Cyr’s\nGitHub repository), \necolocations share values.Initial runs revealed excessive recruitment moderately shade-intolerant\nspecies even stand biomass increased, values shade levels X4 X5\nadjusted downwards (X4: 0.8 0.75; X5: 0.90 0.85) reflect higher\ncompetition resources (e.g. higher water limitation) Western Canadian\nforests regards Eastern Canadian forests (Messier et al. 1998), \nlikely driven higher moisture limitation west (Hogg et al. 2008; Peng et al. 2011).adjustment can bypassed either supplying minRelativeB table, \nalternative function call P(sim)$minRelativeBFunction (default\nLandR::makeMinRelativeB.minimum biomass threshold shade level X0 0 standB.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-B_sppParams-calib","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.5 Calibrating species growth/mortality traits using Biomass_speciesParameters","text":"using Biomass_borealDataPrep Biomass_speciesParameters, later\nmodule calibrates several species traits first prepared \nBiomass_borealDataPrep:growthcurve, mortalityshape – initially come publicly\navailable LANDIS-II tables;growthcurve, mortalityshape – initially come publicly\navailable LANDIS-II tables;maxBiomass, maxANPP – estimated statistically \nBiomass_borealDataPrep (see Maximum biomass maximum aboveground net\nprimary productivity).maxBiomass, maxANPP – estimated statistically \nBiomass_borealDataPrep (see Maximum biomass maximum aboveground net\nprimary productivity).Briefly, Biomass_speciesParameters:Uses ~41,000,000 hypothetical species’ growth curves (generated \nBiomass_core), cover fully factorial combination longevity,\nratio maxANPP maxBiomass, growthcurve, mortalityshape;Uses ~41,000,000 hypothetical species’ growth curves (generated \nBiomass_core), cover fully factorial combination longevity,\nratio maxANPP maxBiomass, growthcurve, mortalityshape;Takes permanent temporary sample plot (PSP) data near study\narea target species, finds hypothetical species’ growth\ncurve closely matches growth curve observed PSP data – \nspecies--species base. gives us species’ growthcurve,\nmortalityshape, new species trait, mANPPproportion, ratio \nmaximum aboveground net primary productivity (maxANPP) maximum biomass\n(maxBiomass, confounded maxB) study area.Takes permanent temporary sample plot (PSP) data near study\narea target species, finds hypothetical species’ growth\ncurve closely matches growth curve observed PSP data – \nspecies--species base. gives us species’ growthcurve,\nmortalityshape, new species trait, mANPPproportion, ratio \nmaximum aboveground net primary productivity (maxANPP) maximum biomass\n(maxBiomass, confounded maxB) study area.Introduces second new species trait, inflationFactor, re-calibrates\nmaxB. recognize maxB, obtained empirically \nBiomass_borealDataPrep, easily reached simulations \nreasonable values growthcurve, mortalityshape longevity\nprevent equation reaching maxB (acts asymptote \nnever approached). inflationFactor calculated ratio \nmaxBiomass (parameter used generate theoretical growth curves \nstep 1) maximum biomass actually achieved theoretical growth\ncurves (step 1). maxB recalibrated multiplying \ninflationFactor. , resulting non-linear growth curves\ngenerated Biomass_core simulation able achieve \nempirically estimated maxB.Introduces second new species trait, inflationFactor, re-calibrates\nmaxB. recognize maxB, obtained empirically \nBiomass_borealDataPrep, easily reached simulations \nreasonable values growthcurve, mortalityshape longevity\nprevent equation reaching maxB (acts asymptote \nnever approached). inflationFactor calculated ratio \nmaxBiomass (parameter used generate theoretical growth curves \nstep 1) maximum biomass actually achieved theoretical growth\ncurves (step 1). maxB recalibrated multiplying \ninflationFactor. , resulting non-linear growth curves\ngenerated Biomass_core simulation able achieve \nempirically estimated maxB.Estimates species-specific maxANPP multiplying final maxB \nmANPPproportion (estimated step 2).Estimates species-specific maxANPP multiplying final maxB \nmANPPproportion (estimated step 2).cases insufficient PSP data perform steps, maxB\nmaxANPP left estimated Biomass_borealDataPrep (see Maximum\nbiomass maximum aboveground net primary\nproductivity) inflationFactor \nmANPPproportion take default values 1 3.33.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"aggregating-species","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.4 Aggregating species","text":"Biomass_borealDataPrep use input table sppEquiv parameter\nP(sim)$sppEquivCol select naming convention use simulation\n(see full list input objects \nparameters details). user can use table \nparameter define groupings “merge” similar species \ninvariant trait values (see Invariant species\ntraits) (e.g. genus-level group functional\ngroup). , name species group sppEquivCol column \nsppEquiv table must identical grouped species.\nTable 5.1: Example species merging simulation. user wants model Abies balsamea, . lasiocarpa Pinus contorta separate species, Picea spp. genus-level group. , six species identified ‘KNN’ column, % cover layers can obtained, ‘Boreal’ column (defines naming convention used simulation example) Picea spp. name. Biomass_borealDataPrep merge % cover data single layer summing cover per pixel.\ngroups contain species different (invariant) trait values, minimum\nvalue across species used. default species % cover\nlayers, Biomass_borealDataPrep proceeds way \nBiomass_speciesData sums cover across species group per pixel.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-inputs-list","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.5 List of input objects","text":"full lists input objects (Table\n5.2) Biomass_borealDataPrep\nexpects.inputs must provided (.e., Biomass_borealDataPrep \ndefault ) studyArea (study area used simulate forest\ndynamics Biomass_core) studyAreaLarge (potentially larger study area\nused derive parameter values – e.g., species traits).input objects parameters internal defaults.inputs, following particularly important deserve special\nattention:Spatial layersecoregionLayer ecoregionRst – shapefile map containing\necological zones.ecoregionLayer ecoregionRst – shapefile map containing\necological zones.rawBiomassMap – map observed stand biomass (\\(g/m^2\\)).rawBiomassMap – map observed stand biomass (\\(g/m^2\\)).rstLCC – land-cover raster.rstLCC – land-cover raster.speciesLayers – layers species % cover data. species\nmust match available default (provided) species traits tables\n(species speciesEcoregion tables).speciesLayers – layers species % cover data. species\nmust match available default (provided) species traits tables\n(species speciesEcoregion tables).standAgeMap – map observed stand ages (years).standAgeMap – map observed stand ages (years).studyArea – shapefile. SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input object must\nsupplied user.studyArea – shapefile. SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input object must\nsupplied user.studyAreaLarge – shapefile. SpatialPolygonsDataFrame single\npolygon determining statistical models parameter\nestimation fitted. must contain studyArea fully, \nidentical. object must supplied user.studyAreaLarge – shapefile. SpatialPolygonsDataFrame single\npolygon determining statistical models parameter\nestimation fitted. must contain studyArea fully, \nidentical. object must supplied user.TablesspeciesTable – table invariant species traits must \nfollowing columns (even necessary simulation):\n“species”, “Area”, “longevity”, “sexualmature”, “shadetolerance”,\n“firetolerance”, “seeddistance_eff”, “seeddistance_max”, “resproutprob”,\n“resproutage_min”, “resproutage_max”, “postfireregen”, “leaflongevity”,\n“wooddecayrate”, “mortalityshape”, “growthcurve”, “leafLignin”, “hardsoft”.\norder can vary column names must identical. See Scheller & Miranda (2015b)\nBiomass_core manual detail columns.\nTable 5.2: List Biomass_borealDataPrep input objects description.\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-params-list","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.6 List of parameters","text":"Table 5.3 lists parameters used\nBiomass_borealDataPrep detailed information. default\nvalues specified module’s metadata.parameters, following particularly important:Estimation simulation parametersbiomassModel – statistical model (function call) used \nestimate maxB maxANPP.biomassModel – statistical model (function call) used \nestimate maxB maxANPP.coverModel – statistical model (function call) used estimate\nSEP.coverModel – statistical model (function call) used estimate\nSEP.fixModelBiomass – determines whether biomassModel re-fit \nconvergence issues arise.fixModelBiomass – determines whether biomassModel re-fit \nconvergence issues arise.imputeBadAgeModel – model used impute ages missing, \nmatch input cover biomass data. confounded \ncorrecting ages fire dataimputeBadAgeModel – model used impute ages missing, \nmatch input cover biomass data. confounded \ncorrecting ages fire datasubsetDataAgeModel subsetDataBiomassModel – control data\nsub-sampling fitting imputeBadAgeModel biomassModel,\nrespectivelysubsetDataAgeModel subsetDataBiomassModel – control data\nsub-sampling fitting imputeBadAgeModel biomassModel,\nrespectivelyexportModels – controls whether biomassModel coverModel ()\nexported simulation simList, can useful \ninspect fitted models report statistical fit.exportModels – controls whether biomassModel coverModel ()\nexported simulation simList, can useful \ninspect fitted models report statistical fit.sppEquivCol – character. column name speciesEquivalency\ndata.table defines naming convention use throughout \nsimulation.sppEquivCol – character. column name speciesEquivalency\ndata.table defines naming convention use throughout \nsimulation.Data processingforestedLCCClasses LCCClassesToReplaceNN – define land-cover\nclasses rstLCC forested reclassified \nforested classes, respectively.forestedLCCClasses LCCClassesToReplaceNN – define land-cover\nclasses rstLCC forested reclassified \nforested classes, respectively.deciduousCoverDiscount, coverPctToBiomassPctModel \nfitDeciduousCoverDiscount – first adjustment factor \nbroadleaf species cover biomass relationships; second third \nmodel used refit deciduousCoverDiscount supplied\nstudyAreaLarge whether refitting attempted (respectively).deciduousCoverDiscount, coverPctToBiomassPctModel \nfitDeciduousCoverDiscount – first adjustment factor \nbroadleaf species cover biomass relationships; second third \nmodel used refit deciduousCoverDiscount supplied\nstudyAreaLarge whether refitting attempted (respectively).\nTable 5.3: List Biomass_borealDataPrep parameters description.\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-outputs-list","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.7 List of outputs","text":"module produces following outputs (Table\n5.4), key inputs \nBiomass_core.TablescohortData – initial community table, containing corrected biomass\n(g/m2), age species cover data, well ecolocation pixelGroup\ninformation. table defines initial community composition \nstructure used Biomass_core.cohortData – initial community table, containing corrected biomass\n(g/m2), age species cover data, well ecolocation pixelGroup\ninformation. table defines initial community composition \nstructure used Biomass_core.species – table invariant species traits. contain traits\nspeciesTable , adjusted necessary.species – table invariant species traits. contain traits\nspeciesTable , adjusted necessary.speciesEcoregion – table spatially-varying species traits (maxB,\nmaxANPP, SEP).speciesEcoregion – table spatially-varying species traits (maxB,\nmaxANPP, SEP).minRelativeB – minimum relative biomass thresholds determine shade\nlevel pixel. X0-5 represent site shade classes -shade (0) \nmaximum shade (5).minRelativeB – minimum relative biomass thresholds determine shade\nlevel pixel. X0-5 represent site shade classes -shade (0) \nmaximum shade (5).sufficientLight – probability germination species shade tolerance\n(species) shade level(defined byminRelativeB`)sufficientLight – probability germination species shade tolerance\n(species) shade level(defined byminRelativeB`)Spatial layersbiomassMap – map initial stand biomass values adjustments \ndata mismatches.biomassMap – map initial stand biomass values adjustments \ndata mismatches.pixelGroupMap – map containing pixelGroup IDs per pixel. defines\ninitial map used hashing within Biomass_core, conjunction \ncohortData.pixelGroupMap – map containing pixelGroup IDs per pixel. defines\ninitial map used hashing within Biomass_core, conjunction \ncohortData.ecoregionMap – map ecolocations.ecoregionMap – map ecolocations.\nTable 5.4: List Biomass_borealDataPrep output objects description.\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-sim-flow","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.8 Simulation flow and module events","text":"Biomass_borealDataPrep initialises prepares inputs, provided \ninternet access retrieve raw datasets, parametrisation use \nBiomass_core.module runs one time step contains general flow \nBiomass_borealDataPrep processes :Preparation necessary data input objects require\nparameter fitting (e.g., invariant species traits table, creating\necolocations);Preparation necessary data input objects require\nparameter fitting (e.g., invariant species traits table, creating\necolocations);Fixing mismatched raw cover, biomass age data;Fixing mismatched raw cover, biomass age data;Imputing age values pixels mismatches exist age data missing;Imputing age values pixels mismatches exist age data missing;Construction initial data.table cohort biomass age per pixel\n(ecolocation information);Construction initial data.table cohort biomass age per pixel\n(ecolocation information);Sub-setting pixels forested land-cover classes (optional) converting\ntransient land-cover classes forested classes;Sub-setting pixels forested land-cover classes (optional) converting\ntransient land-cover classes forested classes;Fitting coverModel;Fitting coverModel;Fitting biomassModel (re-fitting necessary – optional);Fitting biomassModel (re-fitting necessary – optional);Estimating maxB, maxANPP SEP per species ecolocation.Estimating maxB, maxANPP SEP per species ecolocation.(OPTIONAL) Correcting ages pixels inside fire perimeters reassigning\nbiomass.(OPTIONAL) Correcting ages pixels inside fire perimeters reassigning\nbiomass.[steps 1-9 part init event. step 1, data downloaded\nrun .inputObjects function](OPTIONAL) Plots maxB, maxANPP SEP maps (plot event);(OPTIONAL) Plots maxB, maxANPP SEP maps (plot event);(OPTIONAL) Save outputs (save event)(OPTIONAL) Save outputs (save event)","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-example","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.3 Usage example","text":"module can run stand-alone, won’t much prepare\ninputs Biomass_core. Hence, provide usage example module \nothers \nrepository \nBarros et al. (2023).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-refs","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.4 References","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"landr-biomass_core-module","chapter":"6 LandR Biomass_core Module","heading":"6 LandR Biomass_core Module","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"authors-3","chapter":"6 LandR Biomass_core Module","heading":"6.0.0.1 Authors:","text":"Yong Luo yluo1@lakeheadu.ca [aut], Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Ceres Barros ceres.barros@ubc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [aut], Ian Eddy ian.eddy@nrcan-rncan.gc.ca [ctb], Jean Marchal jean.d.marchal@gmail.com [ctb]\ndocumentation work progress. Potential discrepancies omissions\nmay exist time . find , contact us using “Get help”\nlink .","code":""},{"path":"landr-biomass_core-module.html","id":"module-overview-3","chapter":"6 LandR Biomass_core Module","heading":"6.1 Module Overview","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"quick-links-1","chapter":"6 LandR Biomass_core Module","heading":"6.1.1 Quick links","text":"General functioningGeneral functioningList input objectsList input objectsList parametersList parametersList outputsList outputsSimulation flow module eventsSimulation flow module events","code":""},{"path":"landr-biomass_core-module.html","id":"summary-1","chapter":"6 LandR Biomass_core Module","heading":"6.1.2 Summary","text":"LandR Biomass_core (hereafter Biomass_core) core forest succession\nsimulation module LandR ecosystem SpaDES modules (see Chubaty & McIntire 2019). simulates tree cohort ageing, growth, mortality \ncompetition light resources, well seed dispersal (Fig.\n6.1), spatially explicit manner using yearly\ntime step. model based LANDIS-II Biomass Succession Extension\nv.3.2.1 (LBSE, Scheller & Miranda 2015a), changes (see Differences\nBiomass_core LBSE). Nonetheless, \nessential functioning succession model still largely follows \nLANDIS-II counterpart, refer reader corresponding LBSE manual\n(Scheller & Miranda 2015a) detailed reading mechanisms implemented \nmodel.\nFigure 6.1: Biomass_core simulates tree cohort growth, mortality, recruitment dispersal dynamics, function cohort ageing competition light (shading) space, well disturbances like fire (simulated using modules).\n","code":""},{"path":"landr-biomass_core-module.html","id":"links-modules","chapter":"6 LandR Biomass_core Module","heading":"6.1.3 Links to other modules","text":"Biomass_core intended used data/calibration modules, disturbance\nmodules validation modules, amongst others. following list \nmodules commonly used Biomass_core. yet LandR\nManual see individual module’s\ndocumentation (.Rmd file) available repository.See \navailable modules select Biomass_core drop-menu see\nlinkages.Data calibration modules:Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory;Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory;Biomass_borealDataPrep:\nprepares parameters inputs (including initial landscape conditions)\nBiomass_core needs run realistic simulation. Default\nvalues/inputs produced relevant boreal forests Western Canada;Biomass_borealDataPrep:\nprepares parameters inputs (including initial landscape conditions)\nBiomass_core needs run realistic simulation. Default\nvalues/inputs produced relevant boreal forests Western Canada;Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada.Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada.Disturbance-related modules:Biomass_regeneration:\nsimulates cohort biomass responses stand-replacing fires (LBSE),\nincluding cohort mortality regeneration resprouting /\nserotiny;Biomass_regeneration:\nsimulates cohort biomass responses stand-replacing fires (LBSE),\nincluding cohort mortality regeneration resprouting /\nserotiny;Biomass_regenerationPM:\nlike Biomass_regeneration, allowing partial mortality. Based \nLANDIS-II Dynamic Fuels & Fire System extension (Sturtevant et al. 2018);Biomass_regenerationPM:\nlike Biomass_regeneration, allowing partial mortality. Based \nLANDIS-II Dynamic Fuels & Fire System extension (Sturtevant et al. 2018);fireSense: climate- land-cover-sensitive fire model simulating fire\nignition, escape spread processes function climate \nland-cover. Includes built-parameterisation processes using\nclimate, land-cover, fire occurrence fire perimeter data. Requires using\nBiomass_regeneration Biomass_regenerationPM. See modules prefixed\n“fireSense_” https://github.com/PredictiveEcology/;fireSense: climate- land-cover-sensitive fire model simulating fire\nignition, escape spread processes function climate \nland-cover. Includes built-parameterisation processes using\nclimate, land-cover, fire occurrence fire perimeter data. Requires using\nBiomass_regeneration Biomass_regenerationPM. See modules prefixed\n“fireSense_” https://github.com/PredictiveEcology/;LandMine: wildfire\nignition cover-sensitive wildfire spread model based fire return\ninterval input. Requires using Biomass_regeneration \nBiomass_regenerationPM;LandMine: wildfire\nignition cover-sensitive wildfire spread model based fire return\ninterval input. Requires using Biomass_regeneration \nBiomass_regenerationPM;scfm: spatially explicit fire\nspread module parameterised modelled stochastic three-part process\nignition, escape, spread. Requires using Biomass_regeneration \nBiomass_regenerationPM.scfm: spatially explicit fire\nspread module parameterised modelled stochastic three-part process\nignition, escape, spread. Requires using Biomass_regeneration \nBiomass_regenerationPM.Validation modules:Biomass_validationKNN:\ncalculates two validation metrics (mean absolute deviation sum \nnegative log-likelihoods) species presences/absences biomass-related\nproperties across simulated landscape. default, uses \nindependent dataset species % cover stand biomass \n2011, assuming second snapshot landscape.","code":""},{"path":"landr-biomass_core-module.html","id":"module-manual-2","chapter":"6 LandR Biomass_core Module","heading":"6.2 Module manual","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"general-functioning","chapter":"6 LandR Biomass_core Module","heading":"6.2.1 General functioning","text":"Biomass_core forest landscape model based LANDIS-II Biomass\nSuccession Extension v.3.2.1 model (LBSE, Scheller & Miranda 2015a). core\nforest succession model LandR ecosystem SpaDES modules. Similarly \nLBSE, Biomass_core simulates changes tree cohort aboveground biomass\n(\\(g/m^2\\)) calculating growth, mortality recruitment functions pixel\nspecies characteristics, competition disturbances (Fig.\n6.1). Note , default, cohorts unique\ncombinations species age, can changed via \ncohortDefinitionCols parameter (see List parameters).Specifically, cohort growth driven invariant (growth shape parameter,\ngrowthcurve) spatio-temporally varying species traits (maximum biomass,\nmaxB, maximum annual net primary productivity, maxANPP), \nbackground mortality (.e., caused disturbances) depends \ninvariant species traits (longevity mortality shape parameter,\nmortalityshape). five traits directly influence realised shape\nspecies growth curves, determining fast grow (growthcurve \nmaxANPP), soon age mortality starts respect longevity\n(mortalityshape) biomass cohort can potentially achieve (maxB).Cohort recruitment determined available “space” (.e., pixel shade),\ninvariant species traits (regeneration mode, postfireregen, age maturity,\nsexualmature, shade tolerance, shadetolerance) third spatio-temporally\nvarying trait (species establishment probability, establishprob, called SEP\nhereafter). available “growing space” calculated species’ maxB\nminus occupied biomass (summed across cohorts pixel). \n“space”, cohort can establish one three recruitment modes:\nserotiny, resprouting germination.Disturbances (e.g., fire) can cause cohort mortality trigger\npost-disturbance regeneration. Two post-disturbance regeneration mechanisms \nimplemented, following LBSE: serotiny resprouting\n(Scheller & Miranda 2015a). Post-disturbance mortality regeneration occur\nresponse fire simulated two separate, interchangeable\nmodules, Biomass_regeneration Biomass_regenerationPM differ \nrespect level post-fire mortality simulate (complete partial\nmortality, respectively).Cohort germination (also called cohort establishment) occurs seeds \navailable local sources (pixel), via seed dispersal. Seed dispersal\ncan three modes: ‘dispersal’, ‘universal dispersal’ (arguably, \ninteresting dummy case studies) ‘ward dispersal’ (Scheller & Miranda 2015a).\nBriefly, ‘ward dispersal’ algorithm describes flexible kernel \ncalculates probability species colonising neighbour pixel \nfunction distance source dispersal-related (invariant)\nspecies traits, used default.Finally, germination regeneration success depend species’\nprobability germination given pixel (probabilities \ngermination).refer reader Scheller & Miranda (2015a), Scheller & Domingo (2011) \nScheller & Domingo (2012) details respect mentioned\nmechanisms implemented Biomass_core. later section manual, \nhighlight existing differences Biomass_core \nLBSE, together comparisons two\nmodules.","code":""},{"path":"landr-biomass_core-module.html","id":"init-inputs-params","chapter":"6 LandR Biomass_core Module","heading":"6.2.2 Initialisation, inputs and parameters","text":"initialise simulate forest dynamics given landscape,\nBiomass_core requires number inputs parameters namely:initial cohort biomass age values across landscape;initial cohort biomass age values across landscape;invariant species traits values;invariant species traits values;spatio-temporally varying species traits values (just\nspatially-varying);spatio-temporally varying species traits values (just\nspatially-varying);location- (ecolocation-) specific parameters;location- (ecolocation-) specific parameters;probabilities germination given species’ shade\ntolerance site shade.probabilities germination given species’ shade\ntolerance site shade.detailed full list input objects.\nBiomass_borealDataPrep module manual also provides information \nestimation many traits/inputs available data, \nadjustment using published values best knowledge boreal forest\ndynamics Western Canada.Unlike initialisation LBSE5, Biomass_core initialises\nsimulation using data-derived initial cohort biomass age. \ninformation ideally supplied data calibration modules like\nBiomass_borealDataPrep (Links modules), \nBiomass_core can also initialise using theoretical data.Similarly, although Biomass_core can create necessary traits \nparameters using theoretical values, realistic simulations \nprovided data calibration modules, like Biomass_borealDataPrep \nBiomass_speciesParameters. advise future users developers become\nfamiliar data modules try create modules (\nmodify existing ones) purpose.","code":""},{"path":"landr-biomass_core-module.html","id":"initial-objs","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.1 Initial cohort biomass and age","text":"Initial cohort biomass age derived stand biomass (biomassMap\nraster layer), stand age (standAgeMap raster layer) species %\ncover (speciesLayers raster layers) data (see Table\n6.5) formatted cohortData\nobject. cohortData table central simulation object tracks \ncurrent year’s cohort biomass, age, mortality (lost biomass) aboveground net\nprimary productivity (ANPP) per species pixel group (pixelGroup). \nstart simulation, cohortData values cohort\nmortality ANPP.pixelGroup collection pixels share ecolocation\n(coded ecoregionMap raster layer) cohort composition. \ndefault, ecolocation combination land-cover ecological zonation\n(see ecoregionMap full list inputs) unique\ncohort compositions defined unique combinations species, age \nbiomass. cohortData table therefore always associated current\nyear’s pixelGroupMap raster layer, provides spatial location \npixelGroups, allowing “spatialise” cohort information dynamics (e.g.,\ndispersal) pixel pixel basis (see also\nHashing).user, another module, may provide initial cohortData \npixelGroupMap objects start simulation, input objects necessary\nproduce : study area polygon (studyArea), biomassMap,\nstandAgeMap, speciesLayers ecoregionMap raster layers (see list\ninput objects detail).","code":""},{"path":"landr-biomass_core-module.html","id":"invariant-traits","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.2 Invariant species traits","text":"spatio-temporally constant traits mostly influence population\ndynamics (e.g., growth, mortality, dispersal) responses fire (fire\ntolerance regeneration).default, Biomass_core obtains trait values available LANDIS-II tables\n(see Table 6.5), traits can \nadjusted/supplied user modules. instance, using\nBiomass_borealDataPrep adjust trait values Western Canadian\nboreal forests (e.g., longevity values adjusted following Burton & Cumming 1995b), using Biomass_speciesParameters calibrates \ngrowthcurve mortalityshape parameters estimates two additional\nspecies traits (inflationFactor mANPPproportion) calibrate maxB \nmaxANPP (respectively).Table 6.1 shows example table invariant\nspecies traits. Note Biomass_core (alone) requires columns Table\n6.1 present, exception \nfiretolerance, postfireregen, resproutprob, resproutage_min \nresproutage_max, used post-fire regeneration modules\n(Biomass_regeneration Biomass_regenerationPM).Please see Scheller & Domingo (2011) Scheller & Miranda (2015a) \ndetail.\nTable 6.1: Example invariant species traits table (species table object module), species Abies sp. (Abie_sp), Picea engelmannii (Pice_eng), Picea glauca (Pice_gla), Pinus sp. (Pinu_sp), Populus sp. (Popu_sp) Pseudotsuga menziesii (Pseu_men). Note theoretical values.\n","code":""},{"path":"landr-biomass_core-module.html","id":"varying-traits","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.3 Spatio-temporally varying species traits","text":"traits vary species, ecolocation , potentially, year \nyear column omitted several years exist (case last\nyear’s values current simulation year always used). \nmaximum biomass, maxB, maximum -ground net primary productivity,\nmaxANPP, species establishment probability, SEP (called establishprob \nmodule). default, Biomass_core assigns theoretical values \ntraits, thus recommend using Biomass_borealDataPrep obtain realistic\ntrait values derived data (default, pertinent Canadian boreal forest\napplications), passing custom table directly. Biomass_speciesParameters\ncalibrates maxB maxANPP estimating two additional invariant\nspecies traits (inflationFactor mANPPproportion; also Western\nCanadian forests). See Table 6.2 example.\nTable 6.2: Example spatio-temporally varying species traits table (speciesEcoregion table object module), two ecolocations (called ecoregionGroups) species Abies sp. (Abie_sp), Picea engelmannii (Pice_eng), Picea glauca (Pice_gla), Pinus sp. (Pinu_sp), Populus sp. (Popu_sp) Pseudotsuga menziesii (Pseu_men). simulation runs 10 year using table, trait values year 2 used simulation years 2-10.\n","code":""},{"path":"landr-biomass_core-module.html","id":"ecolocation-traits","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.4 Ecolocation-specific parameters – minimum relative biomass","text":"Minimum relative biomass (minRelativeB) ecolocation-specific\nparameter used Biomass_core. used determine shade level \npixel (.e., site shade) respect total potential maximum\nbiomass pixel (.e., sum maxB values pixel’s\necolocation). relative biomass stand (regards total\npotential maximum biomass) minimum relative biomass thresholds, \npixel assigned threshold’s site shade value (Scheller & Miranda 2015a).shade level influences germination regeneration new cohorts,\ndepending shade tolerance (see Probabilities \ngermination).Site shade varies X0 (shade) X5 (maximum shade). default,\nBiomass_core uses minimum realtive biomass threshold values across\necolocations, adjusted publicly available LANDIS-II\ntable better reflect\nWestern Canada boreal forest dynamics (see Table 6.3).\nBiomass_borealDataPrep adjustment default. \ninputs, values can adjusted using modules passing\nuser-defined tables.\nTable 6.3: Example minimum relative biomass table (minRelativeB table object module), two ecolocations (ecoregionGroups) sharing values\n","code":""},{"path":"landr-biomass_core-module.html","id":"prob-germ","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.5 Probabilities of germination","text":"species’ probability germination results combination shade\ntolerance level (invariant species trait species table; Table\n6.1) site shade (defined amount \nbiomass pixel – see minimum relative biomass\nparameter Scheller & Miranda 2015a). default, \nBiomass_core Biomass_borealDataPrep use publicly available LANDIS-II\ntable (called sufficientLight module; Table 6.4).\nTable 6.4: Default species probability germination values used Biomass_core Biomass_borealDataPrep. Columns X0-X5 different site shade levels line probability germination site shade species shade tolerance combination.\n","code":""},{"path":"landr-biomass_core-module.html","id":"other-inputs","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.6 Other module inputs","text":"remaining module input objects either directly influence basic\nmechanisms implemented Biomass_core (e.g., sppColorVect \nstudyAreaReporting used plotting purposes), objects keep\ntrack property/process module (e.g., lastReg counter \nlast year regeneration occurred), define study area \nsimulation (e.g., studyArea rasterToMatch).next section provides complete list input objects, including \nalready mentioned .","code":""},{"path":"landr-biomass_core-module.html","id":"inputs-list","chapter":"6 LandR Biomass_core Module","heading":"6.2.3 List of input objects","text":"Biomass_core’s input objects (theoretical) defaults \nproduced automatically module6. suggest new users\nrun Biomass_core supplying studyArea polygon, \nattempting supply combining Biomass_core modules.\nenable become familiar input objects \ntheoretical setting.inputs listed Table 6.5, \nfollowing particularly important deserve special attention:Spatial layersecoregionMap – raster layer ecolocation IDs. Note term\n“ecoregion” inherited LBSE kept consistency original\nLBSE code, prefer call ecolocations avoid confusion \necoregion-level classification National Ecological\nClassification Canada\n(NECC).\nEcolocations group pixels similar biophysical conditions. default,\nuse two levels grouping applications: first level \necological classification ecodistricts NECC, second\nlevel land-cover classification. Hence, ecolocations contain\nrelatively coarse scale regional information plus finer scale land cover\ninformation. ecoregionMap layer must defined categorical\nraster, associated Raster Attribute Table (RAT; see, e.g.,\nraster::ratify). RAT must contain columns: ID (value \nraster layer), ecoregion (first level grouping) \necoregionGroup (full ecolocation “name” written \n). Note creating ecoregionGroup’s \ncombining two raster layers whose values numeric (\nBiomass_borealDataPrep), group label character combination two\nnumeric grouping levels. instance, Natural Ecoregion 2 \nland-cover types 1, 2 3, RAT contain ID = {1,2,3},\necoregion = {2} ecoregionGroup = {2_1, 2_2, 2_3}. However, user\nfree use groupings wish. Finally, note ecolocations\n(ecoregionGroup’s) listed ecoregion table.ecoregionMap – raster layer ecolocation IDs. Note term\n“ecoregion” inherited LBSE kept consistency original\nLBSE code, prefer call ecolocations avoid confusion \necoregion-level classification National Ecological\nClassification Canada\n(NECC).\nEcolocations group pixels similar biophysical conditions. default,\nuse two levels grouping applications: first level \necological classification ecodistricts NECC, second\nlevel land-cover classification. Hence, ecolocations contain\nrelatively coarse scale regional information plus finer scale land cover\ninformation. ecoregionMap layer must defined categorical\nraster, associated Raster Attribute Table (RAT; see, e.g.,\nraster::ratify). RAT must contain columns: ID (value \nraster layer), ecoregion (first level grouping) \necoregionGroup (full ecolocation “name” written \n). Note creating ecoregionGroup’s \ncombining two raster layers whose values numeric (\nBiomass_borealDataPrep), group label character combination two\nnumeric grouping levels. instance, Natural Ecoregion 2 \nland-cover types 1, 2 3, RAT contain ID = {1,2,3},\necoregion = {2} ecoregionGroup = {2_1, 2_2, 2_3}. However, user\nfree use groupings wish. Finally, note ecolocations\n(ecoregionGroup’s) listed ecoregion table.rasterToMatch – RasterLayer, given resolution projection\ndetermining pixels (.e., non-NA values) forest dynamics \nsimulated. Needs match studyArea. supplied, Biomass_core\nattempts produce studyArea, using biomassMap template\nspatial resolution projection.rasterToMatch – RasterLayer, given resolution projection\ndetermining pixels (.e., non-NA values) forest dynamics \nsimulated. Needs match studyArea. supplied, Biomass_core\nattempts produce studyArea, using biomassMap template\nspatial resolution projection.studyArea – SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input\nobject must supplied user another module.studyArea – SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input\nobject must supplied user another module.Species traits parameter tablesecoregion – data.table listing ecolocation “names”\n(ecoregionGroup column; see ecoregionMap details) \nstate (active – yes – inactive – )ecoregion – data.table listing ecolocation “names”\n(ecoregionGroup column; see ecoregionMap details) \nstate (active – yes – inactive – )minRelativeB – data.table minimum relative biomass values. See\nEcolocation-specific parameters – minimum relative\nbiomass.minRelativeB – data.table minimum relative biomass values. See\nEcolocation-specific parameters – minimum relative\nbiomass.species – data.table invariant species\ntraits.species – data.table invariant species\ntraits.speciesEcoregion – data.table spatio-temporally varying species\ntraits.speciesEcoregion – data.table spatio-temporally varying species\ntraits.sufficientLight – data.table defining probability germination\nspecies, given shadetolerance level (see species ) \nshade level pixel (see minRelativeB ). See Probabilities\ngermination.sufficientLight – data.table defining probability germination\nspecies, given shadetolerance level (see species ) \nshade level pixel (see minRelativeB ). See Probabilities\ngermination.sppEquiv – data.table species name equivalences various\nconventions. must contain columns LandR (species IDs LandR\nformat), EN_generic_short (short generic species names English – \nlanguage – used plotting), Type (type species, Conifer\nDeciduous, “broadleaf”) Leading (EN_generic_short\n“leading” appended – e.g., “Poplar\nleading”).\nSee ?LandR::sppEquivalencies_CA information.sppEquiv – data.table species name equivalences various\nconventions. must contain columns LandR (species IDs LandR\nformat), EN_generic_short (short generic species names English – \nlanguage – used plotting), Type (type species, Conifer\nDeciduous, “broadleaf”) Leading (EN_generic_short\n“leading” appended – e.g., “Poplar\nleading”).\nSee ?LandR::sppEquivalencies_CA information.sppColorVect – character. named vector colours used plot species\ndynamics. contain one colour per species species table ,\npotentially colour species mixtures (named “Mixed”). Vector names must\nfollow species$speciesCode.sppColorVect – character. named vector colours used plot species\ndynamics. contain one colour per species species table ,\npotentially colour species mixtures (named “Mixed”). Vector names must\nfollow species$speciesCode.sppNameVector – (OPTIONAL) character vector species simulated.\nprovided, Biomass_core uses vector (attempt ) obtain speciesLayers\nlisted species. provided, user (another module) can pass filtered sppEquiv table\n(.e., containing species simulated). neither provided,\nBiomass_core attempts use species finds available species\n% cover data study area.sppNameVector – (OPTIONAL) character vector species simulated.\nprovided, Biomass_core uses vector (attempt ) obtain speciesLayers\nlisted species. provided, user (another module) can pass filtered sppEquiv table\n(.e., containing species simulated). neither provided,\nBiomass_core attempts use species finds available species\n% cover data study area.Cohort-simulation-related objectscohortData – data.table containing initial cohort information per\npixelGroup (see pixelGroupMap ). table updated \nsimulation cohort dynamics simulated. must contain following\ncolumns:\npixelGroup – integer. pixelGroup ID. See\nHashing.\necoregionGroup – character. Ecolocation names. See ecoregionMap \necoregion objects .\nspeciesCode – character. Species ID.\nage – integer. Cohort age.\nB – integer. Cohort biomass current year \\(g/m^2\\).\nmortality – integer. Cohort dead biomass current year \n\\(g/m^2\\). Usually filled 0s initial conditions.\naNPPAct – integer. Actual aboveground net primary productivity \ncurrent year \\(g/m^2\\). B result previous year’s B\nminus current year’s mortality plus aNPPAct. Usually filled \n0s initial conditions. See “1.1.3 Cohort growth ageing” section\nScheller & Miranda (2015a).\ncohortData – data.table containing initial cohort information per\npixelGroup (see pixelGroupMap ). table updated \nsimulation cohort dynamics simulated. must contain following\ncolumns:pixelGroup – integer. pixelGroup ID. See\nHashing.pixelGroup – integer. pixelGroup ID. See\nHashing.ecoregionGroup – character. Ecolocation names. See ecoregionMap \necoregion objects .ecoregionGroup – character. Ecolocation names. See ecoregionMap \necoregion objects .speciesCode – character. Species ID.speciesCode – character. Species ID.age – integer. Cohort age.age – integer. Cohort age.B – integer. Cohort biomass current year \\(g/m^2\\).B – integer. Cohort biomass current year \\(g/m^2\\).mortality – integer. Cohort dead biomass current year \n\\(g/m^2\\). Usually filled 0s initial conditions.mortality – integer. Cohort dead biomass current year \n\\(g/m^2\\). Usually filled 0s initial conditions.aNPPAct – integer. Actual aboveground net primary productivity \ncurrent year \\(g/m^2\\). B result previous year’s B\nminus current year’s mortality plus aNPPAct. Usually filled \n0s initial conditions. See “1.1.3 Cohort growth ageing” section\nScheller & Miranda (2015a).aNPPAct – integer. Actual aboveground net primary productivity \ncurrent year \\(g/m^2\\). B result previous year’s B\nminus current year’s mortality plus aNPPAct. Usually filled \n0s initial conditions. See “1.1.3 Cohort growth ageing” section\nScheller & Miranda (2015a).pixelGroupMap – raster layer pixelGroup IDs per pixel. Pixels\nalways grouped based identical ecoregionGroup, speciesCode, age\nB composition, even user supplies initial groupings\n(e.g., possible Biomass_borealDataPrep data module).\npixelGroupMap – raster layer pixelGroup IDs per pixel. Pixels\nalways grouped based identical ecoregionGroup, speciesCode, age\nB composition, even user supplies initial groupings\n(e.g., possible Biomass_borealDataPrep data module).\n\nTable 6.5: List Biomass_core input objects description.\n","code":""},{"path":"landr-biomass_core-module.html","id":"params-list","chapter":"6 LandR Biomass_core Module","heading":"6.2.4 List of parameters","text":"addition inputs objects, Biomass_core uses several\nparameters7 control aspects like simulation length, \n“succession” time step, plotting saving intervals, amongst others. Note \nparameters relevant simulating climate effects \ncohort growth mortality, require also loading LandR.CS R\npackage8 (another similar package). discussed\ndetail , since climate effects calculated externally \nBiomass_core LandR.CS functions thus documented .list useful parameters description listed , \nfull set parameters Table 6.6. Like\ninput objects, default values supplied parameters \nsuggest user becomes familiarized attempting changes.\nalso note \"spin-\" \"biomassMap\" options \ninitialBiomassSource parameter currently deactivated, since Biomass_core\nlonger generates initial cohort biomass conditions using spin-based \ninitial stand age like LANDIS-II (\"spin-\"), attempt fill\ninitial cohort biomasses using biomassMap.Plotting saving - .plots – activates/deactivates plotting defines\ntype plotting (see ?Plots);.plotInitialTime – defines plotting starts;.plotInitialTime – defines plotting starts;.plotInterval – defines plotting frequency;.plotInterval – defines plotting frequency;.plotMaps – activates/deactivates map plotting;.plotMaps – activates/deactivates map plotting;.saveInitialTime – defines saving starts;.saveInitialTime – defines saving starts;.saveInterval – defines saving frequency;.saveInterval – defines saving frequency;SimulationseedingAlgorithm – dispersal type (see );seedingAlgorithm – dispersal type (see );successionTimestep – defines frequency dispersal/local recruitment\nevent (growth mortality always yearly);successionTimestep – defines frequency dispersal/local recruitment\nevent (growth mortality always yearly);\n- mixedType – mixed forest stands defined;vegLeadingProportion – relative biomass threshold consider species\n“leading” (.e., dominant);\nTable 6.6: List Biomass_core parameters description.\n","code":""},{"path":"landr-biomass_core-module.html","id":"outputs-list","chapter":"6 LandR Biomass_core Module","heading":"6.2.5 List of outputs","text":"main outputs Biomass_core cohortData pixelGroupMap\ncontaining cohort information per year (note saved \ndefault), visual outputs species level biomass, age dominance across \nlandscape simulation length, several maps stand biomass,\nmortality reproductive success (.e, new biomass) yearly basis.However, objects changed/output Biomass_core (listed Table\n6.7) can saved via outputs argument\nsimInit9.\nTable 6.7: List Biomass_core output objects description.\n","code":""},{"path":"landr-biomass_core-module.html","id":"sim-flow","chapter":"6 LandR Biomass_core Module","heading":"6.2.6 Simulation flow and module events","text":"Biomass_core simulate disturbances effect \nvegetation (.e., post-disturbance mortality regeneration). \ndisturbance post-disturbance mortality/regeneration modules used (e.g.,\nLandMine Biomass_regeneration), user make sure \npost-disturbance effects occur disturbance, dispersal\nbackground vegetation growth mortality (simulated Biomass_core).\nHence, disturbance take place either beginning \nend simulation time step guarantee happens\nimmediately post-disturbance effects calculated.general flow Biomass_core processes without disturbances :Preparation necessary objects simulation – either data \ncalibration modules Biomass_core (simInit \ninit event10);Preparation necessary objects simulation – either data \ncalibration modules Biomass_core (simInit \ninit event10);Disturbances (OPTIONAL) – simulated disturbance module (e.g.,\nLandMine);Disturbances (OPTIONAL) – simulated disturbance module (e.g.,\nLandMine);Post-disturbance mortality/regeneration (OPTIONAL) – simulated \nregeneration module (e.g., Biomass_regeneration);Post-disturbance mortality/regeneration (OPTIONAL) – simulated \nregeneration module (e.g., Biomass_regeneration);Seed dispersal (every successionTimestep; Dispersal event):Seed dispersal (every successionTimestep; Dispersal event):seed dispersal can slow process adapted occur every\n10 years (default successionTimestep). user can set occur\n/less often, caveat using Biomass_borealDataPrep\nestimate species establishment probabilities, values \nintegrated 10 years.see Scheller & Domingo (2012) details dispersal algorithms.Growth mortality (mortalityAndGrowth event):unlike dispersal, growth mortality always occur time step (year).see Scheller & Mladenoff (2004) detail.Cohort age binning (every successionTimestep; cohortAgeReclassification\nevent):follows frequency dispersal, collapsing cohorts (.e.,\nsumming biomass/mortality/aNPP) ages classes resolution\nequal successionTimestep.see Scheller & Miranda (2015a) detail.Summary tables regeneration (summaryRegen event), biomass, age, growth\nmortality (summaryBGM event);Summary tables regeneration (summaryRegen event), biomass, age, growth\nmortality (summaryBGM event);Plots maps (plotMaps event) averages (plotAvgs \nplotSummaryBySpecies events);Plots maps (plotMaps event) averages (plotAvgs \nplotSummaryBySpecies events);Save outputs (save event).Save outputs (save event).… (repeat 2-9) …","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse","chapter":"6 LandR Biomass_core Module","heading":"6.2.7 Differences between Biomass_core and the LANDIS-II Biomass Succession Extension model (LBSE)","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-algo","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.1 Algorithm changes","text":"Upon porting LBSE R, made six minor modifications original\nmodel’s algorithms better reflect ecological processes. \nsignificantly alter simulation outputs note changes might\nalso implemented recent versions LBSE.First, year community (.e., ‘pixel group’ Biomass_core, see\n), LBSE calculates competition index cohort sequentially (.e.,\none cohort time) updating growth mortality cohorts\n(.e., biomass gain loss, respectively) , calculation\nsequence following cohort age descending order, explicit order \nspecies. sorting growth mortality calculations oldest \nyoungest cohorts LBSE aimed capturing size-asymmetric competition\ncohorts, assumption older cohorts priority \ngrowing space given greater height (Scheller pers. comm.). felt \nwithin-year sequential growth, death recruitment may ecologically\naccurate, size-asymmetric competition accounted \ntwice, calculation competition index already considers \ncompetitive advantage older cohorts (shown User’s Guide, Scheller & Miranda 2015a). Hence, Biomass_core growth, mortality, recruitment\ncompetition index calculated time across cohorts \nspecies.Second, unknown species-level sorting mechanism contained within LBSE (\nchanged depending species order input species list file), led \ndifferent simulation results depending input species list file (e.g.,\nTable 6.8 Fig. 6.2). \ncalculation competition, growth mortality cohorts \ntime also circumvented issue.\nFigure 6.2: Differences total landscape aboveground biomass using two different input species orders community. simulations demonstrate sequential calculation competition index, combined lack explicit species ordering affect overall landscape aboveground biomass time using different input species orders (see Table 6.8). order prevent differences introduced cohort recruitment, species’ ages sexual maturity changed species’ longevity values, simulation ran 75 years prevent cohorts reaching sexual maturity. bottom panel shows difference two simulations percentage, calculated \\(\\frac{Biomass_{order2} - Biomass_{order1}}{Biomass_{order2}} * 100\\)\nThird, LBSE calculation total pixel biomass purpose \ncalculating initial biomass new cohort included (previously\ncalculated) biomass new cohorts succession time step = 1, \ntime step > 1. reflect documentation User’s\nGuide, stated “Bsum [total pixel biomass] current total\nbiomass site (including new cohorts)”\n(Scheller & Miranda 2015a), succession time step set 1.\nAdditionally, together lack explicit ordering, generated\ndifferent results terms biomass assigned new cohort (e.g.,\nTable 6.9 Fig. 6.3). \nBiomass_core initial biomass new cohorts longer calculated\nsequentially (competition, growth mortality), thus biomass\nnew cohorts never included calculation total pixel biomass.\nFigure 6.3: Differences biomass assigned new cohorts, summed species across pixels, using two different input species orders community succession time step 1. simulations demonstrate different summation total cohort biomass succession time step 1 lack explicit species ordering affect simulation results changing species order input file (see Table 6.9). , initial cohort ages also set 1. Values refer initial total biomass attributed species end year 1.\nFourth, LBSE, serotiny resprouting occur pixel\nfollowing fire, serotiny taking precedence activated. understand\nprovides advantage serotinous species, perhaps \ndisadvantaged respect fast-growing resprouters. However, feel \necologically realistic serotinous resprouter species able \nregenerate given pixel following fire allow competition\nserotinous resprouting species arise species traits. Note\nchange implemented Biomass_regeneration \nBiomass_regenerationPM modules, since post-disturbance effects separated\nbackground vegetation dynamics simulated Biomass_core.Fifth, Biomass_core, species shade tolerance values can decimal values\nallow finer adjustments -species competition.Sixth, added new parameter called minCohortBiomass, allows user\ncontrol cohort removal bellow certain threshold biomass. \nsimulation set-ups, noticed Biomass_core (LBSE) able \ngenerate many small cohorts understory , due cohort\ncompetition, able gain biomass grow. However, \ncompetition decreases growth increase mortality, cohorts\nsurvived low biomass levels reached sufficient age suffer\nage-related mortality. felt unlikely realistic many cases.\ndefault, parameter left 0 follow LBSE behaviour (.e., \ncohorts removal based minimum biomass).","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2 Other enhancements","text":"addition sixth changes growth, mortality regeneration mentioned\n, enhanced modularity separating components govern\nvegetation responses disturbances Biomass_core, implemented\nhashing, caching testing improve computational efficiency insure\nperformance.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan1","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.1 Modularity","text":"Unlike LBSE, post-disturbance effects part Biomass_core per\nse, belong two separate modules, used interchangeably\n(Biomass_regeneration\n\nBiomass_regenerationPM).\nneed loaded added “modules folder” project case\nuser wants simulate forest responses disturbances (fire\ndisturbances moment). , enables higher flexibility \nswapping different approaches regeneration.Climate effects growth mortality also implemented modular way. \neffects climate biomass increase (growth) loss (mortality) \nwritten functions grouped two packages. LandR R package contains\ndefault, “non-climate-sensitive” functions, LandR.CS R package\ncontains functions simulate climate effects (CS stands “climate\nsensitive”). Note functions simulate actual growth/mortality\nprocesses, estimate modifiers increase/decrease cohort biomass top\nbackground growth/mortality. Biomass_core uses LandR functions \ndefault (see growthAndMortalityDrivers parameter full parameters\nlist). user wish change climate effects \ngrowth/mortality calculated, can provide new compatible functions\n(.e., names, inputs outputs) via another R package.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan2","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.2 Hashing","text":"first strategy improve simulation efficiency Biomass_core use\nhashing mechanism (Yang et al. 2011). Instead assigning key pixel \nraster tracking simulation pixel lookup table, \nindexed pixels using pixelGroup key contained unique combinations \necolocation community composition (.e., species, age biomass\ncomposition), tracked stored simulation data pixelGroup (Fig.\n6.4). algorithm able ease computational\nburden significantly reducing size lookup table speeding-\nsimulation process. recruitment disturbance events, pixels \nrehashed new pixel groups.\nFigure 6.4: Hashing design Biomass_core. re-coded Biomass_core, pixel group map hashed based unique combination species composition (‘community map’) ecolocation map, associated lookup table. insert top-right corner original design linked map lookup table pixel key.\n","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan3","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.3 Caching","text":"second strategy aimed improving model efficacy implementation \ncaching data-driven parametrisation initialisation. Caching\nautomatically archives outputs given function disk (memory) reads\nback subsequent calls function given identical inputs. \ncaching operations achieved using reproducible R package\n(McIntire & Chubaty 2020).current version Biomass_core, spin-phase replaced \ndata-driven landscape initialisation many model parameters derived \ndata, using data calibration modules (e.g., Biomass_borealDataPrep). \navoid repeat data downloads treatment, statistical estimation \nparameters landscape initialisation every time simulation re-run\nconditions, many pre-simulation steps automatically\ncached. means pre-simulation phase significantly faster upon \nsecond call inputs changed (e.g., input data \nparametrisation methods), inputs change directly affected steps\nre-run (see main text examples). using data modules,\nBiomass_core still relies caching preparation theoretical\ninputs.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan4","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.4 Testing","text":"Finally, implemented code testing facilitate bug detection comparing\noutputs functions (etc.) expected outputs (Wickham 2011). built \nintegrated code tests Biomass_core across LandR modules \nLandR R package form assertions,\nunit tests integration tests. Assertions unit tests run\nautomatically simulations (can turned ) evaluate individual\ncode components (e.g., one function object’s class). Integration tests\nevaluate several coded processes integrated correctly usually run\nmanually. However, embedded assertions within module code, R\npackage dependencies Biomass_core, LandR R package\n SpaDES, also provide means test\nmodule integration. also implemented GitHub Actions continuous integration\n(CI), routinely test GitHub hosted packages (e.g., LandR) modules.\nCRAN-hosted packages (e.g., SpaDES) also automatically tested checked\nCRAN.Finally, Biomass_core (LandR modules) code hosted \npublic GitHub repositories, module code subject scrutiny \nmany users, can identify issues contribute improve module code.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-comparisons","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.3 Performance and accuracy of Biomass_core with respect to LBSE","text":"recoding Biomass_core, used integration tests ensured similar\noutputs demographic process (namely, growth, mortality recruitment)\noutputs counterpart LBSE. , report \ncomparisons overall simulation (.e., including demographic\nprocesses) LBSE Biomass_core using three randomly generated\ninitial communities (Tables\n6.10-6.12). remaining input\nparameters taken LANDIS-II training course (Tables\n6.13-6.16), contained species\nattributes information 16 common tree species boreal forests 2\necolocations. ran simulations 1000 years, succession time step \n10 three replicates, enough account variability\nproduced stochastic processes. Seed dispersal set “ward dispersal”.results suggested Biomass_core good agreement LBSE using\nthree randomly generated initial communities (Fig. 6.5),\nsmall deviations LBSE-generated biomasses. Notably, mean\ndifferences LBSE Biomass_core 0.03% (range:\n-0.01% ~ 0.13%), 0.03% (range:\n-0.01% ~ 0.11%) 0.05%\n(-0.02% ~ 0.15%) initial community,\nrespectively (right panels Fig. 6.5 appendix).\nFigure 6.5: Visual comparison simulation outputs three randomly generated initial communities (left panels) difference outputs (right panels). % difference LBSE Biomass_core calculated \\(\\frac{Biomass_{LBSE} - Biomass_{Biomass_core}}{Biomass_{LBSE}} * 100\\)\nexamine running time changed map size, ran simulations using maps\nincreasing number pixels, 22,201 638,401 pixels. maps \ninitialised single ecolocation 7 different communities. Simulations\nrun 120 years using succession time step 10 replicated three\ntimes. eliminate effect hardware running time, used machines\npurchased time, equal specifications running\nWindows 7. simulation ran 2 CPU threads total RAM 4000 Mb.LBSE Biomass_core, simulation time increased linearly number\npixels, increase rate smaller Biomass_core (Fig.\n6.6a). meant models similar\nsimulation efficiencies small maps (< 90,000 pixels), map size increased\nBiomass_core ~2 times faster LBSE (maps > 100,000 pixels; Fig.\n6.6a). Biomass_core also scaled better map size, \nLBSE speeds fluctuated 19 25 seconds per 1,000 pixels across map\nsizes, Biomass_core decreased 21 11 seconds per 1,000 pixels\nsmaller larger maps (Fig. 6.6b).\nFigure 6.6: Simulation efficiencies LBSE Biomass_core increasing map size, terms ) mean running time across repetitions (left y-axis) ratio LBSE Biomass_core running times (right y-axis blue line), b) running time scalability mean running time per 1000 pixels.\n","code":""},{"path":"landr-biomass_core-module.html","id":"example","chapter":"6 LandR Biomass_core Module","heading":"6.3 Usage example","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"example-libs","chapter":"6 LandR Biomass_core Module","heading":"6.3.1 Set up R libraries","text":"","code":"\noptions(repos = c(CRAN = \"https://cloud.r-project.org\"))\ntempDir <- tempdir()\n\npkgPath <- file.path(tempDir, \"packages\", version$platform, paste0(version$major,\n \".\", strsplit(version$minor, \"[.]\")[[1]][1]))\ndir.create(pkgPath, recursive = TRUE)\n.libPaths(pkgPath, include.site = FALSE)\n\nif (!require(Require, lib.loc = pkgPath)) {\n remotes::install_github(\"PredictiveEcology/Require@5c44205bf407f613f53546be652a438ef1248147\",\n upgrade = FALSE, force = TRUE)\n library(Require, lib.loc = pkgPath)\n}\n\nsetLinuxBinaryRepo()"},{"path":"landr-biomass_core-module.html","id":"example-pkg-mods","chapter":"6 LandR Biomass_core Module","heading":"6.3.2 Get the module and module dependencies","text":"can use SpaDES.project::getModule function download module \nmodule folder specified . Alternatively, see SpaDES-modules\nrepository see \ndownload SpaDES modules, fork/clone GitHub\nrepository directly.downloading module, important make sure module R package\ndependencies installed correct version.\nSpaDES.project::packagesInModules makes list necessary packages \nmodules paths$modulePath, Require installs .","code":"\nRequire(\"PredictiveEcology/SpaDES.project@6d7de6ee12fc967c7c60de44f1aa3b04e6eeb5db\",\n require = FALSE, upgrade = FALSE, standAlone = TRUE)\n\npaths <- list(inputPath = normPath(file.path(tempDir, \"inputs\")),\n cachePath = normPath(file.path(tempDir, \"cache\")), modulePath = normPath(file.path(tempDir,\n \"modules\")), outputPath = normPath(file.path(tempDir,\n \"outputs\")))\n\nSpaDES.project::getModule(modulePath = paths$modulePath, c(\"PredictiveEcology/Biomass_core@master\"),\n overwrite = TRUE)\n\n## make sure all necessary packages are installed:\nouts <- SpaDES.project::packagesInModules(modulePath = paths$modulePath)\nRequire(c(unname(unlist(outs)), \"SpaDES\"), require = FALSE, standAlone = TRUE)\n\n## load necessary packages\nRequire(c(\"SpaDES\", \"LandR\", \"reproducible\", \"pemisc\"), upgrade = FALSE,\n install = FALSE)"},{"path":"landr-biomass_core-module.html","id":"example-setupSim","chapter":"6 LandR Biomass_core Module","heading":"6.3.3 Setup simulation","text":"setup simulation random study area, using species within \nLandR::sppEquivalencies_CA table can found (Biomass_core \nretrieve species % cover maps filter present species). also\ndefine colour coding used plotting, type plots produce\nchoose output cohortData tables every year – note \npixel-based, “spatialise” results posteriori pixelBroupMap must\nalso saved.Please see lists input objects,\nparameters outputs information.","code":"\ntimes <- list(start = 0, end = 30)\n\nstudyArea <- Cache(randomStudyArea, size = 1e+07) # cache this so it creates a random one only once on a machine\n\n# Pick the species you want to work with – using the naming\n# convention in 'Boreal' column of\n# LandR::sppEquivalencies_CA\nspeciesNameConvention <- \"Boreal\"\nspeciesToUse <- c(\"Pice_Gla\", \"Popu_Tre\", \"Pinu_Con\")\n\nsppEquiv <- sppEquivalencies_CA[get(speciesNameConvention) %in%\n speciesToUse]\n# Assign a colour convention for graphics for each species\nsppColorVect <- sppColors(sppEquiv, speciesNameConvention, newVals = \"Mixed\",\n palette = \"Set1\")\n\n## Usage example\nmodules <- as.list(\"Biomass_core\")\nobjects <- list(studyArea = studyArea, sppEquiv = sppEquiv, sppColorVect = sppColorVect)\n\nsuccessionTimestep <- 10L\n\n## keep default values for most parameters (omitted from\n## this list)\nparameters <- list(Biomass_core = list(sppEquivCol = speciesNameConvention,\n successionTimestep = successionTimestep, .plots = c(\"screen\",\n \"object\"), .plotInitialTime = times$start, .plots = c(\"screen\",\n \"png\"), .saveInitialTime = times$start, .useCache = \"init\",\n .useParallel = FALSE))\n\noutputs <- data.frame(expand.grid(objectName = \"cohortData\",\n saveTime = unique(seq(times$start, times$end, by = 1)), eventPriority = 1,\n stringsAsFactors = FALSE))"},{"path":"landr-biomass_core-module.html","id":"example-runSim","chapter":"6 LandR Biomass_core Module","heading":"6.3.4 Run simulation","text":"simInitAndSpades wrapper function runs simInit (\ninitialises modules) spades (runs modules, .e., events),\npass necessary setup objects created ., pass useful reproducible options control caching (\"reproducible.useCache\")\ninputs downloaded (\"reproducible.destinationPath\").\nFigure 6.7: Biomass_core automatically generates simulation visuals species dynamics across landscape terms total biomass, number presences age productivity (), well yearly plots total biomass, productivity, mortality, reproduction leading species pixel ().\n","code":"\nopts <- options(reproducible.useCache = TRUE, reproducible.destinationPath = paths$inputPath,\n spades.useRequire = FALSE)\ngraphics.off()\nmySim <- simInitAndSpades(times = times, params = parameters,\n modules = modules, objects = objects, paths = paths, outputs = outputs,\n debug = TRUE)"},{"path":"landr-biomass_core-module.html","id":"appendix","chapter":"6 LandR Biomass_core Module","heading":"6.4 Appendix","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"appendix-tables","chapter":"6 LandR Biomass_core Module","heading":"6.4.1 Tables","text":"\nTable 6.8: Input order processing order (determined LBSE) community used assess impact sequential calculation competition index, combined lack explicit species ordering. input order order species initial communities table input file. processing order order used simulation, obtained Landis-log.txt CalibrateMode set ‘yes’. Species starting ages also shown.\n\nTable 6.9: Input order processing order (determined LBSE) community used assess impact setting succession time step 1, combined lack explicit species ordering. input order order species initial communities table input file. processing order order used simulation, obtained Landis-log.txt CalibrateMode set ‘yes’. Species starting ages also shown.\n\nTable 6.10: Randomly generated community combination . 1 used recruitment comparison runs.\n\nTable 6.11: Randomly generated community combination . 2 used recruitment comparison runs.\n\nTable 6.12: Randomly generated community combination . 3 used recruitment comparison runs.\n\nTable 6.13: Invariant species traits table used comparison runs.\n\nTable 6.14: Minimum relative biomass table used comparison runs. X0-5 represent site shade classes -shade (0) maximum shade (5). ecolocations shared values.\n\nTable 6.15: Probability germination species shade tolerance shade level combinations (called sufficient light table LBSE sufficientLight input data.table LandR Biomass_core) used comparison runs.\n\nTable 6.16: Species ecolocation table used comparison runs. SEP stands species establishment probability, maxB maximum biomass maxANPP maximum aboveground net primary productivity. Values held constant throughout simulation.\n","code":""},{"path":"landr-biomass_core-module.html","id":"refs","chapter":"6 LandR Biomass_core Module","heading":"6.5 References","text":"","code":""},{"path":"landr-biomass_regeneration-module.html","id":"landr-biomass_regeneration-module","chapter":"7 LandR Biomass_regeneration Module","heading":"7 LandR Biomass_regeneration Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/Biomass_regeneration/issues.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"authors-4","chapter":"7 LandR Biomass_regeneration Module","heading":"7.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Yong Luo yluo1@lakeheadu.ca [aut], Ceres Barros cbarros@mail.ubc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [ctb]\n","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-overview-4","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1 Module Overview","text":"","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-summary-2","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.1 Module summary","text":"Biomass_regeneration SpaDES module simulates post-disturbance regeneration mechanisms Biomass_core.\n, module mostly based post-disturbance regeneration mechanisms present LANDIS-II Biomass Succession v3.2.1 extension (see LANDIS-II Biomass Succession v3.2 User Guide Scheller Mladenoff (2004).\nmoment, Biomass_regeneration module simulates post-fire disturbance effects forest species, simulating post-fire mortality activating serotiny resprouting mechanisms species, depending traits (.e. ability resprout /germinate seeds, serotiny, following fire).\nPost-fire mortality behaves stand-replacing fashion, .e. pixel within fire perimeter (determined fire raster) cohorts see biomasses set 0.post-fire regeneration, module first evaluates whether species present prior fire serotinous.\n, species germinate depending light conditions shade tolerance, depending (seed) establishment probability (.e. germination success) pixel.\nmodule evaluates species present fire capable resprouting.\nmodel growth species depending, , light conditions shade tolerance, resprouting probability (.e. resprouting success).\ngiven species given pixel, serotiny resprouting can occur.\nHence, species capable resprout serotiny activated.LANDIS-II, resprouting never occur given pixel serotiny activated one species.\nAccording manual:serotiny (possible immediately following fire) triggered one species, neither resprouting seeding occur.\nSerotiny given precedence resprouting typically higher threshold success resprouting.\nslightly favors serotinous species mixed species able resprout following fire.(LANDIS-II Biomass Succession v3.2 User Guide)longer case Biomass_regeneration, serotinity resprouting can occur pixel, although species.\nfeel realistic ecologically, resprouters typically regenerate faster fire, often shading serotinous species creating interesting successional feedbacks (e.g. light-loving serotinous species “wait” canopy gaps germinate).","code":""},{"path":"landr-biomass_regeneration-module.html","id":"general-flow-of-biomass_regeneration-processes---fire-disturbances-only","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.2 General flow of Biomass_regeneration processes - fire disturbances only","text":"Removal biomass disturbed, .e. burnt, pixelsActivation serotiny serotinous species present fireActivation resprouting resprouter species present fire serotiny activatedEstablishment/growth species serotiny resprouting activated","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-inputs-and-parameters","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.3 Module inputs and parameters","text":"Table 7.1 shows full list module inputs.Table 7.1: List Biomass_regeneration input objects description.Summary user-visible parameters (Table 7.2):Table 7.2: List Biomass_regeneration parameters description.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-outputs-1","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.4 Module outputs","text":"Description module outputs (Table 7.3).Table 7.3: List Biomass_regeneration outputs description.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"links-to-other-modules-2","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.5 Links to other modules","text":"Primarily used LandR Biomass suite modules, namely Biomass_core.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"getting-help-2","chapter":"7 LandR Biomass_regeneration Module","heading":"7.2 Getting help","text":"https://gitter.im/PredictiveEcology/LandR_Biomass\n## References\n","code":""},{"path":"wildfire-submodel.html","id":"wildfire-submodel","chapter":"Wildfire submodel","heading":"Wildfire submodel","text":"Lorem ipsum … (TODO)","code":""},{"path":"landmine-module.html","id":"landmine-module","chapter":"8 LandMine Module","heading":"8 LandMine Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/LandMine/issues.","code":""},{"path":"landmine-module.html","id":"authors-5","chapter":"8 LandMine Module","heading":"8.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [ctb, cre]\n","code":""},{"path":"landmine-module.html","id":"module-overview-5","chapter":"8 LandMine Module","heading":"8.1 Module Overview","text":"","code":""},{"path":"landmine-module.html","id":"module-summary-3","chapter":"8 LandMine Module","heading":"8.1.1 Module summary","text":"Landmine model created simulating natural range variation landscapes boreal forest (Andison 1996; Andison 1998).\nwidely used public private sector various purposes.\nSpaDES module rewrite fire component native R.","code":""},{"path":"landmine-module.html","id":"model-differences","chapter":"8 LandMine Module","heading":"8.1.2 Model Differences","text":"current version yet fully tested compared original version, currently several known differences:Fire sizes taken Truncated Pareto distribution, resulting numerous small fires, large fires;Parameters fitted landscapes study LandWeb project.","code":""},{"path":"landmine-module.html","id":"known-species","chapter":"8 LandMine Module","heading":"8.1.3 Known Species","text":"Landmine requires following codes inputs (genus species codes ), converts groups species follows.\nspecies groups Rate Spread (ROS) fire spreading:Table 8.1: LandMine species codes.","code":""},{"path":"landmine-module.html","id":"module-inputs-and-parameters-1","chapter":"8 LandMine Module","heading":"8.1.4 Module inputs and parameters","text":"Table 8.2 shows full list module inputs.Table 8.2: List LandMine input objects description.Summary user-visible parameters (Table 8.3).Table 8.3: List LandMine parameters description.","code":""},{"path":"landmine-module.html","id":"module-outputs-2","chapter":"8 LandMine Module","heading":"8.1.5 Module outputs","text":"Description module outputs (Table 8.4).Table 8.4: List LandMine outputs description.","code":""},{"path":"landmine-module.html","id":"usage","chapter":"8 LandMine Module","heading":"8.2 Usage","text":"run Landmine module alone (.e., fitting), following work (iff raster inputs studyArea rasterToMatch available), assuming R packages available.NB: Paths changed different user.","code":""},{"path":"landmine-module.html","id":"package-dependencies","chapter":"8 LandMine Module","heading":"8.2.1 Package dependencies","text":"determine packages used LandMine, use:","code":"\nSpaDES.core::packages(modules = \"LandMine\", paths = \"..\")[[1]]## [1] \"SpaDES.core\" \n## [2] \"assertthat\" \n## [3] \"data.table\" \n## [4] \"fasterize\" \n## [5] \"fpCompare\" \n## [6] \"ggplot2\" \n## [7] \"ggspatial\" \n## [8] \"grDevices\" \n## [9] \"gridExtra\" \n## [10] \"magrittr\" \n## [11] \"PredictiveEcology/LandR@development (>= 1.1.0.9003)\" \n## [12] \"PredictiveEcology/LandWebUtils@development (>= 1.0.2)\"\n## [13] \"PredictiveEcology/pemisc@development\" \n## [14] \"PredictiveEcology/SpaDES.tools@development\" \n## [15] \"quickPlot\" \n## [16] \"raster\" \n## [17] \"RColorBrewer\" \n## [18] \"stats\" \n## [19] \"VGAM\""},{"path":"landmine-module.html","id":"module-usage","chapter":"8 LandMine Module","heading":"8.2.2 Module usage","text":"First, define study area create template raster.Next, set simulation run 13 timesteps using default module parameters.","code":"\nstudyArea <- SpaDES.tools::randomStudyArea(seed = 1234, size = 1e+10)\nrasterToMatch <- raster(studyArea, res = 250)times <- list(start = 0, end = 13)\n\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) parameters\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) <-\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) list(#\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) LandMine\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) =\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) list(flushCachedRandomFRI\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) =\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) TRUE)\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) )\n\nmodules <- list(\"LandMine\")\n\nobjects <- list(studyArea = studyArea, rasterToMatch = rasterToMatch)\n\npaths <- list(cachePath = cacheDir, modulePath = moduleDir, inputPath = inputDir,\n outputPath = outputDir)\nmySim <- simInit(times = times, params = parameters, modules = modules,\n objects = objects, paths = paths)\n\ndev()\nmySimOut <- spades(mySim, .plotInitialTime = times$start, debug = TRUE)"},{"path":"landmine-module.html","id":"testing-the-burn-algorithm","chapter":"8 LandMine Module","heading":"8.3 Testing the burn algorithm","text":"","code":"\nRequire(c(\"data.table\", \"DEoptim\", \"parallel\", \"SDMTools\"))\n\ns <- simInit(times = times, params = parameters, modules = modules,\n objects = objects, paths = paths)"},{"path":"landmine-module.html","id":"optimizing-parameters","chapter":"8 LandMine Module","heading":"8.4 Optimizing parameters","text":"following code chunk tries find values spawnNewActive creates “reasonable” fire shapes sizes.","code":"\npixelSize <- 250\nros <- raster(extent(0, pixelSize * 1000, 0, pixelSize * 1000),\n res = pixelSize, vals = 0)\nros <- ros == 0\nfireSize <- 1e+05\n\nmaxRetriesPerID <- 4 ## 4 retries (5 attempts total)\nspreadProb <- 0.9\nspawnNewActive <- c(0.46, 0.2, 0.26, 0.11)\nsizeCutoffs <- c(8000, 20000)\n\nNineCorners <- cellFromRowCol(ros, row = nrow(ros)/4 * rep(1:3,\n 3), col = ncol(ros)/4 * rep(1:3, each = 3))\n\ncentreCell <- cellFromRowCol(ros, row = nrow(ros)/2, col = ncol(ros)/2)\n\n## Set variables\nobjs <- c(\"ros\", \"centreCell\", \"fireSize\", \"spawnNewActive\",\n \"sizeCutoffs\", \"spreadProb\")\npkgs <- c(\"data.table\", \"LandWebUtils\", \"raster\", \"SDMTools\",\n \"SpaDES.tools\")\n### SET UP CLUSTER FOR PARALLEL\nwantParallel <- TRUE\n\n## numCores should be >= 70 and needs to be multiple of number of params to be fit (7)\nnumCores <- (parallelly::availableCores(constraints = c(\"connections\")) %/% 7) * 7\n\nmachineName <- strsplit(Sys.info()[\"nodename\"], \"[.]\")[[1]][1]\n\nclNames <- switch(machineName,\n pinus = c(\n ## TODO: ssh cluster not yet working\n rep(\"localhost\", 0),\n rep(\"picea.for-cast.ca\", 20),\n rep(\"pseudotsuga.for-cast.ca\", 82)\n ),\n picea = rep(\"localhost\", numCores),\n rep(\"localhost\", numCores))\n\nif (wantParallel) {\n cl <- landmine_optim_clusterSetup(nodes = clNames)\n} else {\n cl <- NULL\n}\n\nif (!inherits(cl[[1]], \"forknode\")) {\n landmine_optim_clusterExport(cl, objs = objs, pkgs = pkgs)\n}"},{"path":"landmine-module.html","id":"visual-examination","chapter":"8 LandMine Module","heading":"8.4.1 Visual examination","text":"","code":"\nopt_sn <- DEoptim(landmine_optim_fitSN, lower = c(-2, -3, -3,\n -3, 1, 3.5, 0.75), upper = c(-0.1, -0.5, -0.5, -1, 3.5, 5,\n 1), control = DEoptim.control(VTR = 0.001, NP = as.integer(length(clNames)),\n itermax = 200, cluster = cl, strategy = 6), ros = ros, centreCell = centreCell,\n fireSizes = c(10, 100, 1000, 10000, 1e+05), desiredPerimeterArea = 0.003)\n\nopt_sn$optim$bestmem ## best param values\n\n## assign with suffix to facilitate multiple DEoptim runs\noptimParams <- data.frame(date = format(Sys.time(), \"%Y-%m-%d\"),\n pixelSize = pixelSize) |>\n cbind(rbind(opt_sn$optim$bestmem))\n\nfDEoptim <- file.path(moduleDir, \"LandMine\", \"data\", \"LandMine_DEoptim_params.csv\")\nprevVals <- read.csv(fDEoptim)\nwrite.csv(rbind(prevVals, optimParams), fDEoptim, row.names = FALSE)\n\nparallel::stopCluster(cl)\ncl <- NULL\nfs_sn <- c(10, 100, 1000, 10000, 1e+05)\nfit_sn <- landmine_optim_fitSN(sna = c(-1, -1, -1, -2, 2, 4,\n 0.9), ros = ros, centreCell = centreCell, fireSizes = fs_sn,\n desiredPerimeterArea = 0.003)\nbfs1_sn <- purrr::transpose(attr(fit_sn, \"bfs1\"))\nLM_sn <- do.call(rbind, bfs1_sn$LM)\nplot(log10(fs_sn), LM_sn[, \"perim.area.ratio\"]) ## NOTE: visual inspection - not too round; not too sinuous"},{"path":"landmine-module.html","id":"alternate-optimization","chapter":"8 LandMine Module","heading":"8.5 Alternate optimization","text":"second (alternative) version tries optimization using fewer parameters, test whether simpler version gets better/different results.\nAlthough version used final module, preserve posterity.","code":"\nfs_optim2 <- c(0.2, 1:8) * 10000\nopt_sn2 <- DEoptim(landmine_optim_fitSN2, lower = c(1, -1, 1,\n 3, 4), upper = c(3, -0.3, 3, 4, 5), control = DEoptim.control(VTR = 0.001,\n itermax = 40, cluster = cl, strategy = 6), ros = ros, centreCell = centreCell,\n fireSizes = fs_optim2, desiredPerimeterArea = 0.003)"},{"path":"landmine-module.html","id":"visual-examination-1","chapter":"8 LandMine Module","heading":"8.5.1 Visual examination","text":"","code":"\nfs_sn2 <- round(runif(10, 10, 4000))\nfit_sn2 <- landmine_optim_fitSN2(par = c(2, -0.63333, 1, 3.2,\n 4.4), ros = ros, centreCell = centreCell, fireSizes = fs_sn2,\n desiredPerimeterArea = 0.003, spreadProb = 0.9)\nbfs1_sn2 <- purrr::transpose(attr(fit_sn2, \"bfs1\"))\nLM_sn2 <- do.call(rbind, bfs1_sn2$LM)\nplot(log10(fs_sn2), LM_sn2[, \"perim.area.ratio\"]) ## NOTE: visual inspection - not too round; not too sinuous"},{"path":"landmine-module.html","id":"manual-inspection-of-optimization-results","chapter":"8 LandMine Module","heading":"8.6 Manual inspection of optimization results","text":"","code":""},{"path":"landmine-module.html","id":"original-2018-version","chapter":"8 LandMine Module","heading":"8.6.1 Original (2018) version","text":"original version run using 100m pixels, despite simulations run using 250m pixels.\ncorrected rerun .","code":"\n## 10,000 hectares burns gave this\nspawnNewActive[2:3] <- c(0.0235999945606232, 0.0263073265505955)\n\n# 100,000 hectare burns gave this spawnNewActive <-\n# 10^c(-1.264780, -1.970946, -1.288213, -2.202580)\nspawnNewActive <- 10^c(-0.586503645288758, -1.08108837273903,\n -2.14391896536108, -1.00221184641123)\nsizeCutoffs <- 10^c(3.37711253212765, 4.52040993282571)\n\nsns <- c(-1.733262, -0.933318, -2.562183, -2.493687, 3.064458,\n 4.812305)\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^sns[5:6]\n# spawnNewActive <- 10^c(-1.646419, -1.815395, -2.809013,\n# -2.613337) sizeCutoffs <- 10^c(3.888317, 4.641961)\n\n## 100,000 pixel fires -- the next worked, but I think we\n## can get better sns <- structure(\n## c(-1.652459,-0.962121,-0.964879,-2.304902, 3.522345,\n## 4.173242), .Names = c('par1',\nsns <- structure(c(-1.641197, -1.152821, -0.697335, -1.751917,\n 3.720378, 4.034059), .Names = c(\"par1\", \"par2\", \"par3\", \"par4\",\n \"par5\", \"par6\"))\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^(sns[5:6])\nfireSize <- 30000\n\n## 100\nsns <- c(-0.77716149196811, -0.769325340166688, -1.2772046867758,\n -1.99332102853805, 3.14260408212431, 4.46155184064992)\n\n## 1000\nsns <- c(-0.775107, -1.03176, -0.599669, -1.958105, 3.048958,\n 4.275831)\n\n## seemed good for 100,000, pretty good for 1e3\nsns <- c(-1.54885, -0.97052, -1.38305, -1.93759, 3.20379, 4.13237)\n\n## good for 100 000, 10 000 ha -- too sinuous for 1000 and\n## 100 ha\nsns <- c(-1.537203, -1.462981, -0.524957, -1.002567, 3.642046,\n 4.501754)\n\n## good for 100 000, 10 000 ha (except some fires @ 1e5\n## don't make it to full size) -- too sinuous for smaller\nsns <- c(-1.484338, -1.22044, -2.948275, -2.15594, 3.945281,\n 4.904893)\n\nsns <- c(-1.495247, -0.800494, -1.58235, -2.270646, 3.530671,\n 4.663245)\n\n## final optimization after 75 iterations, Good: 1e5, 1e4\nsns <- c(-1.47809, -0.86224, -1.34532, -1.93568, 3.27149, 4.20741)\n\n## based on equal weights 10^(1:5)\nsns <- c(-0.923528, -1.804549, -1.760455, -1.793594, 1.683355,\n 4.466668)\n\n## With spreadProb = 0.9 # Pretty GOOD!\nsns <- c(-0.73152, -0.501823, -0.605968, -1.809726, 2.202732,\n 4.69606, 0.9) ## used in module\noptimParams <- data.frame(date = \"2018-05-18\", pixelSize = 100) |>\n cbind(rbind(sns))\nwrite.csv(optimParams, fDEoptim, row.names = FALSE)\n\n## With spreadProb = 0.9 # Optimal\nsns <- c(-0.978947, -0.540946, -0.790736, -1.583039, 2.532013,\n 4.267547, 0.94673)\n\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^(sns[5:6])\nif (length(sns) == 7) spreadProb <- sns[7]\n\n# from linear model version\npar <- c(1.548899, -0.396904, 2.191424, 3.903082, 4.854002)\nsizeCutoffs <- 10^c(par[4], par[5])\nsna <- min(-0.15, par[1] + par[2] * log10(fireSize))\nsna <- 10^c(sna * par[3], sna * 2 * par[3], sna * 3 * par[3],\n sna * 4 * par[3])\nspawnNewActive <- sna\n\n###########################\nclearPlot()\ndev()\n\nfor (i in 1:5) {\n fireSize <- 10^i\n dim <- round(sqrt(fireSize) * 5 * 250)\n ros <- raster(extent(0, dim, 0, dim), res = 250, vals = 1)\n centreCell <- cellFromRowCol(ros, rownr = nrow(ros)/2, colnr = ncol(ros)/2)\n reps <- paste0(\"rep\", 1:4 + (log10(fireSize) - 1) * 4)\n burnedMapList <- landmine_optim_clusterWrap(cl = cl, nodes = clNames,\n reps = reps, objs = objs, pkgs = pkgs)\n names(burnedMapList$out) <- reps\n burnedMapList <- purrr::transpose(burnedMapList$out)\n cl <- burnedMapList$cl\n do.call(rbind, burnedMapList$LM)\n\n Plot(burnedMapList$burnedMap, cols = c(\"red\"), new = FALSE,\n na.color = \"white\", legend = FALSE, visualSqueeze = 0.7,\n title = paste0(\"Fire size: \", fireSize))\n}\nreps <- paste0(\"rep\", 1:1)\nperims <- list()\nperm <- list()\nmod <- list()\ndev()\nclearPlot()\nfireSizes <- 10^(4)\n\nfor (fs in fireSizes) {\n for (i in 1:1) {\n ros <- raster(extent(0, 2e+05, 0, 2e+05), res = 250,\n vals = 1)\n NineCorners <- cellFromRowCol(ros, rownr = nrow(ros)/4 *\n rep(1:3, 3), colnr = ncol(ros)/4 * rep(1:3, each = 3))\n centreCell <- NineCorners\n ran <- runif(4, -3, -1)\n spawnNewActive <- 10^ran\n # spawnNewActive <- 10^c(-0.1, -0.75, -1.2,\n # ran*2.5)\n fireSize = rep(fs, length(centreCell))\n sizeCutoffs <- 10^c(1, 3)\n burnedMapList <- landmine_optim_clusterWrap(cl = cl,\n nodes = clNames, reps = reps, objs = objs, pkgs = pkgs)\n names(burnedMapList$out) <- reps\n burnedMapList <- purrr::transpose(burnedMapList$out)\n cl <- burnedMapList$cl\n do.call(rbind, burnedMapList$LM)\n Plot(burnedMapList$burnedMap, new = TRUE, zero.color = \"white\")\n perims[[i]] <- data.frame(perim = burnedMapList$LM$rep1$perim.area.ratio,\n spawnNewActive = mean(spawnNewActive), others = t(spawnNewActive))\n }\n fsChar <- as.character(fs)\n perm[[fsChar]] <- rbindlist(perims)\n perm[[fsChar]]$perim <- log10(perm[[fsChar]]$perim)\n perm[[fsChar]]$spawnNewActive <- perm[[fsChar]]$spawnNewActive\n Plot(perm[[fsChar]]$perim, perm[[fsChar]]$spawnNewActive,\n new = TRUE, addTo = paste0(\"fs\", fsChar))\n mod[[fsChar]] <- lm(spawnNewActive ~ perim, data = perm[[fsChar]])\n}\n\n(predict(mod[[\"10\"]], data.frame(perim = log10(0.003))))\n(predict(mod[[\"100\"]], data.frame(perim = log10(0.003))))\nlog10(predict(mod[[\"1000\"]], data.frame(perim = log10(0.003))))"},{"path":"landmine-module.html","id":"current-2022-version","chapter":"8 LandMine Module","heading":"8.6.2 Current (2022) version","text":"original version run using 100m pixels, despite simulations run using 250m pixels.\nversion uses 250m pixels.","code":"\n## final optimization after 200 iterations\n## (landmine_optim_fitSN)\noptimParams <- read.csv(fDEoptim)\nsns <- optimParams[, grepl(\"^par\", colnames(optimParams))] |>\n tail(1) ## take last row\n\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^(sns[5:6])\nspreadProb <- sns[7]\n\n## from linear model version\npar <- c(1.548899, -0.396904, 2.191424, 3.903082, 4.854002)\nsizeCutoffs <- 10^c(par[4], par[5])\nsna <- min(-0.15, par[1] + par[2] * log10(fireSize))\nsna <- 10^c(sna * par[3], sna * 2 * par[3], sna * 3 * par[3],\n sna * 4 * par[3])\nspawnNewActive <- sna\n\nclearPlot()\n\nfor (i in 1:5) {\n fireSize <- 10^i\n dim <- round(sqrt(fireSize) * 5 * 250)\n ros <- raster(extent(0, dim, 0, dim), res = 250, vals = 1)\n centreCell <- cellFromRowCol(ros, row = nrow(ros)/2, col = ncol(ros)/2)\n reps <- paste0(\"rep\", 1:4 + (log10(fireSize) - 1) * 4)\n burnedMapList <- landmine_optim_clusterWrap(cl = cl, nodes = clNames,\n reps = reps, objs = objs, pkgs = pkgs)\n names(burnedMapList$out) <- reps\n burnedMapList <- purrr::transpose(burnedMapList$out)\n cl <- burnedMapList$cl\n do.call(rbind, burnedMapList$LM)\n\n Plot(burnedMapList$burnedMap, cols = c(\"red\"), new = FALSE,\n na.color = \"white\", legend = FALSE, visualSqueeze = 0.7,\n title = paste0(\"Fire size: \", fireSize))\n}"},{"path":"landmine-module.html","id":"cleaning-up","chapter":"8 LandMine Module","heading":"8.6.3 Cleaning up","text":"","code":"\nparallel::stopCluster(cl)\nunlink(cacheDir, recursive = TRUE)"},{"path":"landmine-module.html","id":"code-and-data-availability","chapter":"8 LandMine Module","heading":"8.6.4 Code and data availability","text":"Code available https://github.com/PredictiveEcology/LandMine.","code":""},{"path":"landmine-module.html","id":"links-to-other-modules-3","chapter":"8 LandMine Module","heading":"8.6.5 Links to other modules","text":"Originally developed part LandWeb project.\n## References\n","code":""},{"path":"model-outputs.html","id":"model-outputs","chapter":"Model outputs","heading":"Model outputs","text":"burnSummaries module … (TODO)LandMine module … (TODO)LandWeb_outputs module … (TODO)LandWeb_summary module … (TODO)timeSinceFire module … (TODO)Previously-run model outputs available download authorized users, described .","code":""},{"path":"model-outputs.html","id":"currently-selected-spatial-area","chapter":"Model outputs","heading":"8.7 Currently Selected Spatial Area","text":"Currently selected reporting polygon (.shp)","code":""},{"path":"model-outputs.html","id":"large-patches-data-for-study-region","chapter":"Model outputs","heading":"8.8 Large Patches Data for study region","text":"Large Patches Data (.csv)Large patches histograms (.png)","code":""},{"path":"model-outputs.html","id":"leading-vegetation-cover-data-for-study-region","chapter":"Model outputs","heading":"8.9 Leading Vegetation Cover Data for study region","text":"Leading Vegetation Cover Data (.csv)Leading Vegetation Cover histograms (.png)Leading Vegetation Cover boxplots (.png)","code":""},{"path":"model-outputs.html","id":"simulation-rasters-cropped-to-study-region","chapter":"Model outputs","heading":"8.10 Simulation Rasters (cropped to study region)","text":"Flammability maps (.grd)Time Since Fire maps (.tif)Vegetation type maps (.grd, .tif)","code":""},{"path":"model-outputs.html","id":"additional-r-data-files-advanced-users","chapter":"Model outputs","heading":"8.11 Additional R Data Files (advanced users)","text":"Simulation data files (.RData, .rds)downloaded outputs bundled zip file (e.g., LandWeb_v2.0.0_2019-09-23.zip) following directory file structure:","code":"LandWeb_v2.0.0_2019-09-23/\n |_ boxplots/\n |_ leading_*.csv\n |_ histograms/\n |_ largePatches/\n |_ 100/\n |_ 500/\n |_ 1000/\n |_ 5000/\n |_ leading/\n |_ largePatches_*.csv\n |_ polygons/\n |_ rasters/\n |_ rstTimeSinceFire_*.tif\n |_ vegTypeMap_*.tif*\n |_ INFO.md\n |_ README.md\n |_ simulationOutput_*.rds"},{"path":"burnsummaries-module.html","id":"burnsummaries-module","chapter":"9 burnSummaries Module","heading":"9 burnSummaries Module","text":"","code":""},{"path":"burnsummaries-module.html","id":"authors-6","chapter":"9 burnSummaries Module","heading":"9.0.0.1 Authors:","text":"Alex M Chubaty achubaty@-cast.ca [aut, cre] (https://orcid.org/0000-0001-7146-8135)\n","code":""},{"path":"burnsummaries-module.html","id":"module-overview-6","chapter":"9 burnSummaries Module","heading":"9.1 Module Overview","text":"","code":""},{"path":"burnsummaries-module.html","id":"module-summary-4","chapter":"9 burnSummaries Module","heading":"9.1.1 Module summary","text":"Provide brief summary module / use module.Module documentation written others can use module.\ntemplate module documentation, changed reflect module.","code":""},{"path":"burnsummaries-module.html","id":"module-inputs-and-parameters-2","chapter":"9 burnSummaries Module","heading":"9.1.2 Module inputs and parameters","text":"Describe input data required module obtain (e.g., directly online sources supplied modules)\nsourceURL specified, downloadData(\"burnSummaries\", \"..\") may sufficient.\nTable 9.1 shows full list module inputs.Table 9.1: List burnSummaries input objects description.Provide summary user-visible parameters (Table 9.2)Table 9.2: List burnSummaries parameters description.","code":""},{"path":"burnsummaries-module.html","id":"events-1","chapter":"9 burnSummaries Module","heading":"9.1.3 Events","text":"Describe happens event type.","code":""},{"path":"burnsummaries-module.html","id":"plotting","chapter":"9 burnSummaries Module","heading":"9.1.4 Plotting","text":"Write plotted.","code":""},{"path":"burnsummaries-module.html","id":"saving","chapter":"9 burnSummaries Module","heading":"9.1.5 Saving","text":"Write saved.","code":""},{"path":"burnsummaries-module.html","id":"module-outputs-3","chapter":"9 burnSummaries Module","heading":"9.1.6 Module outputs","text":"Description module outputs (Table 9.3).Table 9.3: List burnSummaries outputs description.","code":""},{"path":"burnsummaries-module.html","id":"links-to-other-modules-4","chapter":"9 burnSummaries Module","heading":"9.1.7 Links to other modules","text":"Describe anticipated linkages modules, modules supply input data post-hoc analysis.","code":""},{"path":"burnsummaries-module.html","id":"getting-help-3","chapter":"9 burnSummaries Module","heading":"9.1.8 Getting help","text":"provide way people obtain help (e.g., module repository issues page)\n## References\n","code":""},{"path":"landweb_output-module.html","id":"landweb_output-module","chapter":"10 LandWeb_output Module","heading":"10 LandWeb_output Module","text":"","code":""},{"path":"landweb_output-module.html","id":"authors-7","chapter":"10 LandWeb_output Module","heading":"10.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Yong Luo yluo1@lakeheadu.ca [aut], Alex M. Chubaty achubaty@-cast.ca [ctb]\n","code":""},{"path":"landweb_output-module.html","id":"module-overview-7","chapter":"10 LandWeb_output Module","heading":"10.1 Module Overview","text":"","code":""},{"path":"landweb_output-module.html","id":"module-summary-5","chapter":"10 LandWeb_output Module","heading":"10.1.1 Module summary","text":"module saves LandR Biomass outputs use LandWeb post-processing.","code":""},{"path":"landweb_output-module.html","id":"module-inputs-and-parameters-3","chapter":"10 LandWeb_output Module","heading":"10.1.2 Module inputs and parameters","text":"Table 10.1 shows full list module inputs.Table 10.1: List LandWeb_output input objects description.Provide summary user-visible parameters (Table 10.2)Table 10.2: List LandWeb_output parameters description.","code":""},{"path":"landweb_output-module.html","id":"module-outputs-4","chapter":"10 LandWeb_output Module","heading":"10.1.3 Module outputs","text":"Description module outputs (Table 10.3).Table 10.3: List LandWeb_output outputs description.","code":""},{"path":"landweb_output-module.html","id":"links-to-other-modules-5","chapter":"10 LandWeb_output Module","heading":"10.1.4 Links to other modules","text":"Originally developed part LandWeb project.","code":""},{"path":"landweb_output-module.html","id":"getting-help-4","chapter":"10 LandWeb_output Module","heading":"10.1.5 Getting help","text":"https://github.com/fRI-Research/LandWeb_output/issues\n## References\n","code":""},{"path":"timesincefire-module.html","id":"timesincefire-module","chapter":"11 timeSinceFire Module","heading":"11 timeSinceFire Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/fRI-Research/timeSinceFire/issues.","code":""},{"path":"timesincefire-module.html","id":"authors-8","chapter":"11 timeSinceFire Module","heading":"11.0.0.1 Authors:","text":"Steve G Cumming stevec@sbf.ulaval.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [ctb]\n","code":""},{"path":"timesincefire-module.html","id":"module-overview-8","chapter":"11 timeSinceFire Module","heading":"11.1 Module Overview","text":"","code":""},{"path":"timesincefire-module.html","id":"module-summary-6","chapter":"11 timeSinceFire Module","heading":"11.1.1 Module summary","text":"Yet Another Age Map Maintainer.\none peculiar LandWeb application.ageMap incremented without bound flammable cells;\ncells identified burned current year set 0.statistics age structure calculated , none yet implemented…current fire model pretty boring.","code":""},{"path":"timesincefire-module.html","id":"module-inputs-and-parameters-4","chapter":"11 timeSinceFire Module","heading":"11.1.2 Module inputs and parameters","text":"Table 11.1 shows full list module inputs.Table 11.1: List timeSinceFire input objects description.summary user-visible parameters provided Table 11.2.Table 11.2: List timeSinceFire parameters description.","code":""},{"path":"timesincefire-module.html","id":"events-2","chapter":"11 timeSinceFire Module","heading":"11.1.3 Events","text":"","code":""},{"path":"timesincefire-module.html","id":"init","chapter":"11 timeSinceFire Module","heading":"11.1.3.1 Init","text":"Init event creates RasterLayer rstTimeSinceFire.\n, rasterizes template vegetation map LCC05 using FireReturnInterval field SpatialPoygonDataFrame shpStudyRegion.\nprocedure retains NAs mask actual study region within template bounding rectangle., RasterLayer rstFlammable used mask areas open water, rock, etc can’t burn thus timeSinceFire applicable.\nbecome NAs rstTimeSinceFire.results flammable cells within polygon shapefile set fire return interval specified polygon / ecoregion.\nbasic van Wagner model implemented, expected landscape mean age.\necoregion age structure equilibrate exponential distribution within multiples return interval.colour ramp legend created layer.short term, initial uniform age distribution result high proportions cells TSFs greater return interval.\nbecomes problem, one initialize regional median age.\ncan done multiplying FireReturnInterval \\(log(2)\\) rounding; lower quantile chosen: see wikipedia page general quantile function.Alternatively, random exponential age structure generated ecoregion current rstTimeSinceFire, roughly follows.\nSee wiki page details possible alternative methods.","code":"\nU_ <- runif(ncell(rstTimeSinceFire))\nT_ <- (-log(U_)) * rstTimeSinceFire[]\nrstTimeSinceFire[] <- round(T_)"},{"path":"timesincefire-module.html","id":"plotting-1","chapter":"11 timeSinceFire Module","heading":"11.1.3.2 Plotting","text":"bare call Plot(sim$rstTimeSinceFire).\nreally want see , ’ll live automated colour scheme legend, hack Init satisfaction.","code":""},{"path":"timesincefire-module.html","id":"saving-1","chapter":"11 timeSinceFire Module","heading":"11.1.3.3 Saving","text":"Nothing saved present.","code":""},{"path":"timesincefire-module.html","id":"age","chapter":"11 timeSinceFire Module","heading":"11.1.3.4 Age","text":"main event. rstFlammable incremented one.\nburned cells, specified input vector burnLoci set age 0.","code":""},{"path":"timesincefire-module.html","id":"module-outputs-5","chapter":"11 timeSinceFire Module","heading":"11.1.4 Module outputs","text":"Description module outputs (Table 11.3).Table 11.3: List timeSinceFire outputs description.","code":""},{"path":"timesincefire-module.html","id":"code-and-data-availability-1","chapter":"11 timeSinceFire Module","heading":"11.1.5 Code and data availability","text":"Code available https://github.com/fRI-Research/timeSinceFire.","code":""},{"path":"timesincefire-module.html","id":"links-to-other-modules-6","chapter":"11 timeSinceFire Module","heading":"11.1.6 Links to other modules","text":"Originally developed part LandWeb project.\n## References\n","code":""},{"path":"landweb_summary-module.html","id":"landweb_summary-module","chapter":"12 LandWeb_summary Module","heading":"12 LandWeb_summary Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/LandWeb_summary/issues.","code":""},{"path":"landweb_summary-module.html","id":"authors-9","chapter":"12 LandWeb_summary Module","heading":"12.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [aut]\n","code":""},{"path":"landweb_summary-module.html","id":"module-overview-9","chapter":"12 LandWeb_summary Module","heading":"12.1 Module Overview","text":"","code":""},{"path":"landweb_summary-module.html","id":"module-summary-7","chapter":"12 LandWeb_summary Module","heading":"12.1.1 Module summary","text":"LandWeb simulation post-processing summary creation.","code":""},{"path":"landweb_summary-module.html","id":"module-inputs-and-parameters-5","chapter":"12 LandWeb_summary Module","heading":"12.1.2 Module inputs and parameters","text":"Table 12.1 shows full list module inputs.Table 12.1: List LandWeb_summary input objects description.Provide summary user-visible parameters (Table 12.2)Table 12.2: List LandWeb_summary parameters description.","code":""},{"path":"landweb_summary-module.html","id":"module-outputs-6","chapter":"12 LandWeb_summary Module","heading":"12.1.3 Module outputs","text":"","code":""},{"path":"landweb_summary-module.html","id":"large-patches-data-for-study-region-1","chapter":"12 LandWeb_summary Module","heading":"12.1.3.1 Large Patches Data for study region","text":"Large Patches Data (.csv)Large patches histograms (.png)","code":""},{"path":"landweb_summary-module.html","id":"leading-vegetation-cover-data-for-study-region-1","chapter":"12 LandWeb_summary Module","heading":"12.1.3.2 Leading Vegetation Cover Data for study region","text":"Leading Vegetation Cover Data (.csv)Leading Vegetation Cover histograms (.png)Leading Vegetation Cover boxplots (.png)Description module outputs (Table 12.3).Table 12.3: List LandWeb_summary outputs description.","code":""},{"path":"landweb_summary-module.html","id":"links-to-other-modules-7","chapter":"12 LandWeb_summary Module","heading":"12.1.4 Links to other modules","text":"Initially developed use LandWeb model.","code":""},{"path":"landweb_summary-module.html","id":"getting-help-5","chapter":"12 LandWeb_summary Module","heading":"12.1.5 Getting help","text":"https://github.com/PredictiveEcology/LandWeb_summary/issues\n## References\n","code":""},{"path":"web-app.html","id":"web-app","chapter":"Web app","heading":"Web app","text":"spring 2023, fRI Research longer hosts LandWeb App.\nHowever, appropriate access output data, app may run local shiny instance.Previously available https://landweb.ca.","code":""},{"path":"modifying-landweb.html","id":"modifying-landweb","chapter":"13 Modifying LandWeb","heading":"13 Modifying LandWeb","text":"Important note regarding caching:caching simulation events, modifications made code change input values function module event likely trigger re-evaluation cached call.\nexample, adding new study areas within LandWeb_preamble module (examples 1-3 ).\nTherefore, users need clear simulation caches ensure changes picked caching.","code":""},{"path":"modifying-landweb.html","id":"example-1-adding-new-reporting-polygons","chapter":"13 Modifying LandWeb","heading":"13.1 Example 1: adding new reporting polygons","text":"‘Reporting polygons’ refer polygons LandWeb results summarized within study area.\ncreated LandWeb_preamble module, added sim$ml (object class map, map package).\nReporting polygons used simulation, rather post-processing LandWeb_summaries module.Adding new reporting polygons straightforward - one simply needs edit LandWeb_preamble code 1) create object 2) add map (.e., sim$ml) object.\nreporting polygons retrieved public Google Drive URLs, steps may combined single mapAdd() call.Downstream use requires set reporting polygons Name (shinyLabel) field (column).\nfields typically derived single field raw source, thus identical value.\nAdditionally, helper function joinreportingPolygons() used following geospatial intersection operation (e.g., using postProcess()) ensure post-intersection labels like Names.1 shinyLabel.1 corrected.","code":""},{"path":"modifying-landweb.html","id":"national-scale-polygons","chapter":"13 Modifying LandWeb","heading":"13.1.1 National-scale polygons","text":"adding reporting polygons derived national-scale data sources, changes need made LandWeb_preamble.R well study-area-specific files LandWeb_preamble/R/ LandWeb runs using study area can make use new reporting polygons.Next, need modify regional files make use new national polygons, intersected cropped study area:","code":"\n## LandWeb_preamble.R\n\n## create the national-scale object and add to map object in a single call\nml <- mapAdd(map = ml, layerName = \"National Ecoregions\",\n useSAcrs = TRUE, poly = TRUE, overwrite = TRUE,\n url = \"https://sis.agr.gc.ca/cansis/nsdb/ecostrat/region/ecoregion_shp.zip\",\n columnNameForLabels = \"REGION_NAM\", isStudyArea = FALSE, filename2 = NULL)\n\n## ensure there is a 'Name' field in the new object\nml[[\"National Ecoregions\"]][[\"Name\"]] <- ml[[\"National Ecoregions\"]][[\"REGION_NAM\"]]\n## LandWeb_preamble/R/provSK.R\n\n## 1. create the reporting polygons by intesecting the National Ecoregions with SK admin boundary\nSK.natler <- postProcess(ml[[\"National Ecoregions\"]],\n studyArea = SK, useSAcrs = TRUE,\n filename2 = file.path(dataDir, \"SK_NATLER.shp\")) |>\n joinReportingPolygons(SK)\n\n\n## 2. add to the map object\nml <- mapAdd(SK.natler, ml, layerName = \"SK NATLER\", useSAcrs = TRUE, poly = TRUE,\n analysisGroupReportingPolygon = \"SK NATLER\",\n columnNameForLabels = \"REGION_NAM\", filename2 = NULL)"},{"path":"modifying-landweb.html","id":"regional-or-study-area-specific-polygons","chapter":"13 Modifying LandWeb","heading":"13.1.2 Regional or study-area-specific polygons","text":"adding regional study-area-specific reporting polygons (e.g., FMA’s active/passive landbase), new reporting polygons added corresponding study area code file found LandWeb_preamble/R.","code":"\n## LandWeb_preamble/R/WestFraser.R\n\n## 1. create the reporting polygons by downloading and cleaning up shapefile\nwf_br.lbstatus <- Cache(\n prepInputs,\n url = \"https://drive.google.com/file/d/1A7N_EIbO2wMBI_YTmU2Z-bQwqC9sY_EC/\",\n destinationPath = dataDir,\n targetFile = \"BRL_Landbase.shp\", alsoExtract = \"similar\",\n fun = \"sf::st_read\", studyArea = wf_br, useSAcrs = TRUE\n)\nwf_br.lbstatus <- wf_br.lbstatus[st_is_valid(wf_br.lbstatus), ] ## remove invalid geometries\nwf_br.lbstatus <- wf_br.lbstatus[!st_is_empty(wf_br.lbstatus), ] ## remove empty polygons\nwf_br.lbstatus <- Cache({\n mutate(wf_br.lbstatus, Name = LBC_LBStat, geometry = geometry, .keep = \"used\") |>\n group_by(Name) |>\n summarise(geometry = sf::st_union(geometry)) |>\n ungroup() |>\n mutate(shinyLabel = Name, .before = geometry) |>\n joinReportingPolygons(wf_br)\n})\n\n## 2. add to the map object\nml <- mapAdd(wf_br.lbstatus, ml, layerName = \"West Fraser Blue Ridge LBstatus\", useSAcrs = TRUE, poly = TRUE,\n analysisGroupReportingPolygon = \"West Fraser Blue Ridge LBstatus\",\n columnNameForLabels = \"Name\", filename2 = NULL)"},{"path":"modifying-landweb.html","id":"example-2-adding-a-new-study-area","chapter":"13 Modifying LandWeb","heading":"13.2 Example 2: adding a new study area","text":"create custom study area area northwestern Alberta.\nwant use latest FMU map Spring 2022 (https://www.alberta.ca/forest-management-agreements).Externally LandWeb, create shapefile (similar) new study area, dissolving internal polygon boundaries.\n\nnwab <- sf::st_read(\"AB_FMAs_2022-03-25/Forest Management Unit.shp\") |> \n subset(FMU_CODE %% c(\"F10\", \"F11\", \"F14\", \"F15\", \"F20\", \"F23\", \"F26\", \"F51\", \"M01\",\n \"P08\", \"P14\", \"P19\", \"P20\", \"P21\", \"P22\", \"P52\", \"P55\", \"S10\", \"S11\", \"S14\")) |> \n sf::st_union()Externally LandWeb, create shapefile (similar) new study area, dissolving internal polygon boundaries.Externally LandWeb, upload shapefile Google Drive record file’s Google Drive ID.\n\nshpfile <- \"inputs/NW_AB.shp\"\nsf::st_write(nwab, shpfile)\n\nresult <- googledrive::drive_put(shpfile, googledrive::as_id(\"1LsYuuYICkcpElAkEABFM5zJXf5tTyMLG\"))\nfid <- result$idExternally LandWeb, upload shapefile Google Drive record file’s Google Drive ID.Determine name use running LandWeb new study area, modify LandWeb_preamble.R use new study area name.\nAdd new case -else block LandWeb_preamble.R:\n} else (grepl(\"customABNW\", P(sim)$.studyAreaName)) {\n ml <- customABNW(ml, P(sim)$.studyAreaName, dataDir, sim$canProvs, P(sim)$bufferDist, asStudyArea = TRUE)Determine name use running LandWeb new study area, modify LandWeb_preamble.R use new study area name.\nAdd new case -else block LandWeb_preamble.R:Add new study area map object wrapping necessary components new function defined new file LandWeb_preamble/R.\n’s simplest use existing function/file LandWeb_preamble/R template, making modifications appropriate new study area.\ncopy LandWeb_preamble/R/provAB.R LandWeb_preamble/R/NWAB.R;\nedit LandWeb_preamble/R/NWAB.R, crop AB new study area (NWAB) subsquently using NWAB lieu AB throughout;\nremove unnecessary elements (e.g., planning units planning regions).\nAdd new study area map object wrapping necessary components new function defined new file LandWeb_preamble/R.\n’s simplest use existing function/file LandWeb_preamble/R template, making modifications appropriate new study area.copy LandWeb_preamble/R/provAB.R LandWeb_preamble/R/NWAB.R;copy LandWeb_preamble/R/provAB.R LandWeb_preamble/R/NWAB.R;edit LandWeb_preamble/R/NWAB.R, crop AB new study area (NWAB) subsquently using NWAB lieu AB throughout;edit LandWeb_preamble/R/NWAB.R, crop AB new study area (NWAB) subsquently using NWAB lieu AB throughout;remove unnecessary elements (e.g., planning units planning regions).remove unnecessary elements (e.g., planning units planning regions).now able run LandWeb model setting `.studyAreaName = “customABNW” use new study area.now able run LandWeb model setting `.studyAreaName = “customABNW” use new study area.","code":"\nnwab <- sf::st_read(\"AB_FMAs_2022-03-25/Forest Management Unit.shp\") |> \n subset(FMU_CODE %in% c(\"F10\", \"F11\", \"F14\", \"F15\", \"F20\", \"F23\", \"F26\", \"F51\", \"M01\",\n \"P08\", \"P14\", \"P19\", \"P20\", \"P21\", \"P22\", \"P52\", \"P55\", \"S10\", \"S11\", \"S14\")) |> \n sf::st_union()\nshpfile <- \"inputs/NW_AB.shp\"\nsf::st_write(nwab, shpfile)\n\nresult <- googledrive::drive_put(shpfile, googledrive::as_id(\"1LsYuuYICkcpElAkEABFM5zJXf5tTyMLG\"))\nfid <- result$id} else if (grepl(\"customABNW\", P(sim)$.studyAreaName)) {\n ml <- customABNW(ml, P(sim)$.studyAreaName, dataDir, sim$canProvs, P(sim)$bufferDist, asStudyArea = TRUE)"},{"path":"modifying-landweb.html","id":"example-3-updating-the-lthfc-map","chapter":"13 Modifying LandWeb","heading":"13.3 Example 3: updating the LTHFC map","text":"Using updated version data source requires basic code modifications provided following conditions met:spatial data attributes remain (e.g., field names );new URL provided new data source;new file name different previous version (e.g., version number date).show modify LandWeb_preamble module use hypothetical new version longs-term historic fire cycle (LTHFC) map.looking LandWeb_preamble.R see current version file landweb_ltfc_v8a.shp.looking LandWeb_preamble.R see current version file landweb_ltfc_v8a.shp.create new spatial layer save landweb_ltfc_v9.shp.create new spatial layer save landweb_ltfc_v9.shp.zip new shapefile (auxiliary files) upload zip file Google Drive landweb_ltfc_v9.zip, making note Google Drive share URL.zip new shapefile (auxiliary files) upload zip file Google Drive landweb_ltfc_v9.zip, making note Google Drive share URL.modify two mapAdd() calls LandWeb_preamble.R reference previous version (v8) LTHFC map use new (v9) Google Drive URL.modify two mapAdd() calls LandWeb_preamble.R reference previous version (v8) LTHFC map use new (v9) Google Drive URL.See https://github.com/PredictiveEcology/LandWeb/blob/development/R/new_lthfc.R script used make v8a map v8.\nSee LandWeb_preamble commit see new version added preamble module.","code":""},{"path":"modifying-landweb.html","id":"contributing-changes","chapter":"13 Modifying LandWeb","heading":"13.4 Contributing changes","text":"via pull request11 development branch GitHub","code":""},{"path":"references-1.html","id":"references-1","chapter":"References","heading":"References","text":"","code":""}]
+[{"path":"index.html","id":"overview","chapter":"Overview","heading":"Overview","text":"manual live document automatically updated changes made underlying model code documentation.","code":""},{"path":"index.html","id":"background","chapter":"Overview","heading":"0.1 Background","text":"","code":""},{"path":"index.html","id":"the-landweb-model","chapter":"Overview","heading":"0.2 The LandWeb Model","text":"LandWeb first large scale, data-driven approach simulating historic natural range variation (H/NRV) (https://landweb.ca).\ndeveloping model, analyses, well infrastructure host data, strove implement single, reproducible workflow facilitate running simulations, analyses, model reuse future expansion.\ntight linkage data simulation model made possible via implementation using SpaDES family packages (Chubaty & McIntire 2019) within R Statistical Language Environment (R Core Team 2023).\ninformation SpaDES, see https://spades.predictiveecology.org/.LandWeb model integrates two well-used models forest stand succession wildfire simulation, implemented SpaDES simulation platform collection submodels (implement SpaDES modules).\nVegetation dynamics modeled using LandR Biomass suite modules, reimplement LANDIS-II Biomass Succession model (Scheller et al. 2007; Scheller & Mladenoff 2004) R.\nWildfire dynamics modeled using implementation LandMine (Andison 1996; Andison 1998).\nSimulations run entire LandWeb study area, spans western Canadian boreal forest.\nsummary results presented using web app, can run locally.\nFigure 0.1: LandWeb study area (blue) mountain boreal caribou ranges highlighted (pink).\n","code":""},{"path":"index.html","id":"data-preparation","chapter":"Overview","heading":"0.2.1 Data preparation","text":"Input data derived multiple sources, including several publicly available well proprietary datasets.Detailed descriptions sources provided relevant sections manual.","code":""},{"path":"index.html","id":"public-data-sources","chapter":"Overview","heading":"0.2.1.1 Public data sources","text":"Land Cover Classification 2005 map (longer available Government Canada’s Open Data website);LANDIS-II species traits: https://github.com/dcyr/LANDIS-II_IA_generalUseFiles;LANDIS-II parameterization tables data: https://github.com/LANDIS-II-Foundation/Extensions-Succession-Archive/master/biomass-succession-archive/trunk/tests/v6.0-2.0/;Canada biomass, stand volume, species data (Beaudoin et al. 2014): http://tree.pfc.forestry.ca;National ecodistrict polygons: http://sis.agr.gc.ca/cansis/nsdb/ecostrat/district/ecodistrict_shp.zip;National ecoregion polygons: http://sis.agr.gc.ca/cansis/nsdb/ecostrat/region/ecoregion_shp.zip;National ecozone polygons: http://sis.agr.gc.ca/cansis/nsdb/ecostrat/zone/ecozone_shp.zip.","code":""},{"path":"index.html","id":"proprietary-data-sources","chapter":"Overview","heading":"0.2.1.2 Proprietary data sources","text":"proprietary data used model stored access-controlled Google Drive location.biomass species maps created Pickell & Coops (2016) resolution 100m x 100m LandSat kNN based CASFRI;various reporting polygons used summarize model results app.request access, please contact Alex Chubaty (achubaty@-cast.ca).","code":""},{"path":"index.html","id":"vegetation-dynamics","chapter":"Overview","heading":"0.2.2 Vegetation dynamics","text":"Vegetation growth succession modeled using re-implementation LANDIS-II Biomass model, widely used well-documented dynamic vegetation succession model (Scheller et al. 2007; Scheller & Mladenoff 2004).\nre-implemented model largely follows original LANDIS-II source code (v 3.6.2; Scheller & Miranda (2015a)), modifications respect species traits parameterization.\nmodel simulates landscape-scale forest dynamics spatio-temporally explicit manner, using cohorts tree species within pixel.\nMultiple ecological processes captured model, including vegetation growth, mortality, seed dispersal, post-disturbance regeneration.submodel described detail Vegetation submodel.","code":""},{"path":"index.html","id":"wildfire-dynamics","chapter":"Overview","heading":"0.2.3 Wildfire dynamics","text":"Wildfire simulated using re-implementation fire submodel Andison’s (1996; 1998) LandMine model landscape disturbance.submodel described detail Wildfire submodel.","code":""},{"path":"index.html","id":"summary-maps-and-statistics","chapter":"Overview","heading":"0.2.4 Summary maps and statistics","text":"Summaries derived simulation outputs, consist maps showing time since fire well histogram summaries 1) number large patches (.e., patches number hectares specified user) contained within selected spatial area; 2) vegetation cover within selected spatial area.\nHistograms provided spatial area polygon, age class, species.\nAuthorized users can additionally overlay current stand conditions onto histograms.\nSimulation outputs summarized several publicly available reporting polygons (including Alberta Natural Ecoregions Caribou Ranges).described detail Model outputs.","code":""},{"path":"index.html","id":"landweb-app","chapter":"Overview","heading":"0.2.5 LandWeb app","text":"Using web app described Web app.","code":""},{"path":"index.html","id":"previous-manual-versions","chapter":"Overview","heading":"0.3 Previous Manual Versions","text":"available, archived copies previous manual versions provided links .LandR Manual v3.0.0 (current)","code":""},{"path":"getting-started.html","id":"getting-started","chapter":"1 Getting started","heading":"1 Getting started","text":"","code":""},{"path":"getting-started.html","id":"prerequisites","chapter":"1 Getting started","heading":"1.1 Prerequisites","text":"Minimum system requirements:Windows 10, macOS 10.13 High Sierra, Ubuntu 20.04 LTS;20 GB storage space, plus additional storage model outputs;128 GB RAM run model full area (less sub-areas);High-speed internet connection.following section provides details installing prerequisite software running LandWeb.","code":""},{"path":"getting-started.html","id":"docker","chapter":"1 Getting started","heading":"1.1.1 Docker","text":"prefer use Docker, skip subsection.Due idiosyncratic difficulties installing multiple pieces software ensuring correct versions used throughout, provide prebuilt Docker images, better provides consistent reproducible software environment running model.Thus, using images preferred ‘bare-metal’ installation.Install Docker system following https://docs.docker.com/get-docker/.Next, pull image Docker Hub:container running, open web browser go localhost:8080.Login Rstudio session user rstudio password (change password launching container ).finished, can stop destroy container:","code":"## get the image\ndocker pull achubaty/landweb-standalone:latest\n\n## launch a new container based on this image\ndocker run -d -it \\\n -e GITHUB_PAT=$(cat ${HOME}/.Renviron | grep GITHUB_PAT | cut -d '=' -f 2) \\\n -e PASSWORD='' \\\n --memory=128g \\\n --cpus=32 \\\n -p 127.0.0.1:8080:8787 \\\n --name LandWeb \\\n achubaty/landweb-standalone:latestdocker stop LandWeb\ndocker rm LandWeb"},{"path":"getting-started.html","id":"bare-metal-installation","chapter":"1 Getting started","heading":"1.1.2 Bare metal installation","text":"","code":""},{"path":"getting-started.html","id":"development-tools","chapter":"1 Getting started","heading":"1.1.2.1 Development tools","text":"","code":""},{"path":"getting-started.html","id":"windows","chapter":"1 Getting started","heading":"1.1.2.1.1 Windows","text":"Download Rtools version 4.2 https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html install administrator.\nRtools provides necessary compilers etc. build install R packages source Windows.\ninstallation, sure check option add Rtools PATH.\nDownload Rtools version 4.2 https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html install administrator.\nRtools provides necessary compilers etc. build install R packages source Windows.installation, sure check option add Rtools PATH.Download install proper text editor, e.g. Notepad++ (https://notepad-plus-plus.org/downloads/).Download install proper text editor, e.g. Notepad++ (https://notepad-plus-plus.org/downloads/).","code":""},{"path":"getting-started.html","id":"macos","chapter":"1 Getting started","heading":"1.1.2.1.2 macOS","text":"","code":""},{},{},{"path":"getting-started.html","id":"ubuntu-linux","chapter":"1 Getting started","heading":"1.1.2.1.3 Ubuntu Linux","text":"","code":"sudo apt-get update\n\nsudo apt-get -y install \\\n build-essential \\\n biber \\\n ccache \\\n cmake \\\n curl \\\n libarchive-dev \\\n libcairo2-dev \\\n libcurl4-openssl-dev \\\n libgit2-dev \\\n libglpk-dev \\\n libgmp3-dev \\\n libicu-dev \\\n libjq-dev \\\n libmagick++-dev \\\n libnode-dev \\\n libpng-dev \\\n libprotobuf-dev \\\n libprotoc-dev \\\n libssh2-1-dev \\\n libssl-dev \\\n libxml2-dev \\\n libxt-dev \\\n make \\\n p7zip-full p7zip-rar \\\n pandoc pandoc-citeproc \\\n protobuf-compiler \\\n qpdf \\\n screen \\\n sysstat \\\n texinfo texlive-base texlive-bibtex-extra \\\n texlive-fonts-extra texlive-latex-extra texlive-xetex \\\n wget \\\n xauth \\\n xfonts-base \\\n xvfb \\\n zlib1g-dev"},{"path":"getting-started.html","id":"geospatial-libraries","chapter":"1 Getting started","heading":"1.1.2.2 Geospatial libraries","text":"order work geospatial data, recent versions GDAL, PROJ, GEOS geospatial libraries need available system.","code":""},{"path":"getting-started.html","id":"windows-1","chapter":"1 Getting started","heading":"1.1.2.2.1 Windows","text":"additional needed, recent versions R geospatial packages include pre-bundled versions GDAL, PROJ, GEOS.","code":""},{"path":"getting-started.html","id":"macos-1","chapter":"1 Getting started","heading":"1.1.2.2.2 macOS","text":"Use homebrew install required geospatial software libraries:","code":"brew install pkg-config\nbrew install gdal\n# brew install geos\n# brew install proj\nbrew install udunits"},{"path":"getting-started.html","id":"ubuntu-linux-1","chapter":"1 Getting started","heading":"1.1.2.2.3 Ubuntu Linux","text":"default Ubuntu 20.04 LTS package repositories ship older versions geospatial libraries using, need add additional repositories get latest versions.Install additional system dependencies serve prerequisites running LandWeb model R.Optionally, install mapshaper geospatial library used speed polygon simplification.","code":"## add GIS repository\nsudo add-apt-repository ppa:ubuntugis-unstable/ppa\nsudo apt-get updatesudo apt-get -y install \\\n gdal-bin \\\n libgdal-dev \\\n libgeos-dev \\\n libproj-dev \\\n libudunits2-dev \\\n python3-gdal## mapshaper installation\nsudo apt-get remove -y libnode-dev\n\ncurl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -\n\nsudo apt install nodejs\nsudo npm install npm@latest -g\nsudo npm install -g mapshaper"},{"path":"getting-started.html","id":"version-control","chapter":"1 Getting started","heading":"1.1.2.3 Version control","text":"git version control software used throughout project, required ‘checkout’ specific versions code well make changes ‘push’ changes model code repository.Install latest version git https://git-scm.com/downloads via package manager.Windows users install administrator.\nUse nano (instead vi/vim) default text editor.\nchoices, use recommended settings.macOS users, git included Xcode command line tools.Create GitHub (https://github.com) account don’t already one, configure Personal Access Token (PAT).GitHub (https://github.com) account required assist package installation accessing model code.Several packages used LandWeb available GitHub.\ninstalling several , want ensure can without GitHub rate-limiting requests.\nWithout PAT, packages may temporarily fail install, can retried little later (usually 1 hour).Create GitHub Personal Acess Token (PAT):Create GitHub Personal Acess Token (PAT):either ‘manually’ following instructions2, making sure check repo, workflow, user:email scopes;either ‘manually’ following instructions2, making sure check repo, workflow, user:email scopes;directly R session:Securely store token using credential store, R session:\n> gitcreds::gitcreds_set()\n\n? Enter password token: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-> Adding new credentials...\n-> Removing credentials cache...\n-> Done.Securely store token using credential store, R session:Storing GitHub credentials .Renviron longer recommended.See https://usethis.r-lib.org/articles/git-credentials.html.Optional. Install latest version GitKraken https://www.gitkraken.com/download/.free version sufficient access public repositories used project.\nHowever, paid pro version required access private repositories.","code":"```r\n# install.packages(\"usethis\")\nusethis::create_github_token()\n```> gitcreds::gitcreds_set()\n\n? Enter password or token: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-> Adding new credentials...\n-> Removing credentials from cache...\n-> Done."},{"path":"getting-started.html","id":"r-and-rstudio","chapter":"1 Getting started","heading":"1.1.2.4 R and Rstudio","text":"Download install R version 4.2.3.WindowsDownload R https://cran.r-project.org/bin/windows/base/R-4.2.3-win.exe;Install R administrator.macOSInstall rig (https://github.com/r-lib/rig) manage multiple R installations.Ubuntu LinuxUse rig (https://github.com/r-lib/rig) easily manage multiple R installations, easily switch among .Add apt repository install rig:Install R version 4.2.3Download install latest version Rstudio https://www.rstudio.com/products/rstudio/download/.Windows users install Rstudio administrator.(optional) Linux, configure ccache speed R package re-installation updates3.\n## configure ccache R package installation\nmkdir -p ~/.ccache\nmkdir -p ~/.R\n{ echo 'VER='; \\\n echo 'CCACHE=ccache'; \\\n echo 'CC=$(CCACHE) gcc$(VER)'; \\\n echo 'CXX=$(CCACHE) g++$(VER)'; \\\n echo 'CXX11=$(CCACHE) g++$(VER)'; \\\n echo 'CXX14=$(CCACHE) g++$(VER)'; \\\n echo 'FC=$(CCACHE) gfortran$(VER)'; \\\n echo 'F77=$(CCACHE) gfortran$(VER)'; } >> ~/.R/Makevars\n{ echo 'max_size = 5.0G'; \\\n echo 'sloppiness = include_file_ctime'; \\\n echo 'hash_dir = false'; } >> ~/.ccache/ccache.conf(optional) Linux, configure ccache speed R package re-installation updates3.","code":"brew tap r-lib/rig\nbrew install --cask rig\n\nrig install 4.2.3\n\n## start Rstudio using a specific R version:\nrig rstudio ~/GitHub/LandWeb.Rproj 4.2.3## add apt repository\nsudo curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg\nsudo sh -c \"echo 'deb [arch=amd64] http://rig.r-pkg.org/deb rig main' > /etc/apt/sources.list.d/rig.list\"\n\n## install (NB: rig is different package; use r-rig!)\nsudo apt update\nsudo apt install r-rigrig add 4.2.3\n\nrig system make-links\n\nsudo ln -s /opt/R/4.2.3/bin/Rscript /usr/local/bin/Rscript-4.2.3\n\nrig list## configure ccache for R package installation\nmkdir -p ~/.ccache\nmkdir -p ~/.R\n{ echo 'VER='; \\\n echo 'CCACHE=ccache'; \\\n echo 'CC=$(CCACHE) gcc$(VER)'; \\\n echo 'CXX=$(CCACHE) g++$(VER)'; \\\n echo 'CXX11=$(CCACHE) g++$(VER)'; \\\n echo 'CXX14=$(CCACHE) g++$(VER)'; \\\n echo 'FC=$(CCACHE) gfortran$(VER)'; \\\n echo 'F77=$(CCACHE) gfortran$(VER)'; } >> ~/.R/Makevars\n{ echo 'max_size = 5.0G'; \\\n echo 'sloppiness = include_file_ctime'; \\\n echo 'hash_dir = false'; } >> ~/.ccache/ccache.conf"},{"path":"getting-started.html","id":"getting-the-code","chapter":"1 Getting started","heading":"1.2 Getting the code","text":"modules written R model code developed collaboratively using GitHub (https://github.com), module contained repository.\nCode shared among modules bundled R packages, hosted GitHub repositories.\npackage code automatically regularly tested using cross-platform continuous integration frameworks ensure code reliable free errors.Windows users ensure GitHub/ directory accessible ~/GitHub ~/Documents/GitHub creating directory junction:","code":"mkdir -p ~/GitHub\ncd ~/GitHub\n\n## get development branch (app and deploy are private submodules)\ngit clone --recurse-submodules \\\n -j8 https://github.com/PredictiveEcology/LandWebmklink /J C:\\\\Users\\\\username\\\\Documents\\\\GitHub C:\\\\Users\\\\username\\\\GitHub"},{"path":"getting-started.html","id":"project-directory-structure","chapter":"1 Getting started","heading":"1.3 Project directory structure","text":"Model code organized following directories summarized table .NOTE: may useful store data different location, map location back e.g., cache/, inputs/, /outputs/ directories using symbolic links.\nSee R’s ?file.link set machine.\nTable 1.1: LandWeb project directory structure\n","code":""},{"path":"getting-started.html","id":"updating-the-code","chapter":"1 Getting started","heading":"1.4 Updating the code","text":"cloned LandWeb code repository, users can keep --date using preferred graphical git tools (e.g., GitKraken) command line.","code":""},{"path":"getting-started.html","id":"using-gitkraken","chapter":"1 Getting started","heading":"1.4.1 Using GitKraken","text":"\nFigure 1.1: Screenshot showing showing code commits Git Kraken. submodules pane highlighted bottom left.\nOpen LandWeb repo, moments see commit history update reflect latest changes server.Open LandWeb repo, moments see commit history update reflect latest changes server.‘Pull’ latest changes repo, noting status git submodules (left hand side) may change.‘Pull’ latest changes repo, noting status git submodules (left hand side) may change.submodules changed status, one, right-click select ‘Update ’.submodules changed status, one, right-click select ‘Update ’.","code":""},{"path":"getting-started.html","id":"using-the-command-line","chapter":"1 Getting started","heading":"1.4.2 Using the command line","text":"WARNING: experienced git users !","code":"git pull\ngit submodule update"},{"path":"getting-started.html","id":"data-requirements","chapter":"1 Getting started","heading":"1.5 Data requirements","text":"order access use proprietary data LandWeb simulations, need granted access shared Google Drive directory.\nfirst-run model, required data downloaded inputs/ directory.request access, please contact Alex Chubaty (achubaty@-cast.ca).","code":""},{"path":"getting-started.html","id":"getting-help","chapter":"1 Getting started","heading":"1.6 Getting help","text":"https://github.com/PredictiveEcology/LandWeb/issues","code":""},{"path":"running-landweb.html","id":"running-landweb","chapter":"2 Running LandWeb","heading":"2 Running LandWeb","text":"Launch Rstudio open LandWeb Rstudio project (LandWeb.Rproj);sure use R 4.2.3 running model!using rig manage multiple R versions, use following launch Rstudio correct version R:Open file 00-global.R run line sequence, responding prompts required.can run model, first need install packages required project restoring project’s snapshot file.","code":"cd ~/GitHub/LandWeb\nrig rstudio renv.lock\noptions(\n renv.config.mran.enabled = FALSE,\n renv.config.pak.enabled = FALSE\n)\nrenv::restore()"},{"path":"running-landweb.html","id":"model-setup-and-configuration","chapter":"2 Running LandWeb","heading":"2.1 Model setup and configuration","text":"default settings study area, model version, scenario defined 01a-globalvars.R.\ndefaults defined ‘dot-variables’ (e.g., .studyAreaName) can set externally main script\n(e.g., .studyAreaName defined running 01a-globalvars.R, user-set value used, rather default defined script).Advanced setup model run customization described Advanced setup.","code":""},{"path":"running-landweb.html","id":"select-a-study-area","chapter":"2 Running LandWeb","heading":"2.1.1 Select a study area","text":"model can run entire study area, certain individual provinces (currently AB, SK, MB, NWT), groups predefined FMAs (see Fig. 1 Table 1).","code":""},{"path":"running-landweb.html","id":"fma-boundaries","chapter":"2 Running LandWeb","heading":"2.1.1.1 FMA boundaries","text":"Currently, subset FMAs within LandWeb study area predefined run (.e., without needing run model entire study area; see Table 2).","code":""},{"path":"running-landweb.html","id":"choosing-a-study-area","chapter":"2 Running LandWeb","heading":"2.1.1.2 Choosing a study area","text":"model can run several pre-defined study areas summarized table .\nselect one predefined study areas, set .studyAreaName use one following, corresponding polygon IDs map .run LandWeb entire province use one provAB, provMB, provNWT, provSK.run entire LandWeb study area, use LandWeb.","code":""},{"path":"running-landweb.html","id":"select-a-scenario","chapter":"2 Running LandWeb","heading":"2.1.2 Select a scenario","text":"version 2.0.0 LandWeb model, seed dispersal distances needed adjusted ensure sufficient regeneration following fire.\nadjustments cause model behave like state-transition model, rather process-based one.Version 3.0.0 relaxes parameter forcings behave like standard LANDIS-II model.dispersal scenario principally set via .version can overridden set via .dispersalType:Additionally, v2.0.0 model uses adjusted fire return intervals (FRI) log-adjusted rates spread (ROS).\nVersion 3.0.0 uses LandMine defaults.fire scenario principally set via .version can overridden specifying .ROStype:define scenario run, select one dispersal scenario one fire scenario tables .\nLandWeb v2.0.0 runs 2019 run using .dispersalType = \"high\" .ROStype = \"log\".\nUsing v3.0.0 model, .dispersalType = \"default\" .ROStype = \"default\".","code":""},{"path":"running-landweb.html","id":"replication","chapter":"2 Running LandWeb","heading":"2.1.3 Replication","text":"run multiple replicates given run, set .rep integer corresponding replicate id.\nreplicate runs use different random seed, seed saved output reuse event replicate needs rerun.\nrerun replicate using different seed, sure delete run’s seed.rds file.\nseed used also saved human-readable seed.txt file.","code":""},{"path":"running-landweb.html","id":"running-the-model","chapter":"2 Running LandWeb","heading":"2.2 Running the model","text":"NOTE: first time model run, automatically download additional data install additional R packages, can take time complete.","code":""},{"path":"running-landweb.html","id":"interactive-r-session","chapter":"2 Running LandWeb","heading":"2.2.1 Interactive R session","text":"working R session, sure set working directory LandWeb project directory.\nfirst time running model, open file 00-global.R, step line ensure prompts etc. answered correctly.authenticating Google Drive, sure check box allow access files.","code":"\n.mode <- \"development\"\n.studyAreaName <- \"random\"\n.rep <- 1L\n.version <- 2\n\nsource(\"00-global.R\")"},{"path":"running-landweb.html","id":"commandline-interface","chapter":"2 Running LandWeb","heading":"2.2.2 Commandline interface","text":"addition running model interactive R session, provide command line interface run replicates model study areas defined (.e., batch mode).example, run replicate number 7 model \\(250 m\\) resolution using FRI multiple \\(1\\) Alberta FMU L11, use:FMU command line runs use modified dispersal fire scenarios, thus require study area, replicate, FRI multiple defined.run replicate number 7 model entire province Alberta, use:FMA command line runs use highDispersal_logROS scenarios \\(250 m\\) resolution, thus require study area replicate defined.run entire LandWeb study area, replicate number needs passed.\nexample:LandWeb command line run set dispersal fire scenarios , pixel resolution (.pixelSize) \\(250 m\\), thus require study area replicate defined.","code":"cd ~/GitHub/LandWeb\n\n## ./run_fmu.sh \n./run_fmu.sh L11 1 250 7cd ~/GitHub/LandWeb\n\n## ./run_fma.sh \n./run_fma.sh provAB 7\n# ./run_fma_win.sh provAB 7 ## if on Windows!## ./run_landweb.sh \n./run_landweb.sh 7"},{"path":"running-landweb.html","id":"post-processing-analyses","chapter":"2 Running LandWeb","heading":"2.3 Post-processing analyses","text":"run several reps model given study area, results combined subsequent post-processing analyses generate following outputs set reporting polygons within study area:boxplots leading vegetation cover;histograms leading vegetation cover;histograms large patches.run processing, use .mode = \"postprocess\" sure set number replicates run config.","code":""},{"path":"running-landweb.html","id":"advanced-setup","chapter":"2 Running LandWeb","heading":"2.4 Advanced setup","text":"","code":""},{"path":"running-landweb.html","id":"customizing-model-run-configuration","chapter":"2 Running LandWeb","heading":"2.4.1 Customizing model run configuration","text":"See box/landweb.R file, 02a-user-config.R.(TODO)","code":""},{"path":"running-landweb.html","id":"cache-backend","chapter":"2 Running LandWeb","heading":"2.4.2 Cache backend","text":"Simulation caching provided reproducible SpaDES.core packages, enabled default.default cache uses SQLite database backend stores cache files cache/.\nHowever, database backends can also used, advanced users running multiple parallel simulations may wish set use PostgreSQL database cache.See https://github.com/PredictiveEcology/SpaDES/wiki/Using-alternate-database-backends--Cache ensure following options added user-specific config 02a-user-config.R:","code":"reproducible.cacheSaveFormat = \"qs\",\nreproducible.conn = SpaDES.config::dbConnCache(\"postgresql\"),"},{"path":"running-landweb.html","id":"speeding-up-disk-based-operations","chapter":"2 Running LandWeb","heading":"2.4.3 Speeding up disk-based operations","text":"Caching disk-based file operations benefit using solid state drive (SSD) instead conventional spinning hard drive.\nAdvanced users can move cache/ directory SSD mountpoint create symlink location project directory.\nLikewise, users can configure scratch path temporary raster file operations point SSD location.","code":""},{"path":"running-landweb.html","id":"additional-resources","chapter":"2 Running LandWeb","heading":"2.5 Additional Resources","text":"Resources (re)learning R spatial data:https://rspatial.org","code":""},{"path":"study-areas.html","id":"study-areas","chapter":"Study areas","heading":"Study areas","text":"Lorem ipsum … (TODO)","code":""},{"path":"landweb_preamble-module.html","id":"landweb_preamble-module","chapter":"3 LandWeb_preamble Module","heading":"3 LandWeb_preamble Module","text":"(ref:LandWeb_preamble) LandWeb_preamble","code":""},{"path":"landweb_preamble-module.html","id":"authors","chapter":"3 LandWeb_preamble Module","heading":"3.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [aut], Ceres Barros cbarros@mail.ubc.ca [aut]\n","code":""},{"path":"landweb_preamble-module.html","id":"module-overview","chapter":"3 LandWeb_preamble Module","heading":"3.1 Module Overview","text":"","code":""},{"path":"landweb_preamble-module.html","id":"module-summary","chapter":"3 LandWeb_preamble Module","heading":"3.1.1 Module summary","text":"Set study areas parameters LandWeb simulations.","code":""},{"path":"landweb_preamble-module.html","id":"parameters","chapter":"3 LandWeb_preamble Module","heading":"3.2 Parameters","text":"Provide summary user-visible parameters.","code":""},{"path":"landweb_preamble-module.html","id":"data-dependencies","chapter":"3 LandWeb_preamble Module","heading":"3.3 Data dependencies","text":"","code":""},{"path":"landweb_preamble-module.html","id":"input-data","chapter":"3 LandWeb_preamble Module","heading":"3.3.1 Input data","text":"Description module inputs.","code":""},{"path":"landweb_preamble-module.html","id":"output-data","chapter":"3 LandWeb_preamble Module","heading":"3.3.2 Output data","text":"Description module outputs.","code":""},{"path":"landweb_preamble-module.html","id":"links-to-other-modules","chapter":"3 LandWeb_preamble Module","heading":"3.4 Links to other modules","text":"Originally developed use LandR Biomass suite modules, LandMine fire model.\n## References\n","code":""},{"path":"vegetation-submodel.html","id":"vegetation-submodel","chapter":"Vegetation submodel","heading":"Vegetation submodel","text":"LandR ecosystem SpaDES modules variety data /calibration modules used obtain pre-process input data, well estimate input parameters required core forest landscape simulation module Biomass_core.\nmodules presented subsequent chapters.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"landr-biomass_speciesdata-module","chapter":"4 LandR Biomass_speciesData Module","heading":"4 LandR Biomass_speciesData Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/Biomass_speciesData/issues.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"authors-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [aut], Ceres Barros cbarros@mail.ubc.ca [aut]\n","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-overview-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1 Module Overview","text":"","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-summary-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.1 Module summary","text":"module downloads pre-process species % cover data layers \npassed LandR data modules (e.g., Biomass_borealDataPrep) \nLandR forest simulation module Biomass_core.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-inputs-and-parameters-at-a-glance","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.2 Module inputs and parameters at a glance","text":"full list input objects (Table\n4.1) parameters (Table\n4.2) Biomass_speciesData expects.\n, input must provided (.e., Biomass_speciesData\ndefault ) studyAreaLarge.Raw data layers downloaded module saved dataPath(sim), can\ncontrolled via options(reproducible.destinationPath = ...).Table 4.1: List Biomass_speciesData input objects description.Table 4.2: List Biomass_speciesData parameters description.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"events","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.3 Events","text":"Biomass_speciesData runs two events:Module “initiation” (init event), species %\ncover layers downloaded processed.Plotting processed species cover layers (initPlot event).","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-outputs","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.4 Module outputs","text":"module produces following outputs (Table\n4.3):Table 4.3: List Biomass_speciesData output objects description.automatically saves processed species cover layers output path\ndefined getPaths(sim)$outputPath.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"links-to-other-modules-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.5 Links to other modules","text":"Intended used LandR data modules (e.g.,\nBiomass_borealDataPrep) require species cover data LandR forest\nsimulation Biomass_core module. can see potential module linkages\nwithin LandR ecosystem\n. Select\nBiomass_speciesData drop-menu see linkages.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"getting-help-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.1.6 Getting help","text":"https://github.com/PredictiveEcology/Biomass_speciesData/issues","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"module-manual","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2 Module manual","text":"","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"detailed-description","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.1 Detailed description","text":"module accesses processes species percent cover (% cover)\ndata parametrisation initialization LandR Biomass_core. \nmodule ensures 1) data use geospatial geometries 2) \ncorrectly re-projected studyAreaLarge, 3) attempts sequentially\nfill-replace lowest quality data higher quality data \nseveral data sources used. ’s primary output RasterStack species\n% cover, layer corresponding species.Currently, module can access Canadian Forest Inventory forest attributes\nkNN dataset [default; Beaudoin et al. (2017)], Common Attribute Schema \nForest Resource Inventories [CASFRI; Cosco (2011)] dataset, Ontario Forest\nResource Inventory (ONFRI), dataset specific Alberta compiled Paul\nPickell, Alberta forest inventory datasets. However, NFI\nkNN data freely available – access datasets must granted\nmodule developers data owners, Google account required.\nNevertheless, module flexible enough user can use process\nadditional datasets, provided adequate R function passed \nmodule (see types parameter details Parameters)multiple data sources used, module use replace lower quality\ndata higher quality data following order specified parameter\ntypes (see Parameters).multiple species given data source grouped, %\ncover summed across species group within pixel. Please see\nsppEquiv input Input objects information species groups\ndefined.module can also exclude species % cover layers don’t\nminimum % cover value least one pixel. means \nuser still inspect many pixels species deemed present,\npossible data pixels high %\ncover given species. case, user may choose exclude \nspecies posteriori. summary plot automatically shown \nBiomass_speciesData can help diagnose whether certain species present \npixels (see Fig. 4.1).","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"initialization-inputs-and-parameters","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.2 Initialization, inputs and parameters","text":"Biomass_speciesData initializes prepares inputs provided \ninternet access download raw data layers (layers\npreviously downloaded stored folder specified \noptions(\"reproducible.destinationPath\")).module defaults processing cover data fo species listed \nBoreal column default sppEquiv input data.table object, \navailable % cover layers kNN dataset (Table\n4.4; see ?LandR::sppEquivalencies_CA \ninformation):Table 4.4: List species cover data downloaded default Biomass_speciesData.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"input-objects","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.2.1 Input objects","text":"Biomass_speciesData requires following input data layersTable 4.5: List Biomass_speciesData input objects description.inputs Table 4.5, \nfollowing particularly important deserve special attention:studyAreaLarge – polygon defining area species cover\ndata area desired. can larger (never smaller) study area\nused simulation forest dynamics (.e., studyArea object \nBiomass_core).studyAreaLarge – polygon defining area species cover\ndata area desired. can larger (never smaller) study area\nused simulation forest dynamics (.e., studyArea object \nBiomass_core).sppEquiv – table correspondences different species naming\nconventions. table used across several LandR modules, including\nBiomass_core. particularly important determine\nwhether species (cover layers) merged, \ndesired user. instance, user wishes simulate generic\nPicea spp. includes, Picea glauca, Picea mariana Picea\nengelmannii, need provide three species names \ndata column (e.g., KNN obtaining forest attribute kNN data layers \nCanadian Forest Inventory), name (e.g., “Pice_Spp”) \ncoumn chosen naming convention used throughout simulation (\nsppEquivCol parameter); see Table\n4.6 example).sppEquiv – table correspondences different species naming\nconventions. table used across several LandR modules, including\nBiomass_core. particularly important determine\nwhether species (cover layers) merged, \ndesired user. instance, user wishes simulate generic\nPicea spp. includes, Picea glauca, Picea mariana Picea\nengelmannii, need provide three species names \ndata column (e.g., KNN obtaining forest attribute kNN data layers \nCanadian Forest Inventory), name (e.g., “Pice_Spp”) \ncoumn chosen naming convention used throughout simulation (\nsppEquivCol parameter); see Table\n4.6 example).Table 4.6: Example species merging simulation. user wants model Abies balsamea, . lasiocarpa Pinus contorta separate species, Picea spp. genus-level group. , six species identified 'KNN' column, % cover layers can obtained, 'Boreal' column (defines naming convention used simulation example) Picea spp. name. Biomass_speciesData merge % cover data single layer summing cover per pixel.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"parameters-1","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.2.2 Parameters","text":"Table 4.7 lists parameters used \nBiomass_speciesData detailed information.Table 4.7: List Biomass_speciesData parameters description.parameters listed Table 4.7,\nfollowing particularly important:coverThresh – integer. Defines minimum % cover value (\n0-100) species must least one pixel considered\npresent study area, otherwise excluded final stack \nspecies layers. Note affect species data \neventual simulation user need adjust simulation parameters\n(e.g., species trait tables need match species cover\nlayers) accordingly.coverThresh – integer. Defines minimum % cover value (\n0-100) species must least one pixel considered\npresent study area, otherwise excluded final stack \nspecies layers. Note affect species data \neventual simulation user need adjust simulation parameters\n(e.g., species trait tables need match species cover\nlayers) accordingly.types – character. % cover data sources used\n(see Detailed description). Several data sources can passed, \ncase module overlay lower quality layers higher quality\nones following order data sources specified types – .e.,\ntypes == c(\"KNN\", \"CASFRI\", \"ForestInventory\"), KNN assumed \nlowest quality data set ForestInventory highest: values \nKNN layers replaced overlapping values CASFRI layers \nvalues KNN CASFRI layers replaced overlapping values\nForestInventory layers.types – character. % cover data sources used\n(see Detailed description). Several data sources can passed, \ncase module overlay lower quality layers higher quality\nones following order data sources specified types – .e.,\ntypes == c(\"KNN\", \"CASFRI\", \"ForestInventory\"), KNN assumed \nlowest quality data set ForestInventory highest: values \nKNN layers replaced overlapping values CASFRI layers \nvalues KNN CASFRI layers replaced overlapping values\nForestInventory layers.","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"simulation-flow","chapter":"4 LandR Biomass_speciesData Module","heading":"4.2.3 Simulation flow","text":"general flow Biomass_speciesData processes :Download (necessary) spatial processing species cover layers\nfirst data source listed types parameter. Spatial\nprocessing consists sub-setting data area defined \nstudyAreaLarge ensuring spatial projection resolution\nmatch rasterToMatchLarge. spatial processing, species\nlayers pixels values >= coverThresh parameter\nexcluded.Download (necessary) spatial processing species cover layers\nfirst data source listed types parameter. Spatial\nprocessing consists sub-setting data area defined \nstudyAreaLarge ensuring spatial projection resolution\nmatch rasterToMatchLarge. spatial processing, species\nlayers pixels values >= coverThresh parameter\nexcluded.one data source listed types, second set species\ncover layers downloaded processed .one data source listed types, second set species\ncover layers downloaded processed .second set layers assumed highest quality dataset \nused replaced overlapping pixel values first (including \nspecies whose layers may initially excluded applying \ncoverThresh filter).second set layers assumed highest quality dataset \nused replaced overlapping pixel values first (including \nspecies whose layers may initially excluded applying \ncoverThresh filter).Steps 2 3 repeated remaining data sources listed types.Steps 2 3 repeated remaining data sources listed types.Final layers saved disk plotted. summary number pixels\nforest cover calculated (treedand numTreed output objects; see\nModule outputs).Final layers saved disk plotted. summary number pixels\nforest cover calculated (treedand numTreed output objects; see\nModule outputs).","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"usage-example","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3 Usage example","text":"","code":""},{"path":"landr-biomass_speciesdata-module.html","id":"load-spades-and-other-packages.","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.1 Load SpaDES and other packages.","text":"","code":"\nif (!require(Require)) {\n install.packages(\"Require\")\n library(Require)\n}\n\nRequire(c(\"PredictiveEcology/SpaDES.install\", \"SpaDES\", \"PredictiveEcology/SpaDES.core@development\",\n \"PredictiveEcology/LandR\"), install_githubArgs = list(dependencies = TRUE))"},{"path":"landr-biomass_speciesdata-module.html","id":"get-module-necessary-packages-and-set-up-folder-directories","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.2 Get module, necessary packages and set up folder directories","text":"","code":"\ntempDir <- tempdir()\npaths <- list(inputPath = normPath(file.path(tempDir, \"inputs\")),\n cachePath = normPath(file.path(tempDir, \"cache\")), modulePath = normPath(file.path(tempDir,\n \"modules\")), outputPath = normPath(file.path(tempDir,\n \"outputs\")))\n\ngetModule(\"PredictiveEcology/Biomass_speciesData\", modulePath = paths$modulePath,\n overwrite = TRUE)\n\n## make sure all necessary packages are installed:\nmakeSureAllPackagesInstalled(paths$modulePath)"},{"path":"landr-biomass_speciesdata-module.html","id":"setup-simulation","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.3 Setup simulation","text":"demonstration using default parameter values, except\ncoverThresh , lowered 5%. species layers (\nmajor output interest) saved automatically, need tell\nspades save using outputs argument (see\n?SpaDES.core::outputs).pass global parameter .plotInitialTime = 1 simInitAndSpades\nfunction activate plotting.","code":"\n# User may want to set some options -- see\n# ?reproducibleOptions -- e.g., often the path to the\n# 'inputs' folder will be set outside of project by user:\n# options(reproducible.inputPaths =\n# 'E:/Data/LandR_related/') # to re-use datasets across\n# projects\nstudyAreaLarge <- Cache(randomStudyArea, size = 1e+07, cacheRepo = paths$cachePath) # cache this so it creates a random one only once on a machine\n\n# Pick the species you want to work with -- here we use the\n# naming convention in 'Boreal' column of\n# LandR::sppEquivalencies_CA (default)\nspeciesNameConvention <- \"Boreal\"\nspeciesToUse <- c(\"Pice_Gla\", \"Popu_Tre\", \"Pinu_Con\")\n\nsppEquiv <- LandR::sppEquivalencies_CA[get(speciesNameConvention) %in%\n speciesToUse]\n# Assign a colour convention for graphics for each species\nsppColorVect <- LandR::sppColors(sppEquiv, speciesNameConvention,\n newVals = \"Mixed\", palette = \"Set1\")\n\n## Usage example\nmodules <- list(\"Biomass_speciesData\")\nobjects <- list(studyAreaLarge = studyAreaLarge, sppEquiv = sppEquiv,\n sppColorVect = sppColorVect)\nparams <- list(Biomass_speciesData = list(coverThresh = 5L))"},{"path":"landr-biomass_speciesdata-module.html","id":"run-module","chapter":"4 LandR Biomass_speciesData Module","heading":"4.3.4 Run module","text":"Note data module (.e., attempts prepare data \nsimulation) iterating start end times \nset 1 .outputs Biomass_speciesData (dominant species) \nrandomly generated study area within Canada.\nFigure 4.1: Biomass_speciesData automatically generates plot species dominance number presences study area .plotInitialTime=1 passed argument.\n","code":"\nopts <- options(reproducible.useCache = TRUE, reproducible.inputPaths = paths$inputPath)\n\nmySimOut <- simInitAndSpades(times = list(start = 1, end = 1),\n modules = modules, parameters = params, objects = objects,\n paths = paths, .plotInitialTime = 1)\noptions(opts)"},{"path":"landr-biomass_speciesdata-module.html","id":"references","chapter":"4 LandR Biomass_speciesData Module","heading":"4.4 References","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"landr-biomass_borealdataprep-module","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5 LandR Biomass_borealDataPrep Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/Biomass_borealDataPrep/issues.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"authors-2","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.0.0.1 Authors:","text":"Yong Luo Yong.Luo@gov.bc.ca [aut], Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Ceres Barros ceres.barros@ubc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [aut]\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"module-overview-2","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1 Module Overview","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"quick-links","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1.1 Quick links","text":"General functioningGeneral functioningList input objectsList input objectsList parametersList parametersList outputsList outputsSimulation flow module eventsSimulation flow module events","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"summary","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1.2 Summary","text":"LandR Biomass_borealDataPrep (hereafter Biomass_borealDataPrep), prepares\nnecessary inputs Biomass_core based data available forests\nacross Canada forests, focused Western Canada boreal forest systems.\nNevertheless, provides good foundation develop modules aimed \ndifferent geographical contexts. keeping data preparation parameter\nestimation outside Biomass_core, promote modularity \nLandR-based model systems facilitate interoperability parameter\nestimation procedures.Specifically, prepares adjusts invariant spatially-varying species\ntrait values, well ecolocation-specific parameters, probabilities \ngermination initial conditions necessary run Biomass_core. ,\nBiomass_borealDataPrep requires internet access retrieve default\ndata4.advise future users run Biomass_borealDataPrep defaults inspect\nresulting input objects like supplying alternative data (data\nURLs).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-links-modules","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.1.3 Links to other modules","text":"Biomass_borealDataPrep intended used \nBiomass_core, can \nlinked data modules prepare inputs. See\n\navailable modules LandR ecosystem select Biomass_borealDataPrep\ndrop-menu see potential linkages.Biomass_core: core\nforest dynamics simulation module. Used downstream \nBiomass_borealDataPrep;Biomass_core: core\nforest dynamics simulation module. Used downstream \nBiomass_borealDataPrep;Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory. Used\nupstream Biomass_borealDataPrep;Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory. Used\nupstream Biomass_borealDataPrep;Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada. Used downstream\nBiomass_borealDataPrep.Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada. Used downstream\nBiomass_borealDataPrep.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"module-manual-1","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2 Module manual","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-general-functioning","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.1 General functioning","text":"Biomass_borealDataPrep prepares inputs necessary run realistic\nsimulation forest dynamics Western Canadian boreal forests using\nBiomass_core. Part process involves cleaning input data \nimputing missing data cases, discussed detail Data\nacquisition treatment.cleaning formatting raw input data, module:calculates species biomass per pixel multiplying observed species\n% cover observed stand biomass adjustment factor,\ncan statistically calibrated study area. Given \nadjusts species biomass, calibration step contributes \ncalibration maxB maxANPP trait values, whose estimation also\nbased species biomass (see Initial species age biomass per\npixel Adjustment species\nbiomass);calculates species biomass per pixel multiplying observed species\n% cover observed stand biomass adjustment factor,\ncan statistically calibrated study area. Given \nadjusts species biomass, calibration step contributes \ncalibration maxB maxANPP trait values, whose estimation also\nbased species biomass (see Initial species age biomass per\npixel Adjustment species\nbiomass);prepares invariant species traits – spatio-temporally\nconstant species traits influence population dynamics (e.g., growth,\nmortality, dispersal) responses fire (see Invariant species\ntraits);prepares invariant species traits – spatio-temporally\nconstant species traits influence population dynamics (e.g., growth,\nmortality, dispersal) responses fire (see Invariant species\ntraits);defines ecolocations – groupings pixels similar biophysical\nconditions. default, ecolocations defined spatial combination\necodistricts National Ecological Framework Canada, \nLand Cover Canada 2010 map (see Defining simulation pixels \necolocations). Note ecolocation\ntermed ecoregionGroup across LandR modules.defines ecolocations – groupings pixels similar biophysical\nconditions. default, ecolocations defined spatial combination\necodistricts National Ecological Framework Canada, \nLand Cover Canada 2010 map (see Defining simulation pixels \necolocations). Note ecolocation\ntermed ecoregionGroup across LandR modules.prepares ecolocation-specific parameters probabilities \ngermination – one ecolocation-specific parameter used, \nminimum relative biomass thresholds, defines \nlevel shade pixel. Together level shade \nprobabilities germination influence germination\nsuccess given pixel;prepares ecolocation-specific parameters probabilities \ngermination – one ecolocation-specific parameter used, \nminimum relative biomass thresholds, defines \nlevel shade pixel. Together level shade \nprobabilities germination influence germination\nsuccess given pixel;estimates spatio-temporally varying species traits – species traits\ncan vary ecolocation time. maximum biomass\n(maxB), maximum -ground net primary productivity (maxANPP; see\nMaximum biomass maximum aboveground net primary\nproductivity) species establishment probability\n(SEP, called establishprob module traits table; see Species\nestablishment probability). default,\nBiomass_borealDataPrep estimates temporally constant values maxB,\nmaxANPP SEP;estimates spatio-temporally varying species traits – species traits\ncan vary ecolocation time. maximum biomass\n(maxB), maximum -ground net primary productivity (maxANPP; see\nMaximum biomass maximum aboveground net primary\nproductivity) species establishment probability\n(SEP, called establishprob module traits table; see Species\nestablishment probability). default,\nBiomass_borealDataPrep estimates temporally constant values maxB,\nmaxANPP SEP;creates initial landscape conditions – Biomass_borealDataPrep\nperforms data-based landscape initialisation, creating species cohort\ntable (cohortData) corresponding map (pixelGroupMap; used \ninitialise track cohorts across landscape) based observed stand\nage species biomass.creates initial landscape conditions – Biomass_borealDataPrep\nperforms data-based landscape initialisation, creating species cohort\ntable (cohortData) corresponding map (pixelGroupMap; used \ninitialise track cohorts across landscape) based observed stand\nage species biomass.Biomass_core simulates tree species dynamics, Biomass_borealDataPrep\nprepares inputs estimates parameters pixels within forested\nland-cover classes (see Defining simulation pixels \necolocations).studyAreaLarge supplied, module uses parameter estimation\naccount larger spatial variability.next sections, describe greater detail various data processing\nparameter estimation steps carried Biomass_borealDataPrep.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-dataprep","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2 Data acquisition and treatment","text":"two objects user must supply shapefiles define \nstudy area used derive parameters (studyAreaLarge) study area \nsimulation happen (studyArea). two objects can identical \nuser chooses parametrise run simulations area. \nidentical, studyArea must fully within studyAreaLarge. \nstudyAreaLarge studyArea Canada, module can automatically\nestimate prepare input parameters objects Biomass_core, \ndefault raw data FAIR data (sensu Wilkinson et al. 2016) \nnational-scale.inputs supplied, Biomass_borealDataPrep create raster\nlayer versions studyAreaLarge studyArea (rasterToMatchLarge \nrasterToMatch, respectively), using stand biomass map layer\n(rawBiomassMap) template (.e., source information spatial\nresolution).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-forestedPix-ecolocations","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.1 Defining simulation pixels and ecolocations","text":"Biomass_borealDataPrep uses land-cover data define assign parameter\nvalues pixels forest dynamics simulated (forested pixels).\ndefault uses land-cover classes Land Cover Canada 2010 v1\nmap,\nraster-based database distinguishes several forest non-forest\nland-cover types. Pixels classes 1 6 included forested pixels\n(see parameter forestedLCCClasses).land-cover raster (rstLCC) includes transient cover types (e.g.,\nrecent burns) user may pass vector transient class IDs (via \nparameter LCCClassesToReplaceNN) reclassified “stable”\nforested class (defined via parameter forestedLCCClasses). \nreclassification done searching focal neighbourhood replacement\nforested cover class (radius 1250m focal cell). \nforested class found within perimeter, pixel used simulate\nforest dynamics. Reclassified pixels omitted fitting statistical\nmodels used parameter estimation, assigned predicted values \nmodels.Sub-regional spatial variation maxBiomass, maxANPP, SEP species\ntraits accounted ecolocation. Ecolocations used proxies \nbiophysical variation across landscape estimating model parameters \nvary spatially. default, defined combination \n“ecodistricts” National Ecological Framework \nCanada\n(broad-scale polygon layer captures sub-regional variation)\n(ecoregionLayer) land cover (rstLCC), user can change\nsupplying different ecozonation land-cover layers.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-sppcover","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.2 Species cover","text":"Species cover (% cover) raster layers (speciesLayers) can \nautomatically obtained pre-processed Biomass_borealDataPrep. module\nensures :data geospatial properties (extent, resolution);layers correctly re-projected studyAreaLarge \nrasterToMatchLarge;species cover values 10% excluded.default uses species % cover rasters derived MODIS\nsatellite imagery 2001, obtained Canadian National Forest\nInventory (Beaudoin et al. 2017) – hereafter ‘kNN species data’.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-init-B-age","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.3 Initial species age and biomass per pixel","text":"Stand age aboveground stand biomass (hereafter ‘stand biomass’) used \nderive parameters define initial species age biomass across \nlandscape. also derived MODIS satellite imagery 2001\nprepared NFI (Beaudoin et al. 2017) default.Biomass_borealDataPrep downloads data performs number data\nharmonization operations deal data inconsistencies. first searches\nmismatches stand age (standAge), stand biomass (standB) \ntotal stand cover (standCover), assuming cover accurate \nthree, biomass least, following order:Pixels standCover < 5% removed;Pixels standCover < 5% removed;Pixels standAge == 0, assigned standB == 0;Pixels standAge == 0, assigned standB == 0;Pixels standB == 0, assigned standAge == 0.Pixels standB == 0, assigned standAge == 0., species assigned one cohort per pixel according corrected stand\nage, stand biomass % cover values. Cohort age assumed \nstand age biomass product stand biomass species\n% cover. , stand cover rescaled vary 0\n100%.next set data inconsistencies cohort age (age), biomass (B) \ncover (cover) looked solved following order:cover > 0 age == 0, B set 0 (stand biomass\nrecalculated);cover > 0 age == 0, B set 0 (stand biomass\nrecalculated);cover == 0 age > 0, age == NA, age empirically\nestimated using remainder data fit model supplied \nP(sim)$imputeBadAgeModel, defaults :cover == 0 age > 0, age == NA, age empirically\nestimated using remainder data fit model supplied \nP(sim)$imputeBadAgeModel, defaults :Cohort biomass adjusted reflect different cover biomass\nrelationship conifer broadleaf species (see Adjustment initial\nspecies biomass).","code":"## [[1]]\n## lme4::lmer(age ~ log(totalBiomass) * cover * speciesCode + (log(totalBiomass) | \n## initialEcoregionCode))"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-spin-up","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.4 Replacing initial biomass and age within known fire perimeters","text":"Biomass_borealDataPrep can use fire perimeters correct stand ages. \n, downloads latest fire perimeter data Canadian Wildfire Data\nBase changes pixel age inside fire\nperimeters match time since last fire, using fire years first\nyear simulation.Taking two independent datasets stand age (fire perimeters) stand\nbiomass (derived MODIS satellite imagery) can cause discrepancies (e.g.\nstand age = 5 aboveground biomass = 10000 m2/ha). may due errors\ncoming ) stand replacing disturbance reset age zero years\n, biomass layer zeroed, b) disturbance \nstand-replacing (leaving biomass), age still zeroed. means \neither, aboveground biomass wrong age .Options address include 1) get better data two variables \ncontradict one another (currently available us) 2) estimate one\n. obvious way decide one incorrect, unless\nindependent data source.current Biomass_borealDataPrep module version, chose correct\n. P(sim)$fireURL provided P(sim)$overrideBiomassInFires \nTRUE, fire perimeters used source information age, \nBiomass_core used generate corresponding biomassvalues based \nestimated growth parameters known species presence/absence (species\ncover layers).assumes 1) recorded fires stand-replacing, time since fire\nnew stand age 2) first year simulation later \nfirst fire year fire perimeter data. biomass spin-\nBiomass_core run pixels stand ages corrected, long\nnew stand age (.e., time since last fire). specie start age\n= 0 biomass = 0, grow time since last fire achieved. \nresulting species biomass used initial biomass values species\ncohort actual simulation.user want perform imputation, step can bypassed\nsetting parameter P(sim)$overrideBiomassInFires FALSE \nP(sim)$fireURL NULL NA.Also pixels suffered kind data imputation (e.g., age\ncorrections detailed previous section) can \nexcluded simulation setting P(sim)$rmImputedPix == TRUE.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-invariant-traits","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.5 Invariant species traits","text":"invariant species traits obtained available species trait tables\nused LANDIS-II applications Canada’s boreal forests (available Dominic\nCyr’s GitHub repository).\nadapted minor adjustments match Western Canadian boreal\nforests using published literature. Others (key growth mortality traits) can\ncalibrated Biomass_speciesParameters (see Calibrating species\ngrowth/mortality traits using\nBiomass_speciesParameters).LANDIS-II species trait table contains species trait values \nCanadian Ecozone (NRCan 2013), default filtered Boreal\nShield West (BSW), Boreal Plains (BP) Montane Cordillera Canadian Ecozones\n(via P(sim)$speciesTableAreas). trait values vary across \necozones given species, minimum value used.function LandR::speciesTableUpdate used default \nadjustments trait values table (intended, custom\nfunction call NULL can passed P(sim)$speciesUpdateFunction):Longevity values adjusted match values Burton & Cumming (1995a), \nmatch BSP, BP MC ecozones. adjustments result higher longevity\nspecies;Longevity values adjusted match values Burton & Cumming (1995a), \nmatch BSP, BP MC ecozones. adjustments result higher longevity\nspecies;Shade tolerance values lowered Abies balsamifera, Abies\nlasiocarpa, Picea engelmanii, Picea glauca, Picea mariana, Tsuga\nheterophylla Tsuga mertensiana better relative shade tolerance\nlevels Western Canada. relative shade tolerances, \nuser always check values respect study\nareas species pool.Shade tolerance values lowered Abies balsamifera, Abies\nlasiocarpa, Picea engelmanii, Picea glauca, Picea mariana, Tsuga\nheterophylla Tsuga mertensiana better relative shade tolerance\nlevels Western Canada. relative shade tolerances, \nuser always check values respect study\nareas species pool.user can also pass one function call \nP(sim)$speciesUpdateFunction want make adjustments \naddition listed (see ?LandR::updateSpeciesTable).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-prob-germ","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.2.6 Probabilities of germination","text":"default, Biomass_borealDataPrep uses probabilities germination\n(called sufficientLight module) Biomass_core. obtained\npublicly available LANDIS-II\ntable.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"parameter-estimationcalibration","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3 Parameter estimation/calibration","text":"","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-adjustB","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.1 Adjustment of initial species biomass","text":"Biomass_borealDataPrep estimates initial values species aboveground biomass\n(B) based stand biomass (standB) individual species %\ncover. Initial B estimated species pixel multiplying\nstandB species % cover. default cover layers \nsatellite-derived, relationship relative cover relative biomass\nbroadleaf conifer species needs adjusted reflect different\ncanopy architectures (using P(sim)$deciduousCoverDiscount).default, Biomass_borealDataPrep uses previously estimated\nP(sim)$deciduousCoverDiscount based Northwest Territories data. However,\nuser can chose re-estimate setting\nP(sim)$fitDeciduousCoverDiscount == TRUE. case, default\nBiomass_borealDataPrep fit following model:relates estimated biomass (B) interaction term \nlog-age (logAge), standB (‘totalBiomass’), speciesCode (.e. species ID)\nland cover (‘lcc’). model fitted standB species cover \nstudyAreaLarge, using optimization routine searches best\nconversion factor broadleaf species cover B minimizing AIC.","code":"## [[1]]\n## glm(I(log(B/100)) ~ logAge * I(log(totalBiomass/100)) * speciesCode * \n## lcc)"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-maxB-maxANPP","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.2 Maximum biomass and maximum aboveground net primary productivity","text":"Biomass_borealDataPrep statistically estimates maximum biomass (maxB) \nmaximum aboveground net primary productivity (maxANPP) using processed\nspecies ages biomass.maxB estimated modelling response species biomass (B) \nspecies age cover, accounting variation ecolocations\n(ecoregionGroup ):coefficients estimated maximum likelihood model fit calculated\nproportion explained variance explained fixed effects \n(marginal r2) entire model (conditional r2) – \nprinted messages.model can take fit, default sample pixels within\nspecies ecolocation combination (sample size defined \nP(sim)$subsetDataBiomassModel parameter).convergence issues occur P(sim)$fixModelBiomass == TRUE, module\nattempts refit model re-sampling data, re-fitting lmer \nbobyqa optimizer, re-scaling continuous predictors (default,\ncover logAge). steps tried additively convergence\nissue resolved. module still unable solve convergence issue\nmessage printed module uses last fitted model.Note convergence issues usually problematic estimation \ncoefficient values, estimation standard errors. However, \nuser always inspect final model (especially converged) \nmake sure problems significant fitted model meets\nresidual assumptions. , user make sure model objects \nexported simList using exportModels parameter.Alternative model calls/formulas can supplied via P(sim)$biomassModel\nparameter. Note supplying model call use lme4::lmer\nrefitting process likely fail may disabled (via \nP(sim)$fixModelBiomass parameter).Another consideration add respect estimation maxB, \nchoosing linear model relate B ~ log(age) + cover. \nideal ecological point view, biomass unlikely vary linearly\nage cover, likely saturate beyond certain high value \ncover follow hump-shaped curve age (.e., reaching maximum values \ngiven age, starting decrease trees approach longevity). Also,\nfitting linear model can lead negative B values young ages low\ncover. However, tests revealed linear mixed effects model \nproducing abnormal estimates B maximum values age cover (hence,\nmaxB estimates), allowing leverage powerful statistical\nmachinery lme4.Finally, highlight modelling log(B) appropriate solution,\nwrongly assume exponential relationship \nB ~ log(age) + cover, leading serious overestimation maxB(Fig.\n5.1) steep increases species biomasses\nfirst years simulation (Fig. 5.2).\nFigure 5.1: Modelling biomass linear vs. exponential relationship. ) modelBiomass B ~ logAge * speciesCode + cover * speciesCode + (logAge + cover | ecoregionGroup). b) modelBiomass logB ~ logAge * speciesCode + cover * speciesCode + (logAge + cover | ecoregionGroup). Blue dots marginal mean B values (back-transformed b) cross ages confidence intervals bars.\n\nFigure 5.2: Thirty years simulation maxB values estimated logB ~ ... biomassModel (see Fig. 5.1). steep increase little time abnormal.\nbiomass model fit, maxB predicted species ecolocation\ncombination, maximum species cover values (100%) maximum\nlog-age (log species longevity). using Biomass_speciesParameters,\nmaxB calibrated species can achieve maximum observed biomass\nsimulation (see Calibrating species growth/mortality traits using\nBiomass_speciesParameters).maxANPP calculated maxB * mANPPproportion/100, \nmANPPproportion defaults 3.33, unless calibrated \nBiomass_speciesParameters (see Calibrating species growth/mortality traits\nusing Biomass_speciesParameters). default\nvalue, 3.33, comes inversion rationale used calculate maxB\nScheller & Mladenoff (2004). , authors estimated maxANPP using \nmodel PnET-II (adjusted values manually) estimates\ncalculated maxB multiplying estimated maxANPP 30.","code":"## [[1]]\n## lme4::lmer(B ~ logAge * speciesCode + cover * speciesCode + (logAge + \n## cover | ecoregionGroup))"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-SEP","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.3 Species establishment probability","text":"Species establishment probability (SEP, establishprob module) \nestimated modelling probability observing given species \necolocation. , Biomass_borealDataPrep models relationship \nprobability occurrence species (\\(\\pi\\)) using following model \ndefault:whereby probability occurrence species (\\(\\pi\\)) – calculated \nproportion pixels % cover > 0 – modelled per species\necolocation following binomial distribution logit link function.\ndata sub-sampling done fitting SEP statistical model, \nmodel fits quickly even large sample sizes (e.g., > 20 million\npoints).SEP predicted species ecolocation combination resulting\nvalues integrated length succession time step\n(successionTimestep parameter) :important, since seed establishment occurs every\nP(sim)$successionTimestep, thus probabilities seed establishment\nneed temporally integrated reflect probability seed\nestablishing period time.Finally, since observed species cover used fit coverModel result\nseed establishment resprouting/clonal growth, final species\nestablishment probabilities calculated function temporally\nintegrated presence probabilities species’ probabilities resprouting\n(resproutprob, species table) (bounded 0 1):\\(SEP > 1\\), :\\(SEP < 0\\), :","code":"## [[1]]\n## glm(cbind(coverPres, coverNum - coverPres) ~ speciesCode * ecoregionGroup, \n## family = binomial)"},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-minRelB","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.4 Ecolocation-specific parameter – minimum relative biomass","text":"Minimum relative biomass (minRelativeB) spatially-varying parameter used\ndetermine shade level pixel. shade class (X0-X5) defined\nminimum relative biomass threshold compared pixel’s current relative\nbiomass, calculated sum pixel’s total biomass divided \ntotal potential maximum biomass pixel (sum maxB \npixel’s ecolocation).Since found data base parametrisation shade class\nthresholds, default values based publicly available values used \nLANDIS-II applications Canada’s boreal forests (available Dominic Cyr’s\nGitHub repository), \necolocations share values.Initial runs revealed excessive recruitment moderately shade-intolerant\nspecies even stand biomass increased, values shade levels X4 X5\nadjusted downwards (X4: 0.8 0.75; X5: 0.90 0.85) reflect higher\ncompetition resources (e.g. higher water limitation) Western Canadian\nforests regards Eastern Canadian forests (Messier et al. 1998), \nlikely driven higher moisture limitation west (Hogg et al. 2008; Peng et al. 2011).adjustment can bypassed either supplying minRelativeB table, \nalternative function call P(sim)$minRelativeBFunction (default\nLandR::makeMinRelativeB.minimum biomass threshold shade level X0 0 standB.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-B_sppParams-calib","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.3.5 Calibrating species growth/mortality traits using Biomass_speciesParameters","text":"using Biomass_borealDataPrep Biomass_speciesParameters, later\nmodule calibrates several species traits first prepared \nBiomass_borealDataPrep:growthcurve, mortalityshape – initially come publicly\navailable LANDIS-II tables;growthcurve, mortalityshape – initially come publicly\navailable LANDIS-II tables;maxBiomass, maxANPP – estimated statistically \nBiomass_borealDataPrep (see Maximum biomass maximum aboveground net\nprimary productivity).maxBiomass, maxANPP – estimated statistically \nBiomass_borealDataPrep (see Maximum biomass maximum aboveground net\nprimary productivity).Briefly, Biomass_speciesParameters:Uses ~41,000,000 hypothetical species’ growth curves (generated \nBiomass_core), cover fully factorial combination longevity,\nratio maxANPP maxBiomass, growthcurve, mortalityshape;Uses ~41,000,000 hypothetical species’ growth curves (generated \nBiomass_core), cover fully factorial combination longevity,\nratio maxANPP maxBiomass, growthcurve, mortalityshape;Takes permanent temporary sample plot (PSP) data near study\narea target species, finds hypothetical species’ growth\ncurve closely matches growth curve observed PSP data – \nspecies--species base. gives us species’ growthcurve,\nmortalityshape, new species trait, mANPPproportion, ratio \nmaximum aboveground net primary productivity (maxANPP) maximum biomass\n(maxBiomass, confounded maxB) study area.Takes permanent temporary sample plot (PSP) data near study\narea target species, finds hypothetical species’ growth\ncurve closely matches growth curve observed PSP data – \nspecies--species base. gives us species’ growthcurve,\nmortalityshape, new species trait, mANPPproportion, ratio \nmaximum aboveground net primary productivity (maxANPP) maximum biomass\n(maxBiomass, confounded maxB) study area.Introduces second new species trait, inflationFactor, re-calibrates\nmaxB. recognize maxB, obtained empirically \nBiomass_borealDataPrep, easily reached simulations \nreasonable values growthcurve, mortalityshape longevity\nprevent equation reaching maxB (acts asymptote \nnever approached). inflationFactor calculated ratio \nmaxBiomass (parameter used generate theoretical growth curves \nstep 1) maximum biomass actually achieved theoretical growth\ncurves (step 1). maxB recalibrated multiplying \ninflationFactor. , resulting non-linear growth curves\ngenerated Biomass_core simulation able achieve \nempirically estimated maxB.Introduces second new species trait, inflationFactor, re-calibrates\nmaxB. recognize maxB, obtained empirically \nBiomass_borealDataPrep, easily reached simulations \nreasonable values growthcurve, mortalityshape longevity\nprevent equation reaching maxB (acts asymptote \nnever approached). inflationFactor calculated ratio \nmaxBiomass (parameter used generate theoretical growth curves \nstep 1) maximum biomass actually achieved theoretical growth\ncurves (step 1). maxB recalibrated multiplying \ninflationFactor. , resulting non-linear growth curves\ngenerated Biomass_core simulation able achieve \nempirically estimated maxB.Estimates species-specific maxANPP multiplying final maxB \nmANPPproportion (estimated step 2).Estimates species-specific maxANPP multiplying final maxB \nmANPPproportion (estimated step 2).cases insufficient PSP data perform steps, maxB\nmaxANPP left estimated Biomass_borealDataPrep (see Maximum\nbiomass maximum aboveground net primary\nproductivity) inflationFactor \nmANPPproportion take default values 1 3.33.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"aggregating-species","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.4 Aggregating species","text":"Biomass_borealDataPrep use input table sppEquiv parameter\nP(sim)$sppEquivCol select naming convention use simulation\n(see full list input objects \nparameters details). user can use table \nparameter define groupings “merge” similar species \ninvariant trait values (see Invariant species\ntraits) (e.g. genus-level group functional\ngroup). , name species group sppEquivCol column \nsppEquiv table must identical grouped species.\nTable 5.1: Example species merging simulation. user wants model Abies balsamea, . lasiocarpa Pinus contorta separate species, Picea spp. genus-level group. , six species identified ‘KNN’ column, % cover layers can obtained, ‘Boreal’ column (defines naming convention used simulation example) Picea spp. name. Biomass_borealDataPrep merge % cover data single layer summing cover per pixel.\ngroups contain species different (invariant) trait values, minimum\nvalue across species used. default species % cover\nlayers, Biomass_borealDataPrep proceeds way \nBiomass_speciesData sums cover across species group per pixel.","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-inputs-list","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.5 List of input objects","text":"full lists input objects (Table\n5.2) Biomass_borealDataPrep\nexpects.inputs must provided (.e., Biomass_borealDataPrep \ndefault ) studyArea (study area used simulate forest\ndynamics Biomass_core) studyAreaLarge (potentially larger study area\nused derive parameter values – e.g., species traits).input objects parameters internal defaults.inputs, following particularly important deserve special\nattention:Spatial layersecoregionLayer ecoregionRst – shapefile map containing\necological zones.ecoregionLayer ecoregionRst – shapefile map containing\necological zones.rawBiomassMap – map observed stand biomass (\\(g/m^2\\)).rawBiomassMap – map observed stand biomass (\\(g/m^2\\)).rstLCC – land-cover raster.rstLCC – land-cover raster.speciesLayers – layers species % cover data. species\nmust match available default (provided) species traits tables\n(species speciesEcoregion tables).speciesLayers – layers species % cover data. species\nmust match available default (provided) species traits tables\n(species speciesEcoregion tables).standAgeMap – map observed stand ages (years).standAgeMap – map observed stand ages (years).studyArea – shapefile. SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input object must\nsupplied user.studyArea – shapefile. SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input object must\nsupplied user.studyAreaLarge – shapefile. SpatialPolygonsDataFrame single\npolygon determining statistical models parameter\nestimation fitted. must contain studyArea fully, \nidentical. object must supplied user.studyAreaLarge – shapefile. SpatialPolygonsDataFrame single\npolygon determining statistical models parameter\nestimation fitted. must contain studyArea fully, \nidentical. object must supplied user.TablesspeciesTable – table invariant species traits must \nfollowing columns (even necessary simulation):\n“species”, “Area”, “longevity”, “sexualmature”, “shadetolerance”,\n“firetolerance”, “seeddistance_eff”, “seeddistance_max”, “resproutprob”,\n“resproutage_min”, “resproutage_max”, “postfireregen”, “leaflongevity”,\n“wooddecayrate”, “mortalityshape”, “growthcurve”, “leafLignin”, “hardsoft”.\norder can vary column names must identical. See Scheller & Miranda (2015b)\nBiomass_core manual detail columns.\nTable 5.2: List Biomass_borealDataPrep input objects description.\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-params-list","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.6 List of parameters","text":"Table 5.3 lists parameters used\nBiomass_borealDataPrep detailed information. default\nvalues specified module’s metadata.parameters, following particularly important:Estimation simulation parametersbiomassModel – statistical model (function call) used \nestimate maxB maxANPP.biomassModel – statistical model (function call) used \nestimate maxB maxANPP.coverModel – statistical model (function call) used estimate\nSEP.coverModel – statistical model (function call) used estimate\nSEP.fixModelBiomass – determines whether biomassModel re-fit \nconvergence issues arise.fixModelBiomass – determines whether biomassModel re-fit \nconvergence issues arise.imputeBadAgeModel – model used impute ages missing, \nmatch input cover biomass data. confounded \ncorrecting ages fire dataimputeBadAgeModel – model used impute ages missing, \nmatch input cover biomass data. confounded \ncorrecting ages fire datasubsetDataAgeModel subsetDataBiomassModel – control data\nsub-sampling fitting imputeBadAgeModel biomassModel,\nrespectivelysubsetDataAgeModel subsetDataBiomassModel – control data\nsub-sampling fitting imputeBadAgeModel biomassModel,\nrespectivelyexportModels – controls whether biomassModel coverModel ()\nexported simulation simList, can useful \ninspect fitted models report statistical fit.exportModels – controls whether biomassModel coverModel ()\nexported simulation simList, can useful \ninspect fitted models report statistical fit.sppEquivCol – character. column name speciesEquivalency\ndata.table defines naming convention use throughout \nsimulation.sppEquivCol – character. column name speciesEquivalency\ndata.table defines naming convention use throughout \nsimulation.Data processingforestedLCCClasses LCCClassesToReplaceNN – define land-cover\nclasses rstLCC forested reclassified \nforested classes, respectively.forestedLCCClasses LCCClassesToReplaceNN – define land-cover\nclasses rstLCC forested reclassified \nforested classes, respectively.deciduousCoverDiscount, coverPctToBiomassPctModel \nfitDeciduousCoverDiscount – first adjustment factor \nbroadleaf species cover biomass relationships; second third \nmodel used refit deciduousCoverDiscount supplied\nstudyAreaLarge whether refitting attempted (respectively).deciduousCoverDiscount, coverPctToBiomassPctModel \nfitDeciduousCoverDiscount – first adjustment factor \nbroadleaf species cover biomass relationships; second third \nmodel used refit deciduousCoverDiscount supplied\nstudyAreaLarge whether refitting attempted (respectively).\nTable 5.3: List Biomass_borealDataPrep parameters description.\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-outputs-list","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.7 List of outputs","text":"module produces following outputs (Table\n5.4), key inputs \nBiomass_core.TablescohortData – initial community table, containing corrected biomass\n(g/m2), age species cover data, well ecolocation pixelGroup\ninformation. table defines initial community composition \nstructure used Biomass_core.cohortData – initial community table, containing corrected biomass\n(g/m2), age species cover data, well ecolocation pixelGroup\ninformation. table defines initial community composition \nstructure used Biomass_core.species – table invariant species traits. contain traits\nspeciesTable , adjusted necessary.species – table invariant species traits. contain traits\nspeciesTable , adjusted necessary.speciesEcoregion – table spatially-varying species traits (maxB,\nmaxANPP, SEP).speciesEcoregion – table spatially-varying species traits (maxB,\nmaxANPP, SEP).minRelativeB – minimum relative biomass thresholds determine shade\nlevel pixel. X0-5 represent site shade classes -shade (0) \nmaximum shade (5).minRelativeB – minimum relative biomass thresholds determine shade\nlevel pixel. X0-5 represent site shade classes -shade (0) \nmaximum shade (5).sufficientLight – probability germination species shade tolerance\n(species) shade level(defined byminRelativeB`)sufficientLight – probability germination species shade tolerance\n(species) shade level(defined byminRelativeB`)Spatial layersbiomassMap – map initial stand biomass values adjustments \ndata mismatches.biomassMap – map initial stand biomass values adjustments \ndata mismatches.pixelGroupMap – map containing pixelGroup IDs per pixel. defines\ninitial map used hashing within Biomass_core, conjunction \ncohortData.pixelGroupMap – map containing pixelGroup IDs per pixel. defines\ninitial map used hashing within Biomass_core, conjunction \ncohortData.ecoregionMap – map ecolocations.ecoregionMap – map ecolocations.\nTable 5.4: List Biomass_borealDataPrep output objects description.\n","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-sim-flow","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.2.8 Simulation flow and module events","text":"Biomass_borealDataPrep initialises prepares inputs, provided \ninternet access retrieve raw datasets, parametrisation use \nBiomass_core.module runs one time step contains general flow \nBiomass_borealDataPrep processes :Preparation necessary data input objects require\nparameter fitting (e.g., invariant species traits table, creating\necolocations);Preparation necessary data input objects require\nparameter fitting (e.g., invariant species traits table, creating\necolocations);Fixing mismatched raw cover, biomass age data;Fixing mismatched raw cover, biomass age data;Imputing age values pixels mismatches exist age data missing;Imputing age values pixels mismatches exist age data missing;Construction initial data.table cohort biomass age per pixel\n(ecolocation information);Construction initial data.table cohort biomass age per pixel\n(ecolocation information);Sub-setting pixels forested land-cover classes (optional) converting\ntransient land-cover classes forested classes;Sub-setting pixels forested land-cover classes (optional) converting\ntransient land-cover classes forested classes;Fitting coverModel;Fitting coverModel;Fitting biomassModel (re-fitting necessary – optional);Fitting biomassModel (re-fitting necessary – optional);Estimating maxB, maxANPP SEP per species ecolocation.Estimating maxB, maxANPP SEP per species ecolocation.(OPTIONAL) Correcting ages pixels inside fire perimeters reassigning\nbiomass.(OPTIONAL) Correcting ages pixels inside fire perimeters reassigning\nbiomass.[steps 1-9 part init event. step 1, data downloaded\nrun .inputObjects function](OPTIONAL) Plots maxB, maxANPP SEP maps (plot event);(OPTIONAL) Plots maxB, maxANPP SEP maps (plot event);(OPTIONAL) Save outputs (save event)(OPTIONAL) Save outputs (save event)","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-example","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.3 Usage example","text":"module can run stand-alone, won’t much prepare\ninputs Biomass_core. Hence, provide usage example module \nothers \nrepository \nBarros et al. (2023).","code":""},{"path":"landr-biomass_borealdataprep-module.html","id":"bboreal-refs","chapter":"5 LandR Biomass_borealDataPrep Module","heading":"5.4 References","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"landr-biomass_core-module","chapter":"6 LandR Biomass_core Module","heading":"6 LandR Biomass_core Module","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"authors-3","chapter":"6 LandR Biomass_core Module","heading":"6.0.0.1 Authors:","text":"Yong Luo yluo1@lakeheadu.ca [aut], Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Ceres Barros ceres.barros@ubc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [aut], Ian Eddy ian.eddy@nrcan-rncan.gc.ca [ctb], Jean Marchal jean.d.marchal@gmail.com [ctb]\ndocumentation work progress. Potential discrepancies omissions\nmay exist time . find , contact us using “Get help”\nlink .","code":""},{"path":"landr-biomass_core-module.html","id":"module-overview-3","chapter":"6 LandR Biomass_core Module","heading":"6.1 Module Overview","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"quick-links-1","chapter":"6 LandR Biomass_core Module","heading":"6.1.1 Quick links","text":"General functioningGeneral functioningList input objectsList input objectsList parametersList parametersList outputsList outputsSimulation flow module eventsSimulation flow module events","code":""},{"path":"landr-biomass_core-module.html","id":"summary-1","chapter":"6 LandR Biomass_core Module","heading":"6.1.2 Summary","text":"LandR Biomass_core (hereafter Biomass_core) core forest succession\nsimulation module LandR ecosystem SpaDES modules (see Chubaty & McIntire 2019). simulates tree cohort ageing, growth, mortality \ncompetition light resources, well seed dispersal (Fig.\n6.1), spatially explicit manner using yearly\ntime step. model based LANDIS-II Biomass Succession Extension\nv.3.2.1 (LBSE, Scheller & Miranda 2015a), changes (see Differences\nBiomass_core LBSE). Nonetheless, \nessential functioning succession model still largely follows \nLANDIS-II counterpart, refer reader corresponding LBSE manual\n(Scheller & Miranda 2015a) detailed reading mechanisms implemented \nmodel.\nFigure 6.1: Biomass_core simulates tree cohort growth, mortality, recruitment dispersal dynamics, function cohort ageing competition light (shading) space, well disturbances like fire (simulated using modules).\n","code":""},{"path":"landr-biomass_core-module.html","id":"links-modules","chapter":"6 LandR Biomass_core Module","heading":"6.1.3 Links to other modules","text":"Biomass_core intended used data/calibration modules, disturbance\nmodules validation modules, amongst others. following list \nmodules commonly used Biomass_core. yet LandR\nManual see individual module’s\ndocumentation (.Rmd file) available repository.See \navailable modules select Biomass_core drop-menu see\nlinkages.Data calibration modules:Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory;Biomass_speciesData:\ngrabs merges several sources species cover data, making species\npercent cover (% cover) layers used LandR Biomass\nmodules. Default source data spans entire Canadian territory;Biomass_borealDataPrep:\nprepares parameters inputs (including initial landscape conditions)\nBiomass_core needs run realistic simulation. Default\nvalues/inputs produced relevant boreal forests Western Canada;Biomass_borealDataPrep:\nprepares parameters inputs (including initial landscape conditions)\nBiomass_core needs run realistic simulation. Default\nvalues/inputs produced relevant boreal forests Western Canada;Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada.Biomass_speciesParameters:\ncalibrates four-species level traits using permanent sample plot data (.e.,\nrepeated tree biomass measurements) across Western Canada.Disturbance-related modules:Biomass_regeneration:\nsimulates cohort biomass responses stand-replacing fires (LBSE),\nincluding cohort mortality regeneration resprouting /\nserotiny;Biomass_regeneration:\nsimulates cohort biomass responses stand-replacing fires (LBSE),\nincluding cohort mortality regeneration resprouting /\nserotiny;Biomass_regenerationPM:\nlike Biomass_regeneration, allowing partial mortality. Based \nLANDIS-II Dynamic Fuels & Fire System extension (Sturtevant et al. 2018);Biomass_regenerationPM:\nlike Biomass_regeneration, allowing partial mortality. Based \nLANDIS-II Dynamic Fuels & Fire System extension (Sturtevant et al. 2018);fireSense: climate- land-cover-sensitive fire model simulating fire\nignition, escape spread processes function climate \nland-cover. Includes built-parameterisation processes using\nclimate, land-cover, fire occurrence fire perimeter data. Requires using\nBiomass_regeneration Biomass_regenerationPM. See modules prefixed\n“fireSense_” https://github.com/PredictiveEcology/;fireSense: climate- land-cover-sensitive fire model simulating fire\nignition, escape spread processes function climate \nland-cover. Includes built-parameterisation processes using\nclimate, land-cover, fire occurrence fire perimeter data. Requires using\nBiomass_regeneration Biomass_regenerationPM. See modules prefixed\n“fireSense_” https://github.com/PredictiveEcology/;LandMine: wildfire\nignition cover-sensitive wildfire spread model based fire return\ninterval input. Requires using Biomass_regeneration \nBiomass_regenerationPM;LandMine: wildfire\nignition cover-sensitive wildfire spread model based fire return\ninterval input. Requires using Biomass_regeneration \nBiomass_regenerationPM;scfm: spatially explicit fire\nspread module parameterised modelled stochastic three-part process\nignition, escape, spread. Requires using Biomass_regeneration \nBiomass_regenerationPM.scfm: spatially explicit fire\nspread module parameterised modelled stochastic three-part process\nignition, escape, spread. Requires using Biomass_regeneration \nBiomass_regenerationPM.Validation modules:Biomass_validationKNN:\ncalculates two validation metrics (mean absolute deviation sum \nnegative log-likelihoods) species presences/absences biomass-related\nproperties across simulated landscape. default, uses \nindependent dataset species % cover stand biomass \n2011, assuming second snapshot landscape.","code":""},{"path":"landr-biomass_core-module.html","id":"module-manual-2","chapter":"6 LandR Biomass_core Module","heading":"6.2 Module manual","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"general-functioning","chapter":"6 LandR Biomass_core Module","heading":"6.2.1 General functioning","text":"Biomass_core forest landscape model based LANDIS-II Biomass\nSuccession Extension v.3.2.1 model (LBSE, Scheller & Miranda 2015a). core\nforest succession model LandR ecosystem SpaDES modules. Similarly \nLBSE, Biomass_core simulates changes tree cohort aboveground biomass\n(\\(g/m^2\\)) calculating growth, mortality recruitment functions pixel\nspecies characteristics, competition disturbances (Fig.\n6.1). Note , default, cohorts unique\ncombinations species age, can changed via \ncohortDefinitionCols parameter (see List parameters).Specifically, cohort growth driven invariant (growth shape parameter,\ngrowthcurve) spatio-temporally varying species traits (maximum biomass,\nmaxB, maximum annual net primary productivity, maxANPP), \nbackground mortality (.e., caused disturbances) depends \ninvariant species traits (longevity mortality shape parameter,\nmortalityshape). five traits directly influence realised shape\nspecies growth curves, determining fast grow (growthcurve \nmaxANPP), soon age mortality starts respect longevity\n(mortalityshape) biomass cohort can potentially achieve (maxB).Cohort recruitment determined available “space” (.e., pixel shade),\ninvariant species traits (regeneration mode, postfireregen, age maturity,\nsexualmature, shade tolerance, shadetolerance) third spatio-temporally\nvarying trait (species establishment probability, establishprob, called SEP\nhereafter). available “growing space” calculated species’ maxB\nminus occupied biomass (summed across cohorts pixel). \n“space”, cohort can establish one three recruitment modes:\nserotiny, resprouting germination.Disturbances (e.g., fire) can cause cohort mortality trigger\npost-disturbance regeneration. Two post-disturbance regeneration mechanisms \nimplemented, following LBSE: serotiny resprouting\n(Scheller & Miranda 2015a). Post-disturbance mortality regeneration occur\nresponse fire simulated two separate, interchangeable\nmodules, Biomass_regeneration Biomass_regenerationPM differ \nrespect level post-fire mortality simulate (complete partial\nmortality, respectively).Cohort germination (also called cohort establishment) occurs seeds \navailable local sources (pixel), via seed dispersal. Seed dispersal\ncan three modes: ‘dispersal’, ‘universal dispersal’ (arguably, \ninteresting dummy case studies) ‘ward dispersal’ (Scheller & Miranda 2015a).\nBriefly, ‘ward dispersal’ algorithm describes flexible kernel \ncalculates probability species colonising neighbour pixel \nfunction distance source dispersal-related (invariant)\nspecies traits, used default.Finally, germination regeneration success depend species’\nprobability germination given pixel (probabilities \ngermination).refer reader Scheller & Miranda (2015a), Scheller & Domingo (2011) \nScheller & Domingo (2012) details respect mentioned\nmechanisms implemented Biomass_core. later section manual, \nhighlight existing differences Biomass_core \nLBSE, together comparisons two\nmodules.","code":""},{"path":"landr-biomass_core-module.html","id":"init-inputs-params","chapter":"6 LandR Biomass_core Module","heading":"6.2.2 Initialisation, inputs and parameters","text":"initialise simulate forest dynamics given landscape,\nBiomass_core requires number inputs parameters namely:initial cohort biomass age values across landscape;initial cohort biomass age values across landscape;invariant species traits values;invariant species traits values;spatio-temporally varying species traits values (just\nspatially-varying);spatio-temporally varying species traits values (just\nspatially-varying);location- (ecolocation-) specific parameters;location- (ecolocation-) specific parameters;probabilities germination given species’ shade\ntolerance site shade.probabilities germination given species’ shade\ntolerance site shade.detailed full list input objects.\nBiomass_borealDataPrep module manual also provides information \nestimation many traits/inputs available data, \nadjustment using published values best knowledge boreal forest\ndynamics Western Canada.Unlike initialisation LBSE5, Biomass_core initialises\nsimulation using data-derived initial cohort biomass age. \ninformation ideally supplied data calibration modules like\nBiomass_borealDataPrep (Links modules), \nBiomass_core can also initialise using theoretical data.Similarly, although Biomass_core can create necessary traits \nparameters using theoretical values, realistic simulations \nprovided data calibration modules, like Biomass_borealDataPrep \nBiomass_speciesParameters. advise future users developers become\nfamiliar data modules try create modules (\nmodify existing ones) purpose.","code":""},{"path":"landr-biomass_core-module.html","id":"initial-objs","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.1 Initial cohort biomass and age","text":"Initial cohort biomass age derived stand biomass (biomassMap\nraster layer), stand age (standAgeMap raster layer) species %\ncover (speciesLayers raster layers) data (see Table\n6.5) formatted cohortData\nobject. cohortData table central simulation object tracks \ncurrent year’s cohort biomass, age, mortality (lost biomass) aboveground net\nprimary productivity (ANPP) per species pixel group (pixelGroup). \nstart simulation, cohortData values cohort\nmortality ANPP.pixelGroup collection pixels share ecolocation\n(coded ecoregionMap raster layer) cohort composition. \ndefault, ecolocation combination land-cover ecological zonation\n(see ecoregionMap full list inputs) unique\ncohort compositions defined unique combinations species, age \nbiomass. cohortData table therefore always associated current\nyear’s pixelGroupMap raster layer, provides spatial location \npixelGroups, allowing “spatialise” cohort information dynamics (e.g.,\ndispersal) pixel pixel basis (see also\nHashing).user, another module, may provide initial cohortData \npixelGroupMap objects start simulation, input objects necessary\nproduce : study area polygon (studyArea), biomassMap,\nstandAgeMap, speciesLayers ecoregionMap raster layers (see list\ninput objects detail).","code":""},{"path":"landr-biomass_core-module.html","id":"invariant-traits","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.2 Invariant species traits","text":"spatio-temporally constant traits mostly influence population\ndynamics (e.g., growth, mortality, dispersal) responses fire (fire\ntolerance regeneration).default, Biomass_core obtains trait values available LANDIS-II tables\n(see Table 6.5), traits can \nadjusted/supplied user modules. instance, using\nBiomass_borealDataPrep adjust trait values Western Canadian\nboreal forests (e.g., longevity values adjusted following Burton & Cumming 1995b), using Biomass_speciesParameters calibrates \ngrowthcurve mortalityshape parameters estimates two additional\nspecies traits (inflationFactor mANPPproportion) calibrate maxB \nmaxANPP (respectively).Table 6.1 shows example table invariant\nspecies traits. Note Biomass_core (alone) requires columns Table\n6.1 present, exception \nfiretolerance, postfireregen, resproutprob, resproutage_min \nresproutage_max, used post-fire regeneration modules\n(Biomass_regeneration Biomass_regenerationPM).Please see Scheller & Domingo (2011) Scheller & Miranda (2015a) \ndetail.\nTable 6.1: Example invariant species traits table (species table object module), species Abies sp. (Abie_sp), Picea engelmannii (Pice_eng), Picea glauca (Pice_gla), Pinus sp. (Pinu_sp), Populus sp. (Popu_sp) Pseudotsuga menziesii (Pseu_men). Note theoretical values.\n","code":""},{"path":"landr-biomass_core-module.html","id":"varying-traits","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.3 Spatio-temporally varying species traits","text":"traits vary species, ecolocation , potentially, year \nyear column omitted several years exist (case last\nyear’s values current simulation year always used). \nmaximum biomass, maxB, maximum -ground net primary productivity,\nmaxANPP, species establishment probability, SEP (called establishprob \nmodule). default, Biomass_core assigns theoretical values \ntraits, thus recommend using Biomass_borealDataPrep obtain realistic\ntrait values derived data (default, pertinent Canadian boreal forest\napplications), passing custom table directly. Biomass_speciesParameters\ncalibrates maxB maxANPP estimating two additional invariant\nspecies traits (inflationFactor mANPPproportion; also Western\nCanadian forests). See Table 6.2 example.\nTable 6.2: Example spatio-temporally varying species traits table (speciesEcoregion table object module), two ecolocations (called ecoregionGroups) species Abies sp. (Abie_sp), Picea engelmannii (Pice_eng), Picea glauca (Pice_gla), Pinus sp. (Pinu_sp), Populus sp. (Popu_sp) Pseudotsuga menziesii (Pseu_men). simulation runs 10 year using table, trait values year 2 used simulation years 2-10.\n","code":""},{"path":"landr-biomass_core-module.html","id":"ecolocation-traits","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.4 Ecolocation-specific parameters – minimum relative biomass","text":"Minimum relative biomass (minRelativeB) ecolocation-specific\nparameter used Biomass_core. used determine shade level \npixel (.e., site shade) respect total potential maximum\nbiomass pixel (.e., sum maxB values pixel’s\necolocation). relative biomass stand (regards total\npotential maximum biomass) minimum relative biomass thresholds, \npixel assigned threshold’s site shade value (Scheller & Miranda 2015a).shade level influences germination regeneration new cohorts,\ndepending shade tolerance (see Probabilities \ngermination).Site shade varies X0 (shade) X5 (maximum shade). default,\nBiomass_core uses minimum realtive biomass threshold values across\necolocations, adjusted publicly available LANDIS-II\ntable better reflect\nWestern Canada boreal forest dynamics (see Table 6.3).\nBiomass_borealDataPrep adjustment default. \ninputs, values can adjusted using modules passing\nuser-defined tables.\nTable 6.3: Example minimum relative biomass table (minRelativeB table object module), two ecolocations (ecoregionGroups) sharing values\n","code":""},{"path":"landr-biomass_core-module.html","id":"prob-germ","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.5 Probabilities of germination","text":"species’ probability germination results combination shade\ntolerance level (invariant species trait species table; Table\n6.1) site shade (defined amount \nbiomass pixel – see minimum relative biomass\nparameter Scheller & Miranda 2015a). default, \nBiomass_core Biomass_borealDataPrep use publicly available LANDIS-II\ntable (called sufficientLight module; Table 6.4).\nTable 6.4: Default species probability germination values used Biomass_core Biomass_borealDataPrep. Columns X0-X5 different site shade levels line probability germination site shade species shade tolerance combination.\n","code":""},{"path":"landr-biomass_core-module.html","id":"other-inputs","chapter":"6 LandR Biomass_core Module","heading":"6.2.2.6 Other module inputs","text":"remaining module input objects either directly influence basic\nmechanisms implemented Biomass_core (e.g., sppColorVect \nstudyAreaReporting used plotting purposes), objects keep\ntrack property/process module (e.g., lastReg counter \nlast year regeneration occurred), define study area \nsimulation (e.g., studyArea rasterToMatch).next section provides complete list input objects, including \nalready mentioned .","code":""},{"path":"landr-biomass_core-module.html","id":"inputs-list","chapter":"6 LandR Biomass_core Module","heading":"6.2.3 List of input objects","text":"Biomass_core’s input objects (theoretical) defaults \nproduced automatically module6. suggest new users\nrun Biomass_core supplying studyArea polygon, \nattempting supply combining Biomass_core modules.\nenable become familiar input objects \ntheoretical setting.inputs listed Table 6.5, \nfollowing particularly important deserve special attention:Spatial layersecoregionMap – raster layer ecolocation IDs. Note term\n“ecoregion” inherited LBSE kept consistency original\nLBSE code, prefer call ecolocations avoid confusion \necoregion-level classification National Ecological\nClassification Canada\n(NECC).\nEcolocations group pixels similar biophysical conditions. default,\nuse two levels grouping applications: first level \necological classification ecodistricts NECC, second\nlevel land-cover classification. Hence, ecolocations contain\nrelatively coarse scale regional information plus finer scale land cover\ninformation. ecoregionMap layer must defined categorical\nraster, associated Raster Attribute Table (RAT; see, e.g.,\nraster::ratify). RAT must contain columns: ID (value \nraster layer), ecoregion (first level grouping) \necoregionGroup (full ecolocation “name” written \n). Note creating ecoregionGroup’s \ncombining two raster layers whose values numeric (\nBiomass_borealDataPrep), group label character combination two\nnumeric grouping levels. instance, Natural Ecoregion 2 \nland-cover types 1, 2 3, RAT contain ID = {1,2,3},\necoregion = {2} ecoregionGroup = {2_1, 2_2, 2_3}. However, user\nfree use groupings wish. Finally, note ecolocations\n(ecoregionGroup’s) listed ecoregion table.ecoregionMap – raster layer ecolocation IDs. Note term\n“ecoregion” inherited LBSE kept consistency original\nLBSE code, prefer call ecolocations avoid confusion \necoregion-level classification National Ecological\nClassification Canada\n(NECC).\nEcolocations group pixels similar biophysical conditions. default,\nuse two levels grouping applications: first level \necological classification ecodistricts NECC, second\nlevel land-cover classification. Hence, ecolocations contain\nrelatively coarse scale regional information plus finer scale land cover\ninformation. ecoregionMap layer must defined categorical\nraster, associated Raster Attribute Table (RAT; see, e.g.,\nraster::ratify). RAT must contain columns: ID (value \nraster layer), ecoregion (first level grouping) \necoregionGroup (full ecolocation “name” written \n). Note creating ecoregionGroup’s \ncombining two raster layers whose values numeric (\nBiomass_borealDataPrep), group label character combination two\nnumeric grouping levels. instance, Natural Ecoregion 2 \nland-cover types 1, 2 3, RAT contain ID = {1,2,3},\necoregion = {2} ecoregionGroup = {2_1, 2_2, 2_3}. However, user\nfree use groupings wish. Finally, note ecolocations\n(ecoregionGroup’s) listed ecoregion table.rasterToMatch – RasterLayer, given resolution projection\ndetermining pixels (.e., non-NA values) forest dynamics \nsimulated. Needs match studyArea. supplied, Biomass_core\nattempts produce studyArea, using biomassMap template\nspatial resolution projection.rasterToMatch – RasterLayer, given resolution projection\ndetermining pixels (.e., non-NA values) forest dynamics \nsimulated. Needs match studyArea. supplied, Biomass_core\nattempts produce studyArea, using biomassMap template\nspatial resolution projection.studyArea – SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input\nobject must supplied user another module.studyArea – SpatialPolygonsDataFrame single polygon\ndetermining simulation take place. input\nobject must supplied user another module.Species traits parameter tablesecoregion – data.table listing ecolocation “names”\n(ecoregionGroup column; see ecoregionMap details) \nstate (active – yes – inactive – )ecoregion – data.table listing ecolocation “names”\n(ecoregionGroup column; see ecoregionMap details) \nstate (active – yes – inactive – )minRelativeB – data.table minimum relative biomass values. See\nEcolocation-specific parameters – minimum relative\nbiomass.minRelativeB – data.table minimum relative biomass values. See\nEcolocation-specific parameters – minimum relative\nbiomass.species – data.table invariant species\ntraits.species – data.table invariant species\ntraits.speciesEcoregion – data.table spatio-temporally varying species\ntraits.speciesEcoregion – data.table spatio-temporally varying species\ntraits.sufficientLight – data.table defining probability germination\nspecies, given shadetolerance level (see species ) \nshade level pixel (see minRelativeB ). See Probabilities\ngermination.sufficientLight – data.table defining probability germination\nspecies, given shadetolerance level (see species ) \nshade level pixel (see minRelativeB ). See Probabilities\ngermination.sppEquiv – data.table species name equivalences various\nconventions. must contain columns LandR (species IDs LandR\nformat), EN_generic_short (short generic species names English – \nlanguage – used plotting), Type (type species, Conifer\nDeciduous, “broadleaf”) Leading (EN_generic_short\n“leading” appended – e.g., “Poplar\nleading”).\nSee ?LandR::sppEquivalencies_CA information.sppEquiv – data.table species name equivalences various\nconventions. must contain columns LandR (species IDs LandR\nformat), EN_generic_short (short generic species names English – \nlanguage – used plotting), Type (type species, Conifer\nDeciduous, “broadleaf”) Leading (EN_generic_short\n“leading” appended – e.g., “Poplar\nleading”).\nSee ?LandR::sppEquivalencies_CA information.sppColorVect – character. named vector colours used plot species\ndynamics. contain one colour per species species table ,\npotentially colour species mixtures (named “Mixed”). Vector names must\nfollow species$speciesCode.sppColorVect – character. named vector colours used plot species\ndynamics. contain one colour per species species table ,\npotentially colour species mixtures (named “Mixed”). Vector names must\nfollow species$speciesCode.sppNameVector – (OPTIONAL) character vector species simulated.\nprovided, Biomass_core uses vector (attempt ) obtain speciesLayers\nlisted species. provided, user (another module) can pass filtered sppEquiv table\n(.e., containing species simulated). neither provided,\nBiomass_core attempts use species finds available species\n% cover data study area.sppNameVector – (OPTIONAL) character vector species simulated.\nprovided, Biomass_core uses vector (attempt ) obtain speciesLayers\nlisted species. provided, user (another module) can pass filtered sppEquiv table\n(.e., containing species simulated). neither provided,\nBiomass_core attempts use species finds available species\n% cover data study area.Cohort-simulation-related objectscohortData – data.table containing initial cohort information per\npixelGroup (see pixelGroupMap ). table updated \nsimulation cohort dynamics simulated. must contain following\ncolumns:\npixelGroup – integer. pixelGroup ID. See\nHashing.\necoregionGroup – character. Ecolocation names. See ecoregionMap \necoregion objects .\nspeciesCode – character. Species ID.\nage – integer. Cohort age.\nB – integer. Cohort biomass current year \\(g/m^2\\).\nmortality – integer. Cohort dead biomass current year \n\\(g/m^2\\). Usually filled 0s initial conditions.\naNPPAct – integer. Actual aboveground net primary productivity \ncurrent year \\(g/m^2\\). B result previous year’s B\nminus current year’s mortality plus aNPPAct. Usually filled \n0s initial conditions. See “1.1.3 Cohort growth ageing” section\nScheller & Miranda (2015a).\ncohortData – data.table containing initial cohort information per\npixelGroup (see pixelGroupMap ). table updated \nsimulation cohort dynamics simulated. must contain following\ncolumns:pixelGroup – integer. pixelGroup ID. See\nHashing.pixelGroup – integer. pixelGroup ID. See\nHashing.ecoregionGroup – character. Ecolocation names. See ecoregionMap \necoregion objects .ecoregionGroup – character. Ecolocation names. See ecoregionMap \necoregion objects .speciesCode – character. Species ID.speciesCode – character. Species ID.age – integer. Cohort age.age – integer. Cohort age.B – integer. Cohort biomass current year \\(g/m^2\\).B – integer. Cohort biomass current year \\(g/m^2\\).mortality – integer. Cohort dead biomass current year \n\\(g/m^2\\). Usually filled 0s initial conditions.mortality – integer. Cohort dead biomass current year \n\\(g/m^2\\). Usually filled 0s initial conditions.aNPPAct – integer. Actual aboveground net primary productivity \ncurrent year \\(g/m^2\\). B result previous year’s B\nminus current year’s mortality plus aNPPAct. Usually filled \n0s initial conditions. See “1.1.3 Cohort growth ageing” section\nScheller & Miranda (2015a).aNPPAct – integer. Actual aboveground net primary productivity \ncurrent year \\(g/m^2\\). B result previous year’s B\nminus current year’s mortality plus aNPPAct. Usually filled \n0s initial conditions. See “1.1.3 Cohort growth ageing” section\nScheller & Miranda (2015a).pixelGroupMap – raster layer pixelGroup IDs per pixel. Pixels\nalways grouped based identical ecoregionGroup, speciesCode, age\nB composition, even user supplies initial groupings\n(e.g., possible Biomass_borealDataPrep data module).\npixelGroupMap – raster layer pixelGroup IDs per pixel. Pixels\nalways grouped based identical ecoregionGroup, speciesCode, age\nB composition, even user supplies initial groupings\n(e.g., possible Biomass_borealDataPrep data module).\n\nTable 6.5: List Biomass_core input objects description.\n","code":""},{"path":"landr-biomass_core-module.html","id":"params-list","chapter":"6 LandR Biomass_core Module","heading":"6.2.4 List of parameters","text":"addition inputs objects, Biomass_core uses several\nparameters7 control aspects like simulation length, \n“succession” time step, plotting saving intervals, amongst others. Note \nparameters relevant simulating climate effects \ncohort growth mortality, require also loading LandR.CS R\npackage8 (another similar package). discussed\ndetail , since climate effects calculated externally \nBiomass_core LandR.CS functions thus documented .list useful parameters description listed , \nfull set parameters Table 6.6. Like\ninput objects, default values supplied parameters \nsuggest user becomes familiarized attempting changes.\nalso note \"spin-\" \"biomassMap\" options \ninitialBiomassSource parameter currently deactivated, since Biomass_core\nlonger generates initial cohort biomass conditions using spin-based \ninitial stand age like LANDIS-II (\"spin-\"), attempt fill\ninitial cohort biomasses using biomassMap.Plotting saving - .plots – activates/deactivates plotting defines\ntype plotting (see ?Plots);.plotInitialTime – defines plotting starts;.plotInitialTime – defines plotting starts;.plotInterval – defines plotting frequency;.plotInterval – defines plotting frequency;.plotMaps – activates/deactivates map plotting;.plotMaps – activates/deactivates map plotting;.saveInitialTime – defines saving starts;.saveInitialTime – defines saving starts;.saveInterval – defines saving frequency;.saveInterval – defines saving frequency;SimulationseedingAlgorithm – dispersal type (see );seedingAlgorithm – dispersal type (see );successionTimestep – defines frequency dispersal/local recruitment\nevent (growth mortality always yearly);successionTimestep – defines frequency dispersal/local recruitment\nevent (growth mortality always yearly);\n- mixedType – mixed forest stands defined;vegLeadingProportion – relative biomass threshold consider species\n“leading” (.e., dominant);\nTable 6.6: List Biomass_core parameters description.\n","code":""},{"path":"landr-biomass_core-module.html","id":"outputs-list","chapter":"6 LandR Biomass_core Module","heading":"6.2.5 List of outputs","text":"main outputs Biomass_core cohortData pixelGroupMap\ncontaining cohort information per year (note saved \ndefault), visual outputs species level biomass, age dominance across \nlandscape simulation length, several maps stand biomass,\nmortality reproductive success (.e, new biomass) yearly basis.However, objects changed/output Biomass_core (listed Table\n6.7) can saved via outputs argument\nsimInit9.\nTable 6.7: List Biomass_core output objects description.\n","code":""},{"path":"landr-biomass_core-module.html","id":"sim-flow","chapter":"6 LandR Biomass_core Module","heading":"6.2.6 Simulation flow and module events","text":"Biomass_core simulate disturbances effect \nvegetation (.e., post-disturbance mortality regeneration). \ndisturbance post-disturbance mortality/regeneration modules used (e.g.,\nLandMine Biomass_regeneration), user make sure \npost-disturbance effects occur disturbance, dispersal\nbackground vegetation growth mortality (simulated Biomass_core).\nHence, disturbance take place either beginning \nend simulation time step guarantee happens\nimmediately post-disturbance effects calculated.general flow Biomass_core processes without disturbances :Preparation necessary objects simulation – either data \ncalibration modules Biomass_core (simInit \ninit event10);Preparation necessary objects simulation – either data \ncalibration modules Biomass_core (simInit \ninit event10);Disturbances (OPTIONAL) – simulated disturbance module (e.g.,\nLandMine);Disturbances (OPTIONAL) – simulated disturbance module (e.g.,\nLandMine);Post-disturbance mortality/regeneration (OPTIONAL) – simulated \nregeneration module (e.g., Biomass_regeneration);Post-disturbance mortality/regeneration (OPTIONAL) – simulated \nregeneration module (e.g., Biomass_regeneration);Seed dispersal (every successionTimestep; Dispersal event):Seed dispersal (every successionTimestep; Dispersal event):seed dispersal can slow process adapted occur every\n10 years (default successionTimestep). user can set occur\n/less often, caveat using Biomass_borealDataPrep\nestimate species establishment probabilities, values \nintegrated 10 years.see Scheller & Domingo (2012) details dispersal algorithms.Growth mortality (mortalityAndGrowth event):unlike dispersal, growth mortality always occur time step (year).see Scheller & Mladenoff (2004) detail.Cohort age binning (every successionTimestep; cohortAgeReclassification\nevent):follows frequency dispersal, collapsing cohorts (.e.,\nsumming biomass/mortality/aNPP) ages classes resolution\nequal successionTimestep.see Scheller & Miranda (2015a) detail.Summary tables regeneration (summaryRegen event), biomass, age, growth\nmortality (summaryBGM event);Summary tables regeneration (summaryRegen event), biomass, age, growth\nmortality (summaryBGM event);Plots maps (plotMaps event) averages (plotAvgs \nplotSummaryBySpecies events);Plots maps (plotMaps event) averages (plotAvgs \nplotSummaryBySpecies events);Save outputs (save event).Save outputs (save event).… (repeat 2-9) …","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse","chapter":"6 LandR Biomass_core Module","heading":"6.2.7 Differences between Biomass_core and the LANDIS-II Biomass Succession Extension model (LBSE)","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-algo","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.1 Algorithm changes","text":"Upon porting LBSE R, made six minor modifications original\nmodel’s algorithms better reflect ecological processes. \nsignificantly alter simulation outputs note changes might\nalso implemented recent versions LBSE.First, year community (.e., ‘pixel group’ Biomass_core, see\n), LBSE calculates competition index cohort sequentially (.e.,\none cohort time) updating growth mortality cohorts\n(.e., biomass gain loss, respectively) , calculation\nsequence following cohort age descending order, explicit order \nspecies. sorting growth mortality calculations oldest \nyoungest cohorts LBSE aimed capturing size-asymmetric competition\ncohorts, assumption older cohorts priority \ngrowing space given greater height (Scheller pers. comm.). felt \nwithin-year sequential growth, death recruitment may ecologically\naccurate, size-asymmetric competition accounted \ntwice, calculation competition index already considers \ncompetitive advantage older cohorts (shown User’s Guide, Scheller & Miranda 2015a). Hence, Biomass_core growth, mortality, recruitment\ncompetition index calculated time across cohorts \nspecies.Second, unknown species-level sorting mechanism contained within LBSE (\nchanged depending species order input species list file), led \ndifferent simulation results depending input species list file (e.g.,\nTable 6.8 Fig. 6.2). \ncalculation competition, growth mortality cohorts \ntime also circumvented issue.\nFigure 6.2: Differences total landscape aboveground biomass using two different input species orders community. simulations demonstrate sequential calculation competition index, combined lack explicit species ordering affect overall landscape aboveground biomass time using different input species orders (see Table 6.8). order prevent differences introduced cohort recruitment, species’ ages sexual maturity changed species’ longevity values, simulation ran 75 years prevent cohorts reaching sexual maturity. bottom panel shows difference two simulations percentage, calculated \\(\\frac{Biomass_{order2} - Biomass_{order1}}{Biomass_{order2}} * 100\\)\nThird, LBSE calculation total pixel biomass purpose \ncalculating initial biomass new cohort included (previously\ncalculated) biomass new cohorts succession time step = 1, \ntime step > 1. reflect documentation User’s\nGuide, stated “Bsum [total pixel biomass] current total\nbiomass site (including new cohorts)”\n(Scheller & Miranda 2015a), succession time step set 1.\nAdditionally, together lack explicit ordering, generated\ndifferent results terms biomass assigned new cohort (e.g.,\nTable 6.9 Fig. 6.3). \nBiomass_core initial biomass new cohorts longer calculated\nsequentially (competition, growth mortality), thus biomass\nnew cohorts never included calculation total pixel biomass.\nFigure 6.3: Differences biomass assigned new cohorts, summed species across pixels, using two different input species orders community succession time step 1. simulations demonstrate different summation total cohort biomass succession time step 1 lack explicit species ordering affect simulation results changing species order input file (see Table 6.9). , initial cohort ages also set 1. Values refer initial total biomass attributed species end year 1.\nFourth, LBSE, serotiny resprouting occur pixel\nfollowing fire, serotiny taking precedence activated. understand\nprovides advantage serotinous species, perhaps \ndisadvantaged respect fast-growing resprouters. However, feel \necologically realistic serotinous resprouter species able \nregenerate given pixel following fire allow competition\nserotinous resprouting species arise species traits. Note\nchange implemented Biomass_regeneration \nBiomass_regenerationPM modules, since post-disturbance effects separated\nbackground vegetation dynamics simulated Biomass_core.Fifth, Biomass_core, species shade tolerance values can decimal values\nallow finer adjustments -species competition.Sixth, added new parameter called minCohortBiomass, allows user\ncontrol cohort removal bellow certain threshold biomass. \nsimulation set-ups, noticed Biomass_core (LBSE) able \ngenerate many small cohorts understory , due cohort\ncompetition, able gain biomass grow. However, \ncompetition decreases growth increase mortality, cohorts\nsurvived low biomass levels reached sufficient age suffer\nage-related mortality. felt unlikely realistic many cases.\ndefault, parameter left 0 follow LBSE behaviour (.e., \ncohorts removal based minimum biomass).","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2 Other enhancements","text":"addition sixth changes growth, mortality regeneration mentioned\n, enhanced modularity separating components govern\nvegetation responses disturbances Biomass_core, implemented\nhashing, caching testing improve computational efficiency insure\nperformance.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan1","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.1 Modularity","text":"Unlike LBSE, post-disturbance effects part Biomass_core per\nse, belong two separate modules, used interchangeably\n(Biomass_regeneration\n\nBiomass_regenerationPM).\nneed loaded added “modules folder” project case\nuser wants simulate forest responses disturbances (fire\ndisturbances moment). , enables higher flexibility \nswapping different approaches regeneration.Climate effects growth mortality also implemented modular way. \neffects climate biomass increase (growth) loss (mortality) \nwritten functions grouped two packages. LandR R package contains\ndefault, “non-climate-sensitive” functions, LandR.CS R package\ncontains functions simulate climate effects (CS stands “climate\nsensitive”). Note functions simulate actual growth/mortality\nprocesses, estimate modifiers increase/decrease cohort biomass top\nbackground growth/mortality. Biomass_core uses LandR functions \ndefault (see growthAndMortalityDrivers parameter full parameters\nlist). user wish change climate effects \ngrowth/mortality calculated, can provide new compatible functions\n(.e., names, inputs outputs) via another R package.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan2","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.2 Hashing","text":"first strategy improve simulation efficiency Biomass_core use\nhashing mechanism (Yang et al. 2011). Instead assigning key pixel \nraster tracking simulation pixel lookup table, \nindexed pixels using pixelGroup key contained unique combinations \necolocation community composition (.e., species, age biomass\ncomposition), tracked stored simulation data pixelGroup (Fig.\n6.4). algorithm able ease computational\nburden significantly reducing size lookup table speeding-\nsimulation process. recruitment disturbance events, pixels \nrehashed new pixel groups.\nFigure 6.4: Hashing design Biomass_core. re-coded Biomass_core, pixel group map hashed based unique combination species composition (‘community map’) ecolocation map, associated lookup table. insert top-right corner original design linked map lookup table pixel key.\n","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan3","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.3 Caching","text":"second strategy aimed improving model efficacy implementation \ncaching data-driven parametrisation initialisation. Caching\nautomatically archives outputs given function disk (memory) reads\nback subsequent calls function given identical inputs. \ncaching operations achieved using reproducible R package\n(McIntire & Chubaty 2020).current version Biomass_core, spin-phase replaced \ndata-driven landscape initialisation many model parameters derived \ndata, using data calibration modules (e.g., Biomass_borealDataPrep). \navoid repeat data downloads treatment, statistical estimation \nparameters landscape initialisation every time simulation re-run\nconditions, many pre-simulation steps automatically\ncached. means pre-simulation phase significantly faster upon \nsecond call inputs changed (e.g., input data \nparametrisation methods), inputs change directly affected steps\nre-run (see main text examples). using data modules,\nBiomass_core still relies caching preparation theoretical\ninputs.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-enhan4","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.2.4 Testing","text":"Finally, implemented code testing facilitate bug detection comparing\noutputs functions (etc.) expected outputs (Wickham 2011). built \nintegrated code tests Biomass_core across LandR modules \nLandR R package form assertions,\nunit tests integration tests. Assertions unit tests run\nautomatically simulations (can turned ) evaluate individual\ncode components (e.g., one function object’s class). Integration tests\nevaluate several coded processes integrated correctly usually run\nmanually. However, embedded assertions within module code, R\npackage dependencies Biomass_core, LandR R package\n SpaDES, also provide means test\nmodule integration. also implemented GitHub Actions continuous integration\n(CI), routinely test GitHub hosted packages (e.g., LandR) modules.\nCRAN-hosted packages (e.g., SpaDES) also automatically tested checked\nCRAN.Finally, Biomass_core (LandR modules) code hosted \npublic GitHub repositories, module code subject scrutiny \nmany users, can identify issues contribute improve module code.","code":""},{"path":"landr-biomass_core-module.html","id":"biomass-core-vs-lbse-comparisons","chapter":"6 LandR Biomass_core Module","heading":"6.2.7.3 Performance and accuracy of Biomass_core with respect to LBSE","text":"recoding Biomass_core, used integration tests ensured similar\noutputs demographic process (namely, growth, mortality recruitment)\noutputs counterpart LBSE. , report \ncomparisons overall simulation (.e., including demographic\nprocesses) LBSE Biomass_core using three randomly generated\ninitial communities (Tables\n6.10-6.12). remaining input\nparameters taken LANDIS-II training course (Tables\n6.13-6.16), contained species\nattributes information 16 common tree species boreal forests 2\necolocations. ran simulations 1000 years, succession time step \n10 three replicates, enough account variability\nproduced stochastic processes. Seed dispersal set “ward dispersal”.results suggested Biomass_core good agreement LBSE using\nthree randomly generated initial communities (Fig. 6.5),\nsmall deviations LBSE-generated biomasses. Notably, mean\ndifferences LBSE Biomass_core 0.03% (range:\n-0.01% ~ 0.13%), 0.03% (range:\n-0.01% ~ 0.11%) 0.05%\n(-0.02% ~ 0.15%) initial community,\nrespectively (right panels Fig. 6.5 appendix).\nFigure 6.5: Visual comparison simulation outputs three randomly generated initial communities (left panels) difference outputs (right panels). % difference LBSE Biomass_core calculated \\(\\frac{Biomass_{LBSE} - Biomass_{Biomass_core}}{Biomass_{LBSE}} * 100\\)\nexamine running time changed map size, ran simulations using maps\nincreasing number pixels, 22,201 638,401 pixels. maps \ninitialised single ecolocation 7 different communities. Simulations\nrun 120 years using succession time step 10 replicated three\ntimes. eliminate effect hardware running time, used machines\npurchased time, equal specifications running\nWindows 7. simulation ran 2 CPU threads total RAM 4000 Mb.LBSE Biomass_core, simulation time increased linearly number\npixels, increase rate smaller Biomass_core (Fig.\n6.6a). meant models similar\nsimulation efficiencies small maps (< 90,000 pixels), map size increased\nBiomass_core ~2 times faster LBSE (maps > 100,000 pixels; Fig.\n6.6a). Biomass_core also scaled better map size, \nLBSE speeds fluctuated 19 25 seconds per 1,000 pixels across map\nsizes, Biomass_core decreased 21 11 seconds per 1,000 pixels\nsmaller larger maps (Fig. 6.6b).\nFigure 6.6: Simulation efficiencies LBSE Biomass_core increasing map size, terms ) mean running time across repetitions (left y-axis) ratio LBSE Biomass_core running times (right y-axis blue line), b) running time scalability mean running time per 1000 pixels.\n","code":""},{"path":"landr-biomass_core-module.html","id":"example","chapter":"6 LandR Biomass_core Module","heading":"6.3 Usage example","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"example-libs","chapter":"6 LandR Biomass_core Module","heading":"6.3.1 Set up R libraries","text":"","code":"\noptions(repos = c(CRAN = \"https://cloud.r-project.org\"))\ntempDir <- tempdir()\n\npkgPath <- file.path(tempDir, \"packages\", version$platform, paste0(version$major,\n \".\", strsplit(version$minor, \"[.]\")[[1]][1]))\ndir.create(pkgPath, recursive = TRUE)\n.libPaths(pkgPath, include.site = FALSE)\n\nif (!require(Require, lib.loc = pkgPath)) {\n remotes::install_github(\"PredictiveEcology/Require@5c44205bf407f613f53546be652a438ef1248147\",\n upgrade = FALSE, force = TRUE)\n library(Require, lib.loc = pkgPath)\n}\n\nsetLinuxBinaryRepo()"},{"path":"landr-biomass_core-module.html","id":"example-pkg-mods","chapter":"6 LandR Biomass_core Module","heading":"6.3.2 Get the module and module dependencies","text":"can use SpaDES.project::getModule function download module \nmodule folder specified . Alternatively, see SpaDES-modules\nrepository see \ndownload SpaDES modules, fork/clone GitHub\nrepository directly.downloading module, important make sure module R package\ndependencies installed correct version.\nSpaDES.project::packagesInModules makes list necessary packages \nmodules paths$modulePath, Require installs .","code":"\nRequire(\"PredictiveEcology/SpaDES.project@6d7de6ee12fc967c7c60de44f1aa3b04e6eeb5db\",\n require = FALSE, upgrade = FALSE, standAlone = TRUE)\n\npaths <- list(inputPath = normPath(file.path(tempDir, \"inputs\")),\n cachePath = normPath(file.path(tempDir, \"cache\")), modulePath = normPath(file.path(tempDir,\n \"modules\")), outputPath = normPath(file.path(tempDir,\n \"outputs\")))\n\nSpaDES.project::getModule(modulePath = paths$modulePath, c(\"PredictiveEcology/Biomass_core@master\"),\n overwrite = TRUE)\n\n## make sure all necessary packages are installed:\nouts <- SpaDES.project::packagesInModules(modulePath = paths$modulePath)\nRequire(c(unname(unlist(outs)), \"SpaDES\"), require = FALSE, standAlone = TRUE)\n\n## load necessary packages\nRequire(c(\"SpaDES\", \"LandR\", \"reproducible\", \"pemisc\"), upgrade = FALSE,\n install = FALSE)"},{"path":"landr-biomass_core-module.html","id":"example-setupSim","chapter":"6 LandR Biomass_core Module","heading":"6.3.3 Setup simulation","text":"setup simulation random study area, using species within \nLandR::sppEquivalencies_CA table can found (Biomass_core \nretrieve species % cover maps filter present species). also\ndefine colour coding used plotting, type plots produce\nchoose output cohortData tables every year – note \npixel-based, “spatialise” results posteriori pixelBroupMap must\nalso saved.Please see lists input objects,\nparameters outputs information.","code":"\ntimes <- list(start = 0, end = 30)\n\nstudyArea <- Cache(randomStudyArea, size = 1e+07) # cache this so it creates a random one only once on a machine\n\n# Pick the species you want to work with – using the naming\n# convention in 'Boreal' column of\n# LandR::sppEquivalencies_CA\nspeciesNameConvention <- \"Boreal\"\nspeciesToUse <- c(\"Pice_Gla\", \"Popu_Tre\", \"Pinu_Con\")\n\nsppEquiv <- sppEquivalencies_CA[get(speciesNameConvention) %in%\n speciesToUse]\n# Assign a colour convention for graphics for each species\nsppColorVect <- sppColors(sppEquiv, speciesNameConvention, newVals = \"Mixed\",\n palette = \"Set1\")\n\n## Usage example\nmodules <- as.list(\"Biomass_core\")\nobjects <- list(studyArea = studyArea, sppEquiv = sppEquiv, sppColorVect = sppColorVect)\n\nsuccessionTimestep <- 10L\n\n## keep default values for most parameters (omitted from\n## this list)\nparameters <- list(Biomass_core = list(sppEquivCol = speciesNameConvention,\n successionTimestep = successionTimestep, .plots = c(\"screen\",\n \"object\"), .plotInitialTime = times$start, .plots = c(\"screen\",\n \"png\"), .saveInitialTime = times$start, .useCache = \"init\",\n .useParallel = FALSE))\n\noutputs <- data.frame(expand.grid(objectName = \"cohortData\",\n saveTime = unique(seq(times$start, times$end, by = 1)), eventPriority = 1,\n stringsAsFactors = FALSE))"},{"path":"landr-biomass_core-module.html","id":"example-runSim","chapter":"6 LandR Biomass_core Module","heading":"6.3.4 Run simulation","text":"simInitAndSpades wrapper function runs simInit (\ninitialises modules) spades (runs modules, .e., events),\npass necessary setup objects created ., pass useful reproducible options control caching (\"reproducible.useCache\")\ninputs downloaded (\"reproducible.destinationPath\").\nFigure 6.7: Biomass_core automatically generates simulation visuals species dynamics across landscape terms total biomass, number presences age productivity (), well yearly plots total biomass, productivity, mortality, reproduction leading species pixel ().\n","code":"\nopts <- options(reproducible.useCache = TRUE, reproducible.destinationPath = paths$inputPath,\n spades.useRequire = FALSE)\ngraphics.off()\nmySim <- simInitAndSpades(times = times, params = parameters,\n modules = modules, objects = objects, paths = paths, outputs = outputs,\n debug = TRUE)"},{"path":"landr-biomass_core-module.html","id":"appendix","chapter":"6 LandR Biomass_core Module","heading":"6.4 Appendix","text":"","code":""},{"path":"landr-biomass_core-module.html","id":"appendix-tables","chapter":"6 LandR Biomass_core Module","heading":"6.4.1 Tables","text":"\nTable 6.8: Input order processing order (determined LBSE) community used assess impact sequential calculation competition index, combined lack explicit species ordering. input order order species initial communities table input file. processing order order used simulation, obtained Landis-log.txt CalibrateMode set ‘yes’. Species starting ages also shown.\n\nTable 6.9: Input order processing order (determined LBSE) community used assess impact setting succession time step 1, combined lack explicit species ordering. input order order species initial communities table input file. processing order order used simulation, obtained Landis-log.txt CalibrateMode set ‘yes’. Species starting ages also shown.\n\nTable 6.10: Randomly generated community combination . 1 used recruitment comparison runs.\n\nTable 6.11: Randomly generated community combination . 2 used recruitment comparison runs.\n\nTable 6.12: Randomly generated community combination . 3 used recruitment comparison runs.\n\nTable 6.13: Invariant species traits table used comparison runs.\n\nTable 6.14: Minimum relative biomass table used comparison runs. X0-5 represent site shade classes -shade (0) maximum shade (5). ecolocations shared values.\n\nTable 6.15: Probability germination species shade tolerance shade level combinations (called sufficient light table LBSE sufficientLight input data.table LandR Biomass_core) used comparison runs.\n\nTable 6.16: Species ecolocation table used comparison runs. SEP stands species establishment probability, maxB maximum biomass maxANPP maximum aboveground net primary productivity. Values held constant throughout simulation.\n","code":""},{"path":"landr-biomass_core-module.html","id":"refs","chapter":"6 LandR Biomass_core Module","heading":"6.5 References","text":"","code":""},{"path":"landr-biomass_regeneration-module.html","id":"landr-biomass_regeneration-module","chapter":"7 LandR Biomass_regeneration Module","heading":"7 LandR Biomass_regeneration Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/Biomass_regeneration/issues.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"authors-4","chapter":"7 LandR Biomass_regeneration Module","heading":"7.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Yong Luo yluo1@lakeheadu.ca [aut], Ceres Barros cbarros@mail.ubc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [ctb]\n","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-overview-4","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1 Module Overview","text":"","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-summary-2","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.1 Module summary","text":"Biomass_regeneration SpaDES module simulates post-disturbance regeneration mechanisms Biomass_core.\n, module mostly based post-disturbance regeneration mechanisms present LANDIS-II Biomass Succession v3.2.1 extension (see LANDIS-II Biomass Succession v3.2 User Guide Scheller Mladenoff (2004).\nmoment, Biomass_regeneration module simulates post-fire disturbance effects forest species, simulating post-fire mortality activating serotiny resprouting mechanisms species, depending traits (.e. ability resprout /germinate seeds, serotiny, following fire).\nPost-fire mortality behaves stand-replacing fashion, .e. pixel within fire perimeter (determined fire raster) cohorts see biomasses set 0.post-fire regeneration, module first evaluates whether species present prior fire serotinous.\n, species germinate depending light conditions shade tolerance, depending (seed) establishment probability (.e. germination success) pixel.\nmodule evaluates species present fire capable resprouting.\nmodel growth species depending, , light conditions shade tolerance, resprouting probability (.e. resprouting success).\ngiven species given pixel, serotiny resprouting can occur.\nHence, species capable resprout serotiny activated.LANDIS-II, resprouting never occur given pixel serotiny activated one species.\nAccording manual:serotiny (possible immediately following fire) triggered one species, neither resprouting seeding occur.\nSerotiny given precedence resprouting typically higher threshold success resprouting.\nslightly favors serotinous species mixed species able resprout following fire.(LANDIS-II Biomass Succession v3.2 User Guide)longer case Biomass_regeneration, serotinity resprouting can occur pixel, although species.\nfeel realistic ecologically, resprouters typically regenerate faster fire, often shading serotinous species creating interesting successional feedbacks (e.g. light-loving serotinous species “wait” canopy gaps germinate).","code":""},{"path":"landr-biomass_regeneration-module.html","id":"general-flow-of-biomass_regeneration-processes---fire-disturbances-only","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.2 General flow of Biomass_regeneration processes - fire disturbances only","text":"Removal biomass disturbed, .e. burnt, pixelsActivation serotiny serotinous species present fireActivation resprouting resprouter species present fire serotiny activatedEstablishment/growth species serotiny resprouting activated","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-inputs-and-parameters","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.3 Module inputs and parameters","text":"Table 7.1 shows full list module inputs.Table 7.1: List Biomass_regeneration input objects description.Summary user-visible parameters (Table 7.2):Table 7.2: List Biomass_regeneration parameters description.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"module-outputs-1","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.4 Module outputs","text":"Description module outputs (Table 7.3).Table 7.3: List Biomass_regeneration outputs description.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"links-to-other-modules-2","chapter":"7 LandR Biomass_regeneration Module","heading":"7.1.5 Links to other modules","text":"Primarily used LandR Biomass suite modules, namely Biomass_core.","code":""},{"path":"landr-biomass_regeneration-module.html","id":"getting-help-2","chapter":"7 LandR Biomass_regeneration Module","heading":"7.2 Getting help","text":"https://gitter.im/PredictiveEcology/LandR_Biomass\n## References\n","code":""},{"path":"wildfire-submodel.html","id":"wildfire-submodel","chapter":"Wildfire submodel","heading":"Wildfire submodel","text":"Lorem ipsum … (TODO)","code":""},{"path":"landmine-module.html","id":"landmine-module","chapter":"8 LandMine Module","heading":"8 LandMine Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/LandMine/issues.","code":""},{"path":"landmine-module.html","id":"authors-5","chapter":"8 LandMine Module","heading":"8.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut], Alex M. Chubaty achubaty@-cast.ca [ctb, cre]\n","code":""},{"path":"landmine-module.html","id":"module-overview-5","chapter":"8 LandMine Module","heading":"8.1 Module Overview","text":"","code":""},{"path":"landmine-module.html","id":"module-summary-3","chapter":"8 LandMine Module","heading":"8.1.1 Module summary","text":"Landmine model created simulating natural range variation landscapes boreal forest (Andison 1996; Andison 1998).\nwidely used public private sector various purposes.\nSpaDES module rewrite fire component native R.","code":""},{"path":"landmine-module.html","id":"model-differences","chapter":"8 LandMine Module","heading":"8.1.2 Model Differences","text":"current version yet fully tested compared original version, currently several known differences:Fire sizes taken Truncated Pareto distribution, resulting numerous small fires, large fires;Parameters fitted landscapes study LandWeb project.","code":""},{"path":"landmine-module.html","id":"known-species","chapter":"8 LandMine Module","heading":"8.1.3 Known Species","text":"Landmine requires following codes inputs (genus species codes ), converts groups species follows.\nspecies groups Rate Spread (ROS) fire spreading:Table 8.1: LandMine species codes.","code":""},{"path":"landmine-module.html","id":"module-inputs-and-parameters-1","chapter":"8 LandMine Module","heading":"8.1.4 Module inputs and parameters","text":"Table 8.2 shows full list module inputs.Table 8.2: List LandMine input objects description.Summary user-visible parameters (Table 8.3).Table 8.3: List LandMine parameters description.","code":""},{"path":"landmine-module.html","id":"module-outputs-2","chapter":"8 LandMine Module","heading":"8.1.5 Module outputs","text":"Description module outputs (Table 8.4).Table 8.4: List LandMine outputs description.","code":""},{"path":"landmine-module.html","id":"usage","chapter":"8 LandMine Module","heading":"8.2 Usage","text":"run Landmine module alone (.e., fitting), following work (iff raster inputs studyArea rasterToMatch available), assuming R packages available.NB: Paths changed different user.","code":""},{"path":"landmine-module.html","id":"package-dependencies","chapter":"8 LandMine Module","heading":"8.2.1 Package dependencies","text":"determine packages used LandMine, use:","code":"\nSpaDES.core::packages(modules = \"LandMine\", paths = \"..\")[[1]]## [1] \"SpaDES.core\" \n## [2] \"assertthat\" \n## [3] \"data.table\" \n## [4] \"fasterize\" \n## [5] \"fpCompare\" \n## [6] \"ggplot2\" \n## [7] \"ggspatial\" \n## [8] \"grDevices\" \n## [9] \"gridExtra\" \n## [10] \"magrittr\" \n## [11] \"PredictiveEcology/LandR@development (>= 1.1.0.9003)\" \n## [12] \"PredictiveEcology/LandWebUtils@development (>= 1.0.2)\"\n## [13] \"PredictiveEcology/pemisc@development\" \n## [14] \"PredictiveEcology/SpaDES.tools@development\" \n## [15] \"quickPlot\" \n## [16] \"raster\" \n## [17] \"RColorBrewer\" \n## [18] \"stats\" \n## [19] \"VGAM\""},{"path":"landmine-module.html","id":"module-usage","chapter":"8 LandMine Module","heading":"8.2.2 Module usage","text":"First, define study area create template raster.Next, set simulation run 13 timesteps using default module parameters.","code":"\nstudyArea <- SpaDES.tools::randomStudyArea(seed = 1234, size = 1e+10)\nrasterToMatch <- raster(studyArea, res = 250)times <- list(start = 0, end = 13)\n\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) parameters\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) <-\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) list(#\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) LandMine\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) =\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) list(flushCachedRandomFRI\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) =\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) TRUE)\nparameters <- list(# LandMine = list(flushCachedRandomFRI = TRUE) ) )\n\nmodules <- list(\"LandMine\")\n\nobjects <- list(studyArea = studyArea, rasterToMatch = rasterToMatch)\n\npaths <- list(cachePath = cacheDir, modulePath = moduleDir, inputPath = inputDir,\n outputPath = outputDir)\nmySim <- simInit(times = times, params = parameters, modules = modules,\n objects = objects, paths = paths)\n\ndev()\nmySimOut <- spades(mySim, .plotInitialTime = times$start, debug = TRUE)"},{"path":"landmine-module.html","id":"testing-the-burn-algorithm","chapter":"8 LandMine Module","heading":"8.3 Testing the burn algorithm","text":"","code":"\nRequire(c(\"data.table\", \"DEoptim\", \"parallel\", \"SDMTools\"))\n\ns <- simInit(times = times, params = parameters, modules = modules,\n objects = objects, paths = paths)"},{"path":"landmine-module.html","id":"optimizing-parameters","chapter":"8 LandMine Module","heading":"8.4 Optimizing parameters","text":"following code chunk tries find values spawnNewActive creates “reasonable” fire shapes sizes.","code":"\npixelSize <- 250\nros <- raster(extent(0, pixelSize * 1000, 0, pixelSize * 1000),\n res = pixelSize, vals = 0)\nros <- ros == 0\nfireSize <- 1e+05\n\nmaxRetriesPerID <- 4 ## 4 retries (5 attempts total)\nspreadProb <- 0.9\nspawnNewActive <- c(0.46, 0.2, 0.26, 0.11)\nsizeCutoffs <- c(8000, 20000)\n\nNineCorners <- cellFromRowCol(ros, row = nrow(ros)/4 * rep(1:3,\n 3), col = ncol(ros)/4 * rep(1:3, each = 3))\n\ncentreCell <- cellFromRowCol(ros, row = nrow(ros)/2, col = ncol(ros)/2)\n\n## Set variables\nobjs <- c(\"ros\", \"centreCell\", \"fireSize\", \"spawnNewActive\",\n \"sizeCutoffs\", \"spreadProb\")\npkgs <- c(\"data.table\", \"LandWebUtils\", \"raster\", \"SDMTools\",\n \"SpaDES.tools\")\n### SET UP CLUSTER FOR PARALLEL\nwantParallel <- TRUE\n\n## numCores should be >= 70 and needs to be multiple of number of params to be fit (7)\nnumCores <- (parallelly::availableCores(constraints = c(\"connections\")) %/% 7) * 7\n\nmachineName <- strsplit(Sys.info()[\"nodename\"], \"[.]\")[[1]][1]\n\nclNames <- switch(machineName,\n pinus = c(\n ## TODO: ssh cluster not yet working\n rep(\"localhost\", 0),\n rep(\"picea.for-cast.ca\", 20),\n rep(\"pseudotsuga.for-cast.ca\", 82)\n ),\n picea = rep(\"localhost\", numCores),\n rep(\"localhost\", numCores))\n\nif (wantParallel) {\n cl <- landmine_optim_clusterSetup(nodes = clNames)\n} else {\n cl <- NULL\n}\n\nif (!inherits(cl[[1]], \"forknode\")) {\n landmine_optim_clusterExport(cl, objs = objs, pkgs = pkgs)\n}"},{"path":"landmine-module.html","id":"visual-examination","chapter":"8 LandMine Module","heading":"8.4.1 Visual examination","text":"","code":"\nopt_sn <- DEoptim(landmine_optim_fitSN, lower = c(-2, -3, -3,\n -3, 1, 3.5, 0.75), upper = c(-0.1, -0.5, -0.5, -1, 3.5, 5,\n 1), control = DEoptim.control(VTR = 0.001, NP = as.integer(length(clNames)),\n itermax = 200, cluster = cl, strategy = 6), ros = ros, centreCell = centreCell,\n fireSizes = c(10, 100, 1000, 10000, 1e+05), desiredPerimeterArea = 0.003)\n\nopt_sn$optim$bestmem ## best param values\n\n## assign with suffix to facilitate multiple DEoptim runs\noptimParams <- data.frame(date = format(Sys.time(), \"%Y-%m-%d\"),\n pixelSize = pixelSize) |>\n cbind(rbind(opt_sn$optim$bestmem))\n\nfDEoptim <- file.path(moduleDir, \"LandMine\", \"data\", \"LandMine_DEoptim_params.csv\")\nprevVals <- read.csv(fDEoptim)\nwrite.csv(rbind(prevVals, optimParams), fDEoptim, row.names = FALSE)\n\nparallel::stopCluster(cl)\ncl <- NULL\nfs_sn <- c(10, 100, 1000, 10000, 1e+05)\nfit_sn <- landmine_optim_fitSN(sna = c(-1, -1, -1, -2, 2, 4,\n 0.9), ros = ros, centreCell = centreCell, fireSizes = fs_sn,\n desiredPerimeterArea = 0.003)\nbfs1_sn <- purrr::transpose(attr(fit_sn, \"bfs1\"))\nLM_sn <- do.call(rbind, bfs1_sn$LM)\nplot(log10(fs_sn), LM_sn[, \"perim.area.ratio\"]) ## NOTE: visual inspection - not too round; not too sinuous"},{"path":"landmine-module.html","id":"alternate-optimization","chapter":"8 LandMine Module","heading":"8.5 Alternate optimization","text":"second (alternative) version tries optimization using fewer parameters, test whether simpler version gets better/different results.\nAlthough version used final module, preserve posterity.","code":"\nfs_optim2 <- c(0.2, 1:8) * 10000\nopt_sn2 <- DEoptim(landmine_optim_fitSN2, lower = c(1, -1, 1,\n 3, 4), upper = c(3, -0.3, 3, 4, 5), control = DEoptim.control(VTR = 0.001,\n itermax = 40, cluster = cl, strategy = 6), ros = ros, centreCell = centreCell,\n fireSizes = fs_optim2, desiredPerimeterArea = 0.003)"},{"path":"landmine-module.html","id":"visual-examination-1","chapter":"8 LandMine Module","heading":"8.5.1 Visual examination","text":"","code":"\nfs_sn2 <- round(runif(10, 10, 4000))\nfit_sn2 <- landmine_optim_fitSN2(par = c(2, -0.63333, 1, 3.2,\n 4.4), ros = ros, centreCell = centreCell, fireSizes = fs_sn2,\n desiredPerimeterArea = 0.003, spreadProb = 0.9)\nbfs1_sn2 <- purrr::transpose(attr(fit_sn2, \"bfs1\"))\nLM_sn2 <- do.call(rbind, bfs1_sn2$LM)\nplot(log10(fs_sn2), LM_sn2[, \"perim.area.ratio\"]) ## NOTE: visual inspection - not too round; not too sinuous"},{"path":"landmine-module.html","id":"manual-inspection-of-optimization-results","chapter":"8 LandMine Module","heading":"8.6 Manual inspection of optimization results","text":"","code":""},{"path":"landmine-module.html","id":"original-2018-version","chapter":"8 LandMine Module","heading":"8.6.1 Original (2018) version","text":"original version run using 100m pixels, despite simulations run using 250m pixels.\ncorrected rerun .","code":"\n## 10,000 hectares burns gave this\nspawnNewActive[2:3] <- c(0.0235999945606232, 0.0263073265505955)\n\n# 100,000 hectare burns gave this spawnNewActive <-\n# 10^c(-1.264780, -1.970946, -1.288213, -2.202580)\nspawnNewActive <- 10^c(-0.586503645288758, -1.08108837273903,\n -2.14391896536108, -1.00221184641123)\nsizeCutoffs <- 10^c(3.37711253212765, 4.52040993282571)\n\nsns <- c(-1.733262, -0.933318, -2.562183, -2.493687, 3.064458,\n 4.812305)\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^sns[5:6]\n# spawnNewActive <- 10^c(-1.646419, -1.815395, -2.809013,\n# -2.613337) sizeCutoffs <- 10^c(3.888317, 4.641961)\n\n## 100,000 pixel fires -- the next worked, but I think we\n## can get better sns <- structure(\n## c(-1.652459,-0.962121,-0.964879,-2.304902, 3.522345,\n## 4.173242), .Names = c('par1',\nsns <- structure(c(-1.641197, -1.152821, -0.697335, -1.751917,\n 3.720378, 4.034059), .Names = c(\"par1\", \"par2\", \"par3\", \"par4\",\n \"par5\", \"par6\"))\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^(sns[5:6])\nfireSize <- 30000\n\n## 100\nsns <- c(-0.77716149196811, -0.769325340166688, -1.2772046867758,\n -1.99332102853805, 3.14260408212431, 4.46155184064992)\n\n## 1000\nsns <- c(-0.775107, -1.03176, -0.599669, -1.958105, 3.048958,\n 4.275831)\n\n## seemed good for 100,000, pretty good for 1e3\nsns <- c(-1.54885, -0.97052, -1.38305, -1.93759, 3.20379, 4.13237)\n\n## good for 100 000, 10 000 ha -- too sinuous for 1000 and\n## 100 ha\nsns <- c(-1.537203, -1.462981, -0.524957, -1.002567, 3.642046,\n 4.501754)\n\n## good for 100 000, 10 000 ha (except some fires @ 1e5\n## don't make it to full size) -- too sinuous for smaller\nsns <- c(-1.484338, -1.22044, -2.948275, -2.15594, 3.945281,\n 4.904893)\n\nsns <- c(-1.495247, -0.800494, -1.58235, -2.270646, 3.530671,\n 4.663245)\n\n## final optimization after 75 iterations, Good: 1e5, 1e4\nsns <- c(-1.47809, -0.86224, -1.34532, -1.93568, 3.27149, 4.20741)\n\n## based on equal weights 10^(1:5)\nsns <- c(-0.923528, -1.804549, -1.760455, -1.793594, 1.683355,\n 4.466668)\n\n## With spreadProb = 0.9 # Pretty GOOD!\nsns <- c(-0.73152, -0.501823, -0.605968, -1.809726, 2.202732,\n 4.69606, 0.9) ## used in module\noptimParams <- data.frame(date = \"2018-05-18\", pixelSize = 100) |>\n cbind(rbind(sns))\nwrite.csv(optimParams, fDEoptim, row.names = FALSE)\n\n## With spreadProb = 0.9 # Optimal\nsns <- c(-0.978947, -0.540946, -0.790736, -1.583039, 2.532013,\n 4.267547, 0.94673)\n\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^(sns[5:6])\nif (length(sns) == 7) spreadProb <- sns[7]\n\n# from linear model version\npar <- c(1.548899, -0.396904, 2.191424, 3.903082, 4.854002)\nsizeCutoffs <- 10^c(par[4], par[5])\nsna <- min(-0.15, par[1] + par[2] * log10(fireSize))\nsna <- 10^c(sna * par[3], sna * 2 * par[3], sna * 3 * par[3],\n sna * 4 * par[3])\nspawnNewActive <- sna\n\n###########################\nclearPlot()\ndev()\n\nfor (i in 1:5) {\n fireSize <- 10^i\n dim <- round(sqrt(fireSize) * 5 * 250)\n ros <- raster(extent(0, dim, 0, dim), res = 250, vals = 1)\n centreCell <- cellFromRowCol(ros, rownr = nrow(ros)/2, colnr = ncol(ros)/2)\n reps <- paste0(\"rep\", 1:4 + (log10(fireSize) - 1) * 4)\n burnedMapList <- landmine_optim_clusterWrap(cl = cl, nodes = clNames,\n reps = reps, objs = objs, pkgs = pkgs)\n names(burnedMapList$out) <- reps\n burnedMapList <- purrr::transpose(burnedMapList$out)\n cl <- burnedMapList$cl\n do.call(rbind, burnedMapList$LM)\n\n Plot(burnedMapList$burnedMap, cols = c(\"red\"), new = FALSE,\n na.color = \"white\", legend = FALSE, visualSqueeze = 0.7,\n title = paste0(\"Fire size: \", fireSize))\n}\nreps <- paste0(\"rep\", 1:1)\nperims <- list()\nperm <- list()\nmod <- list()\ndev()\nclearPlot()\nfireSizes <- 10^(4)\n\nfor (fs in fireSizes) {\n for (i in 1:1) {\n ros <- raster(extent(0, 2e+05, 0, 2e+05), res = 250,\n vals = 1)\n NineCorners <- cellFromRowCol(ros, rownr = nrow(ros)/4 *\n rep(1:3, 3), colnr = ncol(ros)/4 * rep(1:3, each = 3))\n centreCell <- NineCorners\n ran <- runif(4, -3, -1)\n spawnNewActive <- 10^ran\n # spawnNewActive <- 10^c(-0.1, -0.75, -1.2,\n # ran*2.5)\n fireSize = rep(fs, length(centreCell))\n sizeCutoffs <- 10^c(1, 3)\n burnedMapList <- landmine_optim_clusterWrap(cl = cl,\n nodes = clNames, reps = reps, objs = objs, pkgs = pkgs)\n names(burnedMapList$out) <- reps\n burnedMapList <- purrr::transpose(burnedMapList$out)\n cl <- burnedMapList$cl\n do.call(rbind, burnedMapList$LM)\n Plot(burnedMapList$burnedMap, new = TRUE, zero.color = \"white\")\n perims[[i]] <- data.frame(perim = burnedMapList$LM$rep1$perim.area.ratio,\n spawnNewActive = mean(spawnNewActive), others = t(spawnNewActive))\n }\n fsChar <- as.character(fs)\n perm[[fsChar]] <- rbindlist(perims)\n perm[[fsChar]]$perim <- log10(perm[[fsChar]]$perim)\n perm[[fsChar]]$spawnNewActive <- perm[[fsChar]]$spawnNewActive\n Plot(perm[[fsChar]]$perim, perm[[fsChar]]$spawnNewActive,\n new = TRUE, addTo = paste0(\"fs\", fsChar))\n mod[[fsChar]] <- lm(spawnNewActive ~ perim, data = perm[[fsChar]])\n}\n\n(predict(mod[[\"10\"]], data.frame(perim = log10(0.003))))\n(predict(mod[[\"100\"]], data.frame(perim = log10(0.003))))\nlog10(predict(mod[[\"1000\"]], data.frame(perim = log10(0.003))))"},{"path":"landmine-module.html","id":"current-2022-version","chapter":"8 LandMine Module","heading":"8.6.2 Current (2022) version","text":"original version run using 100m pixels, despite simulations run using 250m pixels.\nversion uses 250m pixels.","code":"\n## final optimization after 200 iterations\n## (landmine_optim_fitSN)\noptimParams <- read.csv(fDEoptim)\nsns <- optimParams[, grepl(\"^par\", colnames(optimParams))] |>\n tail(1) ## take last row\n\nspawnNewActive <- 10^sns[1:4]\nsizeCutoffs <- 10^(sns[5:6])\nspreadProb <- sns[7]\n\n## from linear model version\npar <- c(1.548899, -0.396904, 2.191424, 3.903082, 4.854002)\nsizeCutoffs <- 10^c(par[4], par[5])\nsna <- min(-0.15, par[1] + par[2] * log10(fireSize))\nsna <- 10^c(sna * par[3], sna * 2 * par[3], sna * 3 * par[3],\n sna * 4 * par[3])\nspawnNewActive <- sna\n\nclearPlot()\n\nfor (i in 1:5) {\n fireSize <- 10^i\n dim <- round(sqrt(fireSize) * 5 * 250)\n ros <- raster(extent(0, dim, 0, dim), res = 250, vals = 1)\n centreCell <- cellFromRowCol(ros, row = nrow(ros)/2, col = ncol(ros)/2)\n reps <- paste0(\"rep\", 1:4 + (log10(fireSize) - 1) * 4)\n burnedMapList <- landmine_optim_clusterWrap(cl = cl, nodes = clNames,\n reps = reps, objs = objs, pkgs = pkgs)\n names(burnedMapList$out) <- reps\n burnedMapList <- purrr::transpose(burnedMapList$out)\n cl <- burnedMapList$cl\n do.call(rbind, burnedMapList$LM)\n\n Plot(burnedMapList$burnedMap, cols = c(\"red\"), new = FALSE,\n na.color = \"white\", legend = FALSE, visualSqueeze = 0.7,\n title = paste0(\"Fire size: \", fireSize))\n}"},{"path":"landmine-module.html","id":"cleaning-up","chapter":"8 LandMine Module","heading":"8.6.3 Cleaning up","text":"","code":"\nparallel::stopCluster(cl)\nunlink(cacheDir, recursive = TRUE)"},{"path":"landmine-module.html","id":"code-and-data-availability","chapter":"8 LandMine Module","heading":"8.6.4 Code and data availability","text":"Code available https://github.com/PredictiveEcology/LandMine.","code":""},{"path":"landmine-module.html","id":"links-to-other-modules-3","chapter":"8 LandMine Module","heading":"8.6.5 Links to other modules","text":"Originally developed part LandWeb project.\n## References\n","code":""},{"path":"model-outputs.html","id":"model-outputs","chapter":"Model outputs","heading":"Model outputs","text":"burnSummaries module … (TODO)LandMine module … (TODO)LandWeb_outputs module … (TODO)LandWeb_summary module … (TODO)timeSinceFire module … (TODO)Previously-run model outputs available download authorized users, described .","code":""},{"path":"model-outputs.html","id":"currently-selected-spatial-area","chapter":"Model outputs","heading":"8.7 Currently Selected Spatial Area","text":"Currently selected reporting polygon (.shp)","code":""},{"path":"model-outputs.html","id":"large-patches-data-for-study-region","chapter":"Model outputs","heading":"8.8 Large Patches Data for study region","text":"Large Patches Data (.csv)Large patches histograms (.png)","code":""},{"path":"model-outputs.html","id":"leading-vegetation-cover-data-for-study-region","chapter":"Model outputs","heading":"8.9 Leading Vegetation Cover Data for study region","text":"Leading Vegetation Cover Data (.csv)Leading Vegetation Cover histograms (.png)Leading Vegetation Cover boxplots (.png)","code":""},{"path":"model-outputs.html","id":"simulation-rasters-cropped-to-study-region","chapter":"Model outputs","heading":"8.10 Simulation Rasters (cropped to study region)","text":"Flammability maps (.grd)Time Since Fire maps (.tif)Vegetation type maps (.grd, .tif)","code":""},{"path":"model-outputs.html","id":"additional-r-data-files-advanced-users","chapter":"Model outputs","heading":"8.11 Additional R Data Files (advanced users)","text":"Simulation data files (.RData, .rds)downloaded outputs bundled zip file (e.g., LandWeb_v2.0.0_2019-09-23.zip) following directory file structure:","code":"LandWeb_v2.0.0_2019-09-23/\n |_ boxplots/\n |_ leading_*.csv\n |_ histograms/\n |_ largePatches/\n |_ 100/\n |_ 500/\n |_ 1000/\n |_ 5000/\n |_ leading/\n |_ largePatches_*.csv\n |_ polygons/\n |_ rasters/\n |_ rstTimeSinceFire_*.tif\n |_ vegTypeMap_*.tif*\n |_ INFO.md\n |_ README.md\n |_ simulationOutput_*.rds"},{"path":"burnsummaries-module.html","id":"burnsummaries-module","chapter":"9 burnSummaries Module","heading":"9 burnSummaries Module","text":"","code":""},{"path":"burnsummaries-module.html","id":"authors-6","chapter":"9 burnSummaries Module","heading":"9.0.0.1 Authors:","text":"Alex M Chubaty achubaty@-cast.ca [aut, cre] (https://orcid.org/0000-0001-7146-8135)\n","code":""},{"path":"burnsummaries-module.html","id":"module-overview-6","chapter":"9 burnSummaries Module","heading":"9.1 Module Overview","text":"","code":""},{"path":"burnsummaries-module.html","id":"module-summary-4","chapter":"9 burnSummaries Module","heading":"9.1.1 Module summary","text":"Provide brief summary module / use module.Module documentation written others can use module.\ntemplate module documentation, changed reflect module.","code":""},{"path":"burnsummaries-module.html","id":"module-inputs-and-parameters-2","chapter":"9 burnSummaries Module","heading":"9.1.2 Module inputs and parameters","text":"Describe input data required module obtain (e.g., directly online sources supplied modules)\nsourceURL specified, downloadData(\"burnSummaries\", \"..\") may sufficient.\nTable 9.1 shows full list module inputs.Table 9.1: List burnSummaries input objects description.Provide summary user-visible parameters (Table 9.2)Table 9.2: List burnSummaries parameters description.","code":""},{"path":"burnsummaries-module.html","id":"events-1","chapter":"9 burnSummaries Module","heading":"9.1.3 Events","text":"Describe happens event type.","code":""},{"path":"burnsummaries-module.html","id":"plotting","chapter":"9 burnSummaries Module","heading":"9.1.4 Plotting","text":"Write plotted.","code":""},{"path":"burnsummaries-module.html","id":"saving","chapter":"9 burnSummaries Module","heading":"9.1.5 Saving","text":"Write saved.","code":""},{"path":"burnsummaries-module.html","id":"module-outputs-3","chapter":"9 burnSummaries Module","heading":"9.1.6 Module outputs","text":"Description module outputs (Table 9.3).Table 9.3: List burnSummaries outputs description.","code":""},{"path":"burnsummaries-module.html","id":"links-to-other-modules-4","chapter":"9 burnSummaries Module","heading":"9.1.7 Links to other modules","text":"Describe anticipated linkages modules, modules supply input data post-hoc analysis.","code":""},{"path":"burnsummaries-module.html","id":"getting-help-3","chapter":"9 burnSummaries Module","heading":"9.1.8 Getting help","text":"provide way people obtain help (e.g., module repository issues page)\n## References\n","code":""},{"path":"landweb_output-module.html","id":"landweb_output-module","chapter":"10 LandWeb_output Module","heading":"10 LandWeb_output Module","text":"","code":""},{"path":"landweb_output-module.html","id":"authors-7","chapter":"10 LandWeb_output Module","heading":"10.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Yong Luo yluo1@lakeheadu.ca [aut], Alex M. Chubaty achubaty@-cast.ca [ctb]\n","code":""},{"path":"landweb_output-module.html","id":"module-overview-7","chapter":"10 LandWeb_output Module","heading":"10.1 Module Overview","text":"","code":""},{"path":"landweb_output-module.html","id":"module-summary-5","chapter":"10 LandWeb_output Module","heading":"10.1.1 Module summary","text":"module saves LandR Biomass outputs use LandWeb post-processing.","code":""},{"path":"landweb_output-module.html","id":"module-inputs-and-parameters-3","chapter":"10 LandWeb_output Module","heading":"10.1.2 Module inputs and parameters","text":"Table 10.1 shows full list module inputs.Table 10.1: List LandWeb_output input objects description.Provide summary user-visible parameters (Table 10.2)Table 10.2: List LandWeb_output parameters description.","code":""},{"path":"landweb_output-module.html","id":"module-outputs-4","chapter":"10 LandWeb_output Module","heading":"10.1.3 Module outputs","text":"Description module outputs (Table 10.3).Table 10.3: List LandWeb_output outputs description.","code":""},{"path":"landweb_output-module.html","id":"links-to-other-modules-5","chapter":"10 LandWeb_output Module","heading":"10.1.4 Links to other modules","text":"Originally developed part LandWeb project.","code":""},{"path":"landweb_output-module.html","id":"getting-help-4","chapter":"10 LandWeb_output Module","heading":"10.1.5 Getting help","text":"https://github.com/fRI-Research/LandWeb_output/issues\n## References\n","code":""},{"path":"timesincefire-module.html","id":"timesincefire-module","chapter":"11 timeSinceFire Module","heading":"11 timeSinceFire Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/fRI-Research/timeSinceFire/issues.","code":""},{"path":"timesincefire-module.html","id":"authors-8","chapter":"11 timeSinceFire Module","heading":"11.0.0.1 Authors:","text":"Steve G Cumming stevec@sbf.ulaval.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [ctb]\n","code":""},{"path":"timesincefire-module.html","id":"module-overview-8","chapter":"11 timeSinceFire Module","heading":"11.1 Module Overview","text":"","code":""},{"path":"timesincefire-module.html","id":"module-summary-6","chapter":"11 timeSinceFire Module","heading":"11.1.1 Module summary","text":"Yet Another Age Map Maintainer.\none peculiar LandWeb application.ageMap incremented without bound flammable cells;\ncells identified burned current year set 0.statistics age structure calculated , none yet implemented…current fire model pretty boring.","code":""},{"path":"timesincefire-module.html","id":"module-inputs-and-parameters-4","chapter":"11 timeSinceFire Module","heading":"11.1.2 Module inputs and parameters","text":"Table 11.1 shows full list module inputs.Table 11.1: List timeSinceFire input objects description.summary user-visible parameters provided Table 11.2.Table 11.2: List timeSinceFire parameters description.","code":""},{"path":"timesincefire-module.html","id":"events-2","chapter":"11 timeSinceFire Module","heading":"11.1.3 Events","text":"","code":""},{"path":"timesincefire-module.html","id":"init","chapter":"11 timeSinceFire Module","heading":"11.1.3.1 Init","text":"Init event creates RasterLayer rstTimeSinceFire.\n, rasterizes template vegetation map LCC05 using FireReturnInterval field SpatialPoygonDataFrame shpStudyRegion.\nprocedure retains NAs mask actual study region within template bounding rectangle., RasterLayer rstFlammable used mask areas open water, rock, etc can’t burn thus timeSinceFire applicable.\nbecome NAs rstTimeSinceFire.results flammable cells within polygon shapefile set fire return interval specified polygon / ecoregion.\nbasic van Wagner model implemented, expected landscape mean age.\necoregion age structure equilibrate exponential distribution within multiples return interval.colour ramp legend created layer.short term, initial uniform age distribution result high proportions cells TSFs greater return interval.\nbecomes problem, one initialize regional median age.\ncan done multiplying FireReturnInterval \\(log(2)\\) rounding; lower quantile chosen: see wikipedia page general quantile function.Alternatively, random exponential age structure generated ecoregion current rstTimeSinceFire, roughly follows.\nSee wiki page details possible alternative methods.","code":"\nU_ <- runif(ncell(rstTimeSinceFire))\nT_ <- (-log(U_)) * rstTimeSinceFire[]\nrstTimeSinceFire[] <- round(T_)"},{"path":"timesincefire-module.html","id":"plotting-1","chapter":"11 timeSinceFire Module","heading":"11.1.3.2 Plotting","text":"bare call Plot(sim$rstTimeSinceFire).\nreally want see , ’ll live automated colour scheme legend, hack Init satisfaction.","code":""},{"path":"timesincefire-module.html","id":"saving-1","chapter":"11 timeSinceFire Module","heading":"11.1.3.3 Saving","text":"Nothing saved present.","code":""},{"path":"timesincefire-module.html","id":"age","chapter":"11 timeSinceFire Module","heading":"11.1.3.4 Age","text":"main event. rstFlammable incremented one.\nburned cells, specified input vector burnLoci set age 0.","code":""},{"path":"timesincefire-module.html","id":"module-outputs-5","chapter":"11 timeSinceFire Module","heading":"11.1.4 Module outputs","text":"Description module outputs (Table 11.3).Table 11.3: List timeSinceFire outputs description.","code":""},{"path":"timesincefire-module.html","id":"code-and-data-availability-1","chapter":"11 timeSinceFire Module","heading":"11.1.5 Code and data availability","text":"Code available https://github.com/fRI-Research/timeSinceFire.","code":""},{"path":"timesincefire-module.html","id":"links-to-other-modules-6","chapter":"11 timeSinceFire Module","heading":"11.1.6 Links to other modules","text":"Originally developed part LandWeb project.\n## References\n","code":""},{"path":"landweb_summary-module.html","id":"landweb_summary-module","chapter":"12 LandWeb_summary Module","heading":"12 LandWeb_summary Module","text":"documentation work progress.\nPlease report discrepancies omissions https://github.com/PredictiveEcology/LandWeb_summary/issues.","code":""},{"path":"landweb_summary-module.html","id":"authors-9","chapter":"12 LandWeb_summary Module","heading":"12.0.0.1 Authors:","text":"Eliot J B McIntire eliot.mcintire@nrcan-rncan.gc.ca [aut, cre], Alex M. Chubaty achubaty@-cast.ca [aut]\n","code":""},{"path":"landweb_summary-module.html","id":"module-overview-9","chapter":"12 LandWeb_summary Module","heading":"12.1 Module Overview","text":"","code":""},{"path":"landweb_summary-module.html","id":"module-summary-7","chapter":"12 LandWeb_summary Module","heading":"12.1.1 Module summary","text":"LandWeb simulation post-processing summary creation.","code":""},{"path":"landweb_summary-module.html","id":"module-inputs-and-parameters-5","chapter":"12 LandWeb_summary Module","heading":"12.1.2 Module inputs and parameters","text":"Table 12.1 shows full list module inputs.Table 12.1: List LandWeb_summary input objects description.Provide summary user-visible parameters (Table 12.2)Table 12.2: List LandWeb_summary parameters description.","code":""},{"path":"landweb_summary-module.html","id":"module-outputs-6","chapter":"12 LandWeb_summary Module","heading":"12.1.3 Module outputs","text":"","code":""},{"path":"landweb_summary-module.html","id":"large-patches-data-for-study-region-1","chapter":"12 LandWeb_summary Module","heading":"12.1.3.1 Large Patches Data for study region","text":"Large Patches Data (.csv)Large patches histograms (.png)","code":""},{"path":"landweb_summary-module.html","id":"leading-vegetation-cover-data-for-study-region-1","chapter":"12 LandWeb_summary Module","heading":"12.1.3.2 Leading Vegetation Cover Data for study region","text":"Leading Vegetation Cover Data (.csv)Leading Vegetation Cover histograms (.png)Leading Vegetation Cover boxplots (.png)Description module outputs (Table 12.3).Table 12.3: List LandWeb_summary outputs description.","code":""},{"path":"landweb_summary-module.html","id":"links-to-other-modules-7","chapter":"12 LandWeb_summary Module","heading":"12.1.4 Links to other modules","text":"Initially developed use LandWeb model.","code":""},{"path":"landweb_summary-module.html","id":"getting-help-5","chapter":"12 LandWeb_summary Module","heading":"12.1.5 Getting help","text":"https://github.com/PredictiveEcology/LandWeb_summary/issues\n## References\n","code":""},{"path":"web-app.html","id":"web-app","chapter":"Web app","heading":"Web app","text":"spring 2023, fRI Research longer hosts LandWeb App.\nHowever, appropriate access output data, app may run local shiny instance.Previously available https://landweb.ca.","code":""},{"path":"modifying-landweb.html","id":"modifying-landweb","chapter":"13 Modifying LandWeb","heading":"13 Modifying LandWeb","text":"Important note regarding caching:caching simulation events, modifications made code change input values function module event likely trigger re-evaluation cached call.\nexample, adding new study areas within LandWeb_preamble module (examples 1-3 ).\nTherefore, users need clear simulation caches ensure changes picked caching.","code":""},{"path":"modifying-landweb.html","id":"example-1-adding-new-reporting-polygons","chapter":"13 Modifying LandWeb","heading":"13.1 Example 1: adding new reporting polygons","text":"‘Reporting polygons’ refer polygons LandWeb results summarized within study area.\ncreated LandWeb_preamble module, added sim$ml (object class map, map package).\nReporting polygons used simulation, rather post-processing LandWeb_summaries module.Adding new reporting polygons straightforward - one simply needs edit LandWeb_preamble code 1) create object 2) add map (.e., sim$ml) object.\nreporting polygons retrieved public Google Drive URLs, steps may combined single mapAdd() call.Downstream use requires set reporting polygons Name (shinyLabel) field (column).\nfields typically derived single field raw source, thus identical value.\nAdditionally, helper function joinreportingPolygons() used following geospatial intersection operation (e.g., using postProcess()) ensure post-intersection labels like Names.1 shinyLabel.1 corrected.","code":""},{"path":"modifying-landweb.html","id":"national-scale-polygons","chapter":"13 Modifying LandWeb","heading":"13.1.1 National-scale polygons","text":"adding reporting polygons derived national-scale data sources, changes need made LandWeb_preamble.R well study-area-specific files LandWeb_preamble/R/ LandWeb runs using study area can make use new reporting polygons.Next, need modify regional files make use new national polygons, intersected cropped study area:","code":"\n## LandWeb_preamble.R\n\n## create the national-scale object and add to map object in a single call\nml <- mapAdd(map = ml, layerName = \"National Ecoregions\",\n useSAcrs = TRUE, poly = TRUE, overwrite = TRUE,\n url = \"https://sis.agr.gc.ca/cansis/nsdb/ecostrat/region/ecoregion_shp.zip\",\n columnNameForLabels = \"REGION_NAM\", isStudyArea = FALSE, filename2 = NULL)\n\n## ensure there is a 'Name' field in the new object\nml[[\"National Ecoregions\"]][[\"Name\"]] <- ml[[\"National Ecoregions\"]][[\"REGION_NAM\"]]\n## LandWeb_preamble/R/provSK.R\n\n## 1. create the reporting polygons by intesecting the National Ecoregions with SK admin boundary\nSK.natler <- postProcess(ml[[\"National Ecoregions\"]],\n studyArea = SK, useSAcrs = TRUE,\n filename2 = file.path(dataDir, \"SK_NATLER.shp\")) |>\n joinReportingPolygons(SK)\n\n\n## 2. add to the map object\nml <- mapAdd(SK.natler, ml, layerName = \"SK NATLER\", useSAcrs = TRUE, poly = TRUE,\n analysisGroupReportingPolygon = \"SK NATLER\",\n columnNameForLabels = \"REGION_NAM\", filename2 = NULL)"},{"path":"modifying-landweb.html","id":"regional-or-study-area-specific-polygons","chapter":"13 Modifying LandWeb","heading":"13.1.2 Regional or study-area-specific polygons","text":"adding regional study-area-specific reporting polygons (e.g., FMA’s active/passive landbase), new reporting polygons added corresponding study area code file found LandWeb_preamble/R.","code":"\n## LandWeb_preamble/R/WestFraser.R\n\n## 1. create the reporting polygons by downloading and cleaning up shapefile\nwf_br.lbstatus <- Cache(\n prepInputs,\n url = \"https://drive.google.com/file/d/1A7N_EIbO2wMBI_YTmU2Z-bQwqC9sY_EC/\",\n destinationPath = dataDir,\n targetFile = \"BRL_Landbase.shp\", alsoExtract = \"similar\",\n fun = \"sf::st_read\", studyArea = wf_br, useSAcrs = TRUE\n)\nwf_br.lbstatus <- wf_br.lbstatus[st_is_valid(wf_br.lbstatus), ] ## remove invalid geometries\nwf_br.lbstatus <- wf_br.lbstatus[!st_is_empty(wf_br.lbstatus), ] ## remove empty polygons\nwf_br.lbstatus <- Cache({\n mutate(wf_br.lbstatus, Name = LBC_LBStat, geometry = geometry, .keep = \"used\") |>\n group_by(Name) |>\n summarise(geometry = sf::st_union(geometry)) |>\n ungroup() |>\n mutate(shinyLabel = Name, .before = geometry) |>\n joinReportingPolygons(wf_br)\n})\n\n## 2. add to the map object\nml <- mapAdd(wf_br.lbstatus, ml, layerName = \"West Fraser Blue Ridge LBstatus\", useSAcrs = TRUE, poly = TRUE,\n analysisGroupReportingPolygon = \"West Fraser Blue Ridge LBstatus\",\n columnNameForLabels = \"Name\", filename2 = NULL)"},{"path":"modifying-landweb.html","id":"example-2-adding-a-new-study-area","chapter":"13 Modifying LandWeb","heading":"13.2 Example 2: adding a new study area","text":"create custom study area area northwestern Alberta.\nwant use latest FMU map Spring 2022 (https://www.alberta.ca/forest-management-agreements).Externally LandWeb, create shapefile (similar) new study area, dissolving internal polygon boundaries.\n\nnwab <- sf::st_read(\"AB_FMAs_2022-03-25/Forest Management Unit.shp\") |> \n subset(FMU_CODE %% c(\"F10\", \"F11\", \"F14\", \"F15\", \"F20\", \"F23\", \"F26\", \"F51\", \"M01\",\n \"P08\", \"P14\", \"P19\", \"P20\", \"P21\", \"P22\", \"P52\", \"P55\", \"S10\", \"S11\", \"S14\")) |> \n sf::st_union()Externally LandWeb, create shapefile (similar) new study area, dissolving internal polygon boundaries.Externally LandWeb, upload shapefile Google Drive record file’s Google Drive ID.\n\nshpfile <- \"inputs/NW_AB.shp\"\nsf::st_write(nwab, shpfile)\n\nresult <- googledrive::drive_put(shpfile, googledrive::as_id(\"1LsYuuYICkcpElAkEABFM5zJXf5tTyMLG\"))\nfid <- result$idExternally LandWeb, upload shapefile Google Drive record file’s Google Drive ID.Determine name use running LandWeb new study area, modify LandWeb_preamble.R use new study area name.\nAdd new case -else block LandWeb_preamble.R:\n} else (grepl(\"customABNW\", P(sim)$.studyAreaName)) {\n ml <- customABNW(ml, P(sim)$.studyAreaName, dataDir, sim$canProvs, P(sim)$bufferDist, asStudyArea = TRUE)Determine name use running LandWeb new study area, modify LandWeb_preamble.R use new study area name.\nAdd new case -else block LandWeb_preamble.R:Add new study area map object wrapping necessary components new function defined new file LandWeb_preamble/R.\n’s simplest use existing function/file LandWeb_preamble/R template, making modifications appropriate new study area.\ncopy LandWeb_preamble/R/provAB.R LandWeb_preamble/R/NWAB.R;\nedit LandWeb_preamble/R/NWAB.R, crop AB new study area (NWAB) subsquently using NWAB lieu AB throughout;\nremove unnecessary elements (e.g., planning units planning regions).\nAdd new study area map object wrapping necessary components new function defined new file LandWeb_preamble/R.\n’s simplest use existing function/file LandWeb_preamble/R template, making modifications appropriate new study area.copy LandWeb_preamble/R/provAB.R LandWeb_preamble/R/NWAB.R;copy LandWeb_preamble/R/provAB.R LandWeb_preamble/R/NWAB.R;edit LandWeb_preamble/R/NWAB.R, crop AB new study area (NWAB) subsquently using NWAB lieu AB throughout;edit LandWeb_preamble/R/NWAB.R, crop AB new study area (NWAB) subsquently using NWAB lieu AB throughout;remove unnecessary elements (e.g., planning units planning regions).remove unnecessary elements (e.g., planning units planning regions).now able run LandWeb model setting `.studyAreaName = “customABNW” use new study area.now able run LandWeb model setting `.studyAreaName = “customABNW” use new study area.","code":"\nnwab <- sf::st_read(\"AB_FMAs_2022-03-25/Forest Management Unit.shp\") |> \n subset(FMU_CODE %in% c(\"F10\", \"F11\", \"F14\", \"F15\", \"F20\", \"F23\", \"F26\", \"F51\", \"M01\",\n \"P08\", \"P14\", \"P19\", \"P20\", \"P21\", \"P22\", \"P52\", \"P55\", \"S10\", \"S11\", \"S14\")) |> \n sf::st_union()\nshpfile <- \"inputs/NW_AB.shp\"\nsf::st_write(nwab, shpfile)\n\nresult <- googledrive::drive_put(shpfile, googledrive::as_id(\"1LsYuuYICkcpElAkEABFM5zJXf5tTyMLG\"))\nfid <- result$id} else if (grepl(\"customABNW\", P(sim)$.studyAreaName)) {\n ml <- customABNW(ml, P(sim)$.studyAreaName, dataDir, sim$canProvs, P(sim)$bufferDist, asStudyArea = TRUE)"},{"path":"modifying-landweb.html","id":"example-3-updating-the-lthfc-map","chapter":"13 Modifying LandWeb","heading":"13.3 Example 3: updating the LTHFC map","text":"Using updated version data source requires basic code modifications provided following conditions met:spatial data attributes remain (e.g., field names );new URL provided new data source;new file name different previous version (e.g., version number date).show modify LandWeb_preamble module use hypothetical new version longs-term historic fire cycle (LTHFC) map.looking LandWeb_preamble.R see current version file landweb_ltfc_v8a.shp.looking LandWeb_preamble.R see current version file landweb_ltfc_v8a.shp.create new spatial layer save landweb_ltfc_v9.shp.create new spatial layer save landweb_ltfc_v9.shp.zip new shapefile (auxiliary files) upload zip file Google Drive landweb_ltfc_v9.zip, making note Google Drive share URL.zip new shapefile (auxiliary files) upload zip file Google Drive landweb_ltfc_v9.zip, making note Google Drive share URL.modify two mapAdd() calls LandWeb_preamble.R reference previous version (v8) LTHFC map use new (v9) Google Drive URL.modify two mapAdd() calls LandWeb_preamble.R reference previous version (v8) LTHFC map use new (v9) Google Drive URL.See https://github.com/PredictiveEcology/LandWeb/blob/development/R/new_lthfc.R script used make v8a map v8.\nSee LandWeb_preamble commit see new version added preamble module.","code":""},{"path":"modifying-landweb.html","id":"contributing-changes","chapter":"13 Modifying LandWeb","heading":"13.4 Contributing changes","text":"via pull request11 development branch GitHub","code":""},{"path":"references-1.html","id":"references-1","chapter":"References","heading":"References","text":"","code":""}]