Check which Carbon pool and what units are in the carbon stock data.
Source:R/fct_check_pool.R
fct_check_pool.Rd
The expected input carbon stock table for the tool contains carbon values of different carbon pools coded: - AGB for aboveground biomass, - BGB or RS (Root-to-Shoot ratio) for the belowground biomass, - DW for deadwood, - LI for litter and - SOC for soil organic carbon. All pools can be expressed in tons of Carbon (C) or CO2. AGB and BGB can also be expressed in ton of dry matter (DM), then a carbon fraction (CF) is also needed.
Value
A dataframe with TRUE or FALSE for each pool and factor in the app's carbon stock input data for a given land use.
Examples
library(mocaredd)
library(readxl)
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
cs <- read_xlsx(
path = system.file("extdata/example1.xlsx", package = "mocaredd"),
sheet = "c_stocks",
na = "NA"
)
c_lu <- cs |> filter(lu_id == "ev_wet_closed")
fct_check_pool(.c_lu = c_lu, .c_unit = "C", .c_fraction = NA)
#> lu_id lu_name has_AG has_BG has_RS has_DW has_LI has_SO
#> 1 ev_wet_closed Closed Wet Evergreen TRUE TRUE FALSE TRUE TRUE TRUE
#> has_AL has_CF has_DG
#> 1 FALSE FALSE FALSE