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)
path <- system.file("extdata/example1-4pools.xlsx", package = "mocaredd")
cs <- read_xlsx(path = path, sheet = "c_stocks", na = "NA")
c_lu <- cs |> filter(lu_id == "ev_wet_closed")
#> Error in filter(cs, lu_id == "ev_wet_closed"): ℹ In argument: `lu_id == "ev_wet_closed"`.
#> Caused by error:
#> ! object 'lu_id' not found
fct_check_pool(.c_lu = c_lu, .c_unit = "C", .c_fraction = NA)
#> Error in fct_check_pool(.c_lu = c_lu, .c_unit = "C", .c_fraction = NA): unused argument (.c_lu = c_lu)