% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/musoMonte.R
\name{musoMonte}
\alias{musoMonte}
\title{musoMonte}
\usage{
musoMonte(
  settings = NULL,
  parameters = NULL,
  inputDir = "./",
  outLoc = "./calib",
  iterations = 10,
  preTag = "mont-",
  outputType = "moreCsv",
  fun = mean,
  varIndex = 1,
  outVars = NULL,
  silent = TRUE,
  skipSpinup = TRUE,
  debugging = FALSE,
  keepEpc = FALSE,
  constrains = NULL,
  skipZero = TRUE,
  postProcString = NULL,
  modifyOut = TRUE,
  ...
)
}
\arguments{
\item{settings}{A list of environmental variables for the Monte Carlo experiment. These settings are generated by the setupMuso function. By default the settings parameter is generated automatically.}

\item{parameters}{This is a dataframe (heterogeneous data-matrix), where the first column is the name of the parameter, the second is a numeric vector of the rownumbers of the given variable in the input EPC file, and the last two columns describe the minimum and the maximum of the parameter (i.e. the parameter ranges), defining the interval for the randomization.}

\item{inputDir}{The location of the input directory for the Biome-BGCMuSo model. This directory must contain a viable pack of all input files and the model executable file.}

\item{iterations}{Number of the Monte Carlo simulations.}

\item{preTag}{This defines the name of the output files. This tag will be re-used so that the results will be like preTag-1.csv, preTag-2csv...}

\item{outputType}{This parameter can be "oneCsv", "moreCsv", and "netCDF". If "oneCsv" is chosen the function creates one large csv file for all of the runs. If "moreCsv" is chosen, every model output goes to separate files. If netCDF is selected the output will be stored in a netCDF file. The default value of the outputTypes is "moreCsv". Note that netCDF is not implemented yet.}

\item{fun}{If you select a variable from the possible outputs (by using the varIndex parameter), you have to provide a function which maps to a subset of real numbers. The most frequent possibilities are: mean, min, max, var, but you can define any function for your needs.}

\item{varIndex}{This parameter specifies which parameter will be used for the Monte Carlo experiment from the output list of Biome-BGCMuSo (defined by the INI file). You can extract this information from the INI files. At the output parameter specifications, the parameter order will determine this number. For example, if you have set these output parameters: 412, 874, 926, 888, and you want to use 926 for the experiment, you should specify varIndex as 3.}

\item{debugging}{If you set this parameter, you can save every logfile, and RBBGCMuso will select those which contains errors. This is useful to study why the model crashes with a given parameter set.}

\item{keepEpc}{If you set keepEpc as TRUE, it will save every selected EPC file, and move the wrong ones into the WRONGEPC directory.}

\item{calibrationPar}{You might want to change some parameters in your EPC file before you run the modell. You have to select the appropirate model parameters here. You can refer to the parameters by the number of the line in the EPC file where the variables are defined. The indexing of the lines starts at 1, and each line matters (like in any simple text file). You should use a vector for this selection like c(1,5,8)}
}
\description{
This function executes the Monte Carlo experiment with Biome-BGCMuSo (musoRand is called by this function). It samples the selected  model parameters within user defined ranges from conditional multivariate uniform distribution, and then runs the model for each run.
}
\author{
Roland HOLLOS
}
