Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description: Implementation of several components of the Carbon Budget Model of
Canadian Forest Service (v3).
URL:
https://github.com/PredictiveEcology/CBMutils
Version: 2.5.4.9000
Version: 2.5.4.9001
Authors@R: c(
person("Céline", "Boisvenue", email = "celine.boisvenue@nrcan-rncan.gc.ca", role = c("aut", "cre")),
person("Alex M", "Chubaty", email = "achubaty@for-cast.ca", role = c("aut"), comment = c(ORCID = "0000-0001-7146-8135")),
Expand Down
7 changes: 4 additions & 3 deletions R/CBM-tools_calcRootC.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ utils::globalVariables(c(
#' @param b_hw "b" value for hardwood root biomass
#' @param a_frp "a" value for fine root proportion
#' @param b_frp "b" value for fine root proportion
#' @param c_frp "c" value for fine root proportion
#' @param biomassToCarbonRate Conversion factor of biomass to carbon
#'
#' @references
Expand All @@ -29,7 +30,7 @@ utils::globalVariables(c(
calcRootC <- function(aboveGroundC, sw_hw,
a_sw = 0.222, b_sw = 1,
a_hw = 1.576, b_hw = 0.615,
a_frp = 0.072, b_frp = 0.354,
a_frp = 0.072, b_frp = 0.354, c_frp = -0.060212,
biomassToCarbonRate = 0.5){

aboveGroundColumns <- c("Merch", "Foliage", "Other")
Expand All @@ -43,7 +44,7 @@ calcRootC <- function(aboveGroundC, sw_hw,
totAGC <- rowSums(aboveGroundC[, ..aboveGroundColumns])

# Convert Mg/ha of Carbon to Mg/ha of biomass
totAGB <- totAGC * 2
totAGB <- totAGC / biomassToCarbonRate

# Calculate root total biomass
if(!all(sw_hw %in% c(1,0))) {
Expand All @@ -55,7 +56,7 @@ calcRootC <- function(aboveGroundC, sw_hw,
a_hw * totAGB^b_hw)

# Calculate the proportion of fine roots
fineRootProp <- a_frp + b_frp * exp(-0.060212 * rootTotBiom)
fineRootProp <- a_frp + b_frp * exp(c_frp * rootTotBiom)


# Calculate the proportion of fine roots
Expand Down
3 changes: 3 additions & 0 deletions man/calcRootC.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading