############################################################
# functions comprise algorithm to calculate passive C pool #
############################################################
#' @title Calculate the \code{k_p} parameter
#' @description Calculates the model \code{k_p} parameter, a precursor parameter to calculating the
#' steady-state slow carbon pool.
#' @param tfac A numeric vector indicating the model temperature factor, calculated using
#' \code{tfac()}.
#' @param wfac A numeric vector indicating the model water factor, calculated using \code{wfac()}.
#' @param params A named list containing model parameters. Defaults to the package default parameter
#' set \code{soilc_params}.
#' @export
k_p <- function(tfac, wfac, params = soilc_params) params$kfacp$be * tfac * wfac
#' @title Calculate the steady-state passive soil carbon pool
#' @description Calculates the steady-state version of the modelled passive soil carbon pool, in
#' tonnes C ha^-1.
#' @param active_y_ss Numeric vector indicating the steady-state version of the modelled active soil
#' carbon pool, in tonnes C ha^-1.
#' @param slow_y_ss Numeric vector indicating the steady-state version of the modelled slow soil
#' carbon pool, in tonnes C ha^-1.
#' @param k_a Numeric vector containing the model \code{k_a} parameter, calculated using
#' \code{k_a()}.
#' @param k_s Numeric vector indicating the model \code{k_s} parameter, calculated using
#' \code{k_s()}.
#' @param k_p Numeric vector containing the model \code{k_p} parameter, calculated using
#' \code{k_p()}.
#' @param params A named list containing model parameters. Defaults to the package default parameter
#' set \code{soilc_params}.
#' @export
passive_y_ss <- function(active_y_ss, slow_y_ss, k_a, k_s, k_p, params = soilc_params) {
((active_y_ss * k_a * params$f5$be) + (slow_y_ss * k_s * params$f6$be)) / k_p
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.