make_logpost Define the function that will calculate the log posterior. The function returned by make_logpost will be used in the metrop to conduct the mcmc. TODO figure out a better way to document the inputs/

make_logpost(
  comp,
  params,
  t = seq(0, 1000, 1),
  state = c(P = 10, M = 5, Q = 0.1, B = 2, D = 1, EP = 1e-05, EM = 1e-05, IC = 0, Tot =
    18.10002),
  carbon_pools_func = MENDplus::MEND2013_pools,
  flux_func = MENDplus::MEND2013_fluxes,
  ptable = MENDplus::MEND2013_params,
  verbose = FALSE
)

Arguments

comp
time

model time

IC

inorganic carbon, is the the co2 flux from microbial respiration.

params

a named vector of the inital guess of the parameters that will be calibrated in the mcmc.

t

time vector that will be used to run the model.

state

the inital state variables

carbon_pools_func

the function that governs the relationship between the different carbon pools, by default it is set to MEND2013_pools.

flux_func

the function that governs fluxes, by default is it set to MEND2013_fluxes.

ptable
MEND2013_params. While a different table may be used it must contain the following columns.
parameter

String character of the default MEND parameters.

description

String character describing the parameter.

units

String character of the parameter units.

value

Numeric values taken from the table 2 of the Wang et al. 2013

verbose

a TRUE/FALSE indicator to run the function in verbose mode where messages are printed out, by default set to FALSE.

Value

a function that will return the log posterior.