-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCBM_core.Rmd
62 lines (44 loc) · 3.49 KB
/
CBM_core.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: "CBM Spades Manual"
subtitle: "`r paste('v.', Sys.getenv('SpadesCBM_MAN_VERSION'))`"
author: "Céline Boisvenue"
date: "26 June 2024"
output: pdf_document
editor_options:
chunk_output_type: console
---
# CBM_core
## Overview
This is the core modules of Spades CBM.
### 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.
## List of input objects
| Name | Class | Description | Source |
|-----------------|-----------------|-----------------------|-----------------|
| growth_increments | Data table | | CBM_vol2biomass |
| forestTypeID | Data table | Defines forest types and their respective IDs | CM_defaults |
| level3DT | Data table | pixelGroup level table with all collapsed raster information | |
| spatialDT | Data table | Pixel level table with all collapsed raster information | CBM_dataPrep_x |
| masterRaster | SpatRaster | | CBM_dataPrep_x |
| pooldel | Character | Vector of pools | CBM_defaults |
| spinupSQL | Data table | Parameters for CBM_core spinup event | CBM_defaults |
| disturbanceMatrix | Data table | Default disturbance data | CBM_defaults |
## List of output objects
| Name | Class | Description |
|------------------|------------------|-------------------------------------|
| spinup_input | List | |
| cbm_vars | List | |
| 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 |
## Module flow (rename this section later)
1.
2.
3.
4.
## OLD VERSION
## Overview
NPP: Net primary productivity is for both above and below ground productivity. Provide an overview of what the module does / how to use the module.