4 CBM_core

This documentation is work in progress. Potential discrepancies and omissions may exist for the time being. If you find any regarding this module, contact us here.

4.1 Overview

This is the core modules of Spades CBM.

4.1.1 Notes on forest type

The SQligth (used in CBM_defaults) has has a column named forest_type_id that identifies a softwood forest (sw) as 1, a mixed forest as 2, and a hardwood forest (hw) as 3. This distinction is important because it determines how the root biomass will be calculated (sw differently than hw). The definition of fotrest_type_id is constant and is the same that is used in canfi_species.csv (species level identification of codes that is needed in the volumne to biomass translation in CBM_vol2biomass), in gcMeta.csv (SK specific growth curve metadata), and in sim$growth_increments because it built from gcMeta and canfi_species. The sim$growth_increment$forest_type_id is the one used to create the sw flag needed for input in the spinup event. After that, the sw_hw flag (1=sw, 0=hw) is stored in the sim$cbm_vars$state$sw_hw column.

4.2 Background

4.3 Inputs

Name Class Description Source
growth_increments Data table 1/2 growth increment matrix CBM_vol2biomass
level3DT Data table pixelGroup level table with all collapsed raster information CBM_dataPrep_SK
spatialDT Data table Pixel level table with all collapsed raster information CBM_dataPrep_SK
masterRaster SpatRaster Raster of study area User provided, for SK: Google Drive
pooldef Character Vector of pools CBM_defaults
spinupSQL Data table Parameters for CBM_core spinup event CBM_defaults
speciesPixelGroup Data table Data table Table connecting pixel groups to species IDs
realAges Numeric Extracted ages for each pixel group CBM_dataPrep_SK
mySpuDmids Data table Summary table of possible CBM-CFS3 disturbances within study area spatial units CBM_dataPrep_SK
disturbanceRasters Character Disturbance rasters for the study area for the duration of simulation User provided, for SK: Google Drive
disturbanceMatrix Data table Default disturbance data CBM_defaults
historicDMtype Numeric Historical disturbance type for each pixel group CBM_dataPrep_SK
lastPassDMtype Numeric Last pass disturebance type for each pizel group CBM_dataPrep_SK

4.4 Module functioning

4.5 Outputs

Name Class Description
spinup_input List input parameters for the spinup functions
cbm_vars List List of 4 data tables: parameters, pools, flux, and state
spinupResults Data frame Pools post spinup in order of pixelGroup
pixelGroupC Data table All vectors (pixelGroup columns) and pools for simulation year.
pixelKeep Data table Tracking all pixels’ pixel group through simulations
cbmPools Data table All pools and pixelGroups after each simulation
NPP Data table Net primary production per pixel group
emissionsProducts matrix Total emissions and products for study area per simulation year