% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multiSite.R
\name{multiSiteCalib}
\alias{multiSiteCalib}
\title{multiSiteCalib}
\usage{
multiSiteCalib(
  measurements,
  calTable,
  parameters,
  dataVar,
  iterations = 100,
  burnin = ifelse(iterations < 3000, 3000, NULL),
  likelihood,
  execPath,
  thread_prefix = "thread",
  numCores = (parallel::detectCores() - 1),
  pb = txtProgressBar(min = 0, max = iterations, style = 3),
  pbUpdate = setTxtProgressBar,
  copyThread = TRUE,
  constraints = NULL,
  th = 10,
  treeControl = rpart.control()
)
}
\arguments{
\item{calTable}{A dataframe which contantains the ini file locations and the domains they belongs to}

\item{parameters}{A dataframe with the name, the minimum, and the maximum value for the parameters used in MonteCarlo experiment}

\item{dataVar}{A named vector where the elements are the MuSo variable codes and the names are the same as provided in measurements and likelihood}

\item{iterations}{The number of MonteCarlo experiments to be executed}

\item{burnin}{Currently not used, altought it is the length of burnin period of the MCMC sampling used to generate random parameters}

\item{likelihood}{A list of likelihood functions which names are linked to dataVar}

\item{execPath}{If you are running the calibration from different location than the MuSo executable, you have to provide the path}

\item{thread_prefix}{The prefix of thread directory names in the tmp directory created during the calibrational process}

\item{numCores}{The number of processes used during the calibration. At default it uses one less than the number of threads available}

\item{pb}{The progress bar function. If you use (web-)GUI you can provide a different function}

\item{pbUpdate}{The update function for pb (progress bar)}

\item{copyThread}{A boolean, recreate tmp directory for calibration or not (case of repeating the calibration)}

\item{th}{A trashold value for multisite calibration. What percentage of the site should satisfy the constraints.}

\item{treeControl}{A list which controls (maximal complexity, maximal depth) the details of the decession tree making.}

\item{measuremets}{The table which contains the measurements}

\item{contsraints}{A dataframe containing the constraints logic the minimum and a maximum value for the calibration.}
}
\description{
This funtion uses the Monte Carlo technique to uniformly sample the parameter space from user defined parameters of the Biome-BGCMuSo model. The sampling algorithm ensures that the parameters are constrained by the model logic which means that parameter dependencies are fully taken into account (parameter dependency means that e.g leaf C:N ratio must be smaller than C:N ratio of litter; more complicated rules apply to the allocation parameters where the allocation fractions to different plant compartments must sum up 1). This function implements a mathematically correct solution to provide uniform distriution of the random parameters on convex polytopes.
}
\author{
Roland HOLLOS
}
