new feature: randEpc version: 0.6.2.0
This commit is contained in:
parent
788a13bb99
commit
41d66da7a7
@ -1,6 +1,6 @@
|
||||
Package: RBBGCMuso
|
||||
Title: An R package for BiomeBGC-MuSo ecosystem modelling
|
||||
Version: 0.6.1.4
|
||||
Version: 0.6.2.0
|
||||
Authors@R: person("Roland", "Hollo's", , "hollorol@gmail.com", role = c("aut", "cre"))
|
||||
Description: What the package does (one paragraph).
|
||||
Depends: R (>= 3.3.2)
|
||||
|
||||
@ -21,6 +21,7 @@ export(normalMuso)
|
||||
export(paramSweep)
|
||||
export(plotMuso)
|
||||
export(plotMusoWithData)
|
||||
export(randEpc)
|
||||
export(runMuso)
|
||||
export(rungetMuso)
|
||||
export(setupMuso)
|
||||
@ -56,9 +57,9 @@ importFrom(ggplot2,xlab)
|
||||
importFrom(ggplot2,ylab)
|
||||
importFrom(limSolve,xsample)
|
||||
importFrom(magrittr,'%<>%')
|
||||
importFrom(magrittr,'%>%')
|
||||
importFrom(rmarkdown,pandoc_version)
|
||||
importFrom(rmarkdown,render)
|
||||
importFrom(scales,percent)
|
||||
importFrom(tcltk,tk_choose.files)
|
||||
importFrom(tibble,rownames_to_column)
|
||||
importFrom(tidyr,gather)
|
||||
|
||||
35
RBBGCMuso/R/genEpc.R
Normal file
35
RBBGCMuso/R/genEpc.R
Normal file
@ -0,0 +1,35 @@
|
||||
#' randEpc
|
||||
#'
|
||||
#' randEpc is a random epc creator based on musoMonte
|
||||
#' @author Roland HOLLOS
|
||||
#' @param parameterFile parameters.csv file location
|
||||
#' @param location output location directory
|
||||
#' @param sourceEpc the original epc file-the template
|
||||
#' @param iteration the number of iterations
|
||||
#' @export
|
||||
|
||||
randEpc <- function(parameterFile = "parameters.csv", location = "./epcDir",
|
||||
sourceEpc = "maize.epc", iterations = 1000, constrains = NULL){
|
||||
|
||||
if(!dir.exists(location)){
|
||||
dir.create(location)
|
||||
}
|
||||
sourceEpc <- normalizePath(sourceEpc)
|
||||
currDir <- getwd()
|
||||
parameters <- read.csv(parameterFile)
|
||||
|
||||
if(iterations < 3000){
|
||||
randVals <- musoRand(parameters = parameters,constrains = constrains, iterations = 3000)
|
||||
randVals[[2]]<- randVals[[2]][sample(1:3000,iterations),]
|
||||
} else {
|
||||
randVals <- musoRand(parameters = parameters,constrains = constrains, iterations = iterations)
|
||||
}
|
||||
file.copy(sourceEpc,location,overwrite = TRUE)
|
||||
setwd(location)
|
||||
for(i in seq(iterations)){
|
||||
epcOut <- gsub("\\.",paste0("-",i,"."),basename(sourceEpc))
|
||||
changemulline(filePaths = basename(sourceEpc), calibrationPar = randVals[[1]],
|
||||
contents = randVals[[2]][i,],fileOut = epcOut, fileToChange = "epc")
|
||||
}
|
||||
setwd(currDir)
|
||||
}
|
||||
@ -2,13 +2,13 @@
|
||||
% Please edit documentation in R/changeMuso.R
|
||||
\name{changemulline}
|
||||
\alias{changemulline}
|
||||
\title{This is the function which is capable change multiple specific lines to other using their row numbers.}
|
||||
\title{This is the function which is capable to change multiple specific lines to others using their row numbers.}
|
||||
\usage{
|
||||
changemulline(filePaths, calibrationPar, contents, fileOut, fileToChange,
|
||||
modifyOriginal = FALSE)
|
||||
}
|
||||
\description{
|
||||
he function uses the previous changspecline function to operate.
|
||||
The function uses the previous changspecline function to operate.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
|
||||
@ -7,9 +7,9 @@
|
||||
cleanupMuso(location=NULL, simplicity=TRUE,deep=FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{location}{It is the place where your output files are.}
|
||||
\item{location}{This is the place (directory) where your output files are located.}
|
||||
|
||||
\item{simplicity}{TRUE or FALSE. If true cleanupMuso will erase only the log files from only the location}
|
||||
\item{simplicity}{TRUE or FALSE. If TRUE cleanupMuso will erase only the log files from the location}
|
||||
|
||||
\item{deep}{If it is TRUE, it will delete every files from the subdirectories also}
|
||||
}
|
||||
@ -17,5 +17,5 @@ cleanupMuso(location=NULL, simplicity=TRUE,deep=FALSE)
|
||||
cleanupMuso can erase all of the unnecessary log and output files.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -9,19 +9,19 @@ compareMuso(settings = NULL, parameters, variable = 1,
|
||||
timeFrame = "day")
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{You have to run the setupMuso function before rungetMuso. It is its output which contains all of the necessary system variables. It sets the whole environment}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{parameters}{In the settings variable you have set the row indexes of the variables, you wish to change. In this parameter you can give an exact value for them in a vector like: c(1,2,3,4)}
|
||||
\item{parameters}{Using this function it is possible to change some of the EPC parameters prior to model execution. This can be achieved with this option. In the parameters variable you have set the row indices of the variables that you wish to change. In this parameters you can give an exact value for them in a vector form like c(1,2,3,4).}
|
||||
|
||||
\item{variable}{The name of the output variable to plot}
|
||||
|
||||
\item{calibrationPar}{in the help of setupMuso function.}
|
||||
\item{calibrationPar}{You might want to change some parameters in your EPC file before running the model. This function offers possibility for this without editing the EPC file. In this situation you have to select the appropirate model parameters first. You can refer to these parameters with the number of the line in the EPC file. Indexing of lines start from one. You should use a vector for this referencing like c(1,5,8)}
|
||||
|
||||
\item{fileToChange}{You can change any line of the epc or the ini file, you just have to specify with this variable which file you van a change. Two options possible: "epc", "ini", "both"}
|
||||
\item{fileToChange}{You can change any line of the EPC or the INI file. Please choose "EPC", "INI" or "BOTH". This file will be used for the analysis, and the original parameter values will be changed according to the choice of the user.}
|
||||
}
|
||||
\description{
|
||||
This function runs the modell, change one of it's input, and plot both in one plot.
|
||||
This function runs the model, then changes one of its input data, runs it again, and plots both results in one graph.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
22
RBBGCMuso/man/dynRound.Rd
Normal file
22
RBBGCMuso/man/dynRound.Rd
Normal file
@ -0,0 +1,22 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/assistantFunctions.R
|
||||
\name{dynRound}
|
||||
\alias{dynRound}
|
||||
\title{dynRound}
|
||||
\usage{
|
||||
dynRound(x, y, seqLen)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{The lower end of the sequence}
|
||||
|
||||
\item{y}{The higher end of the sequence}
|
||||
|
||||
\item{seqLen}{The length of the sequence}
|
||||
}
|
||||
\value{
|
||||
rounded sequence
|
||||
}
|
||||
\description{
|
||||
This function rounds a sequence (definded by its endpoints and the length) optimally
|
||||
}
|
||||
\keyword{internal}
|
||||
@ -9,12 +9,12 @@ getLogs(outputLoc, outputNames, type = "spinup")
|
||||
\arguments{
|
||||
\item{outputLoc}{This is the location of the output files.}
|
||||
|
||||
\item{outputNames}{These are the prefixis of the logfiles}
|
||||
\item{outputNames}{These are the prefixes of the logfiles}
|
||||
}
|
||||
\value{
|
||||
Logfiles with paths
|
||||
}
|
||||
\description{
|
||||
This function gives us the muso logfiles with their paths
|
||||
This function gives us the muso logfiles with their path
|
||||
}
|
||||
\keyword{internal}
|
||||
|
||||
@ -9,10 +9,10 @@ getOutFiles(outputLoc, outputNames)
|
||||
\arguments{
|
||||
\item{outputLoc}{This is the location of the output files.}
|
||||
|
||||
\item{outputNames}{These are the prefixis of the logfiles}
|
||||
\item{outputNames}{These are the prefixes of the logfiles.}
|
||||
}
|
||||
\value{
|
||||
Output files with their paths
|
||||
Output files with their paths.
|
||||
}
|
||||
\description{
|
||||
This function gives us the muso output files with their paths
|
||||
|
||||
@ -12,11 +12,11 @@ musoMapping(code, mapData=NULL)
|
||||
\item{mapData}{updateMusomapping generated matrix}
|
||||
}
|
||||
\value{
|
||||
The name of the MuSo outputcode
|
||||
The name of the Biome-BGCMuSo output code (e.g. if code is 3009 this function should return GPP to the user)
|
||||
}
|
||||
\description{
|
||||
musoMapping can give us the name of a muso outputcode
|
||||
musoMapping can provide the user the name of a Biome-BGCMuSo output code. Within Biome-BGCMuSo the state variables and fluxes are marked by integer numbers. In order to provide meaningful variable names (e.g. 3009 means Gross Primary Production) a conversion table is needed which is utilized by this function. This function converts variable codes into names musoMappingFind does the opposite.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
musoMapping(code, mapData=NULL)
|
||||
}
|
||||
\arguments{
|
||||
\item{variable}{If null return the whole mapping, else search a variable code}
|
||||
\item{variable}{If this is null, return the whole mapping table. In other cases search for the variable code}
|
||||
}
|
||||
\value{
|
||||
The code of th specific name
|
||||
The code of the specific output variable name
|
||||
}
|
||||
\description{
|
||||
musoMapping can give us the name of a muso outputcode
|
||||
musoMappingFind can provide us the code of the Biome-BGCMuSo output variable name. Within Biome-BGCMuSo the state variables and fluxes are marked by integer numbers. In order to provide meaningful variable names (e.g. 3009 means Gross Primary Production) a conversion table is needed which is utilized by this function. This function converts variable names into codes. musoMapping does the opposite.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -1,15 +1,9 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/musoMont.R, R/musoMonte.R
|
||||
% Please edit documentation in R/musoMonte.R
|
||||
\name{musoMonte}
|
||||
\alias{musoMonte}
|
||||
\title{musoMont}
|
||||
\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, ...)
|
||||
|
||||
musoMonte(settings = NULL, parameters = NULL, inputDir = "./",
|
||||
outLoc = "./calib", iterations = 10, preTag = "mont-",
|
||||
outputType = "moreCsv", fun = mean, varIndex = 1, outVars = NULL,
|
||||
@ -17,57 +11,31 @@ musoMonte(settings = NULL, parameters = NULL, inputDir = "./",
|
||||
keepEpc = FALSE, constrains = NULL, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{A list of montecarlos environmental variables. It is generated by the setupMuso() function. In default the settings parameter is generated automatically.}
|
||||
\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 (heterogen data-matrix), which first column is the name of the parameters, the second is a numeric vector of the rownumbers of the given variable in the epc-fie, the last two column consist the endpont of the parameter-ranges, where the parameters will be randomized.}
|
||||
\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, this directory must content a viable pack of all inputfiles and the executable file.}
|
||||
\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 monteCarlo run.}
|
||||
\item{iterations}{Number of the Monte Carlo simulations.}
|
||||
|
||||
\item{preTag}{It will be the name of the output files. For example preTag-1.csv, pretag-2csv...}
|
||||
\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 choosen the function create 1 big csv file for all of the runs, if "moreCsv" is choosen, every modell output goes to separate files, if netCDF is selected the outputs will be put in a netCDF file. The default value of the outputTypes is "moreCsv". netCDF is not implemented yet.}
|
||||
\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 (with specify 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 need.}
|
||||
\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 specify which parameter of the output will be used. You can extract this information from the ini-files. At the output parameter specifications, the parameters order will determine this number. For example, if you have set these output parameters: 412, 874, 926, 888, and you want to use 926, you should address varIndex with 3.}
|
||||
\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.}
|
||||
\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 also true, it will save every selected epc file, and put the wrong ones in the WRONGEPC directory.}
|
||||
\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 may want to change some parameters in your epc file, before you run the modell. You have to select the appropirate modell parameters. You can refence to these with the number of the line in the epc file where the variables are. It indexes from one. You should use a vector for this, like: c(1,5,8)}
|
||||
|
||||
\item{settings}{A list of montecarlos environmental variables. It is generated by the setupMuso() function. In default the settings parameter is generated automatically.}
|
||||
|
||||
\item{parameters}{This is a dataframe (heterogen data-matrix), which first column is the name of the parameters, the second is a numeric vector of the rownumbers of the given variable in the epc-fie, the last two column consist the endpont of the parameter-ranges, where the parameters will be randomized.}
|
||||
|
||||
\item{calibrationPar}{You may want to change some parameters in your epc file, before you run the modell. You have to select the appropirate modell parameters. You can refence to these with the number of the line in the epc file where the variables are. It indexes from one. You should use a vector for this, like: c(1,5,8)}
|
||||
|
||||
\item{inputDir}{The location of the input directory, this directory must content a viable pack of all inputfiles and the executable file.}
|
||||
|
||||
\item{iterations}{number of the monteCarlo run.}
|
||||
|
||||
\item{preTag}{It will be the name of the output files. For example preTag-1.csv, pretag-2csv...}
|
||||
|
||||
\item{outputType}{This parameter can be "oneCsv", "moreCsv", and "netCDF". If "oneCsv" is choosen the function create 1 big csv file for all of the runs, if "moreCsv" is choosen, every modell output goes to separate files, if netCDF is selected the outputs will be put in a netCDF file. The default value of the outputTypes is "moreCsv". netCDF is not implemented yet.}
|
||||
|
||||
\item{fun}{If you select a variable from the possible outputs (with specify 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 need.}
|
||||
|
||||
\item{varIndex}{This parameter specify which parameter of the output will be used. You can extract this information from the ini-files. At the output parameter specifications, the parameters order will determine this number. For example, if you have set these output parameters: 412, 874, 926, 888, and you want to use 926, you should address varIndex with 3.}
|
||||
|
||||
\item{debugging}{If you set this parameter, you can save every logfile, and RBBGCMuso will select those which contains errors.}
|
||||
|
||||
\item{keepEpc}{if you set keepEpc also true, it will save every selected epc file, and put the wrong ones in 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 does monteCarlo on BiomeBGC-MuSo. It samples specified modell variables in given rangge from conditional multivariate uniform distribution, and runs the modell for each run.
|
||||
|
||||
This function does monteCarlo on BiomeBGC-MuSo. It samples specified modell variables in given rangge from conditional multivariate uniform distribution, and runs the modell for each run.
|
||||
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
|
||||
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -9,22 +9,22 @@ musoQuickEffect(settings = NULL, calibrationPar = NULL, startVal,
|
||||
parName = "parVal")
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{The settings from setupMuso output}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{startVal}{The oroginal parameterValue}
|
||||
\item{startVal}{The initial value of the given parameter.}
|
||||
|
||||
\item{endVal}{The goal value while the function pass}
|
||||
\item{endVal}{The maximum of the given parameter.}
|
||||
|
||||
\item{nSteps}{How many steps 'till you reach the endVal}
|
||||
\item{nSteps}{Number of steps from startVal to endVal. It equals the number of simulations, and number of curves on the final plot.}
|
||||
|
||||
\item{fileTochange}{Please choose "epc" "ini" or "both". This is the place of the orininal variable.}
|
||||
\item{fileTochange}{Please choose "EPC", "INI" or "BOTH". This file will be used for the analysis, and the original parameter values will be changed according to the choice of the user.}
|
||||
}
|
||||
\value{
|
||||
An effect plot
|
||||
Graph showing the runs with the selected parameters with color coding. The graph will show data from the last simulation year.
|
||||
}
|
||||
\description{
|
||||
This function changes a choosen parameter, and visualize the effect of the change on a chosen variable.
|
||||
This function changes a chosen parameter from the INI or from the ecophysiological constants file (EPC) within a predefined range (defined by the user), and visualizes the effect of the change on the selected output variable. The user has to specify the parameter, the interval for the parameter effect test, and the number of steps. This function focuses only on one parameter. The so-called paramSweep function can manipulate multiple INI/EPC parameters and visualize the results.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -7,15 +7,15 @@
|
||||
musoRand(parameters, constrains = NULL, iterations = 3000)
|
||||
}
|
||||
\arguments{
|
||||
\item{parameters}{This is a dataframe (heterogen data-matrix), which first column is the name of the parameters, the second is a numeric vector of the rownumbers of the given variable in the input-file, the last two column consist the endpont of the parameter-ranges, where the parameters will be randomized.}
|
||||
\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{constrains}{This is a matrics wich specify the constrain rules for the sampling. Further informations coming son.}
|
||||
\item{constrains}{This is a matrix wich specify the constrain rules for the sampling. Parameter dependencies are described in the Biome-BGCMuSo User's Guide. Further informations is coming soon.}
|
||||
|
||||
\item{iteration}{The number of sample-s. It is adviced to use at least 3000 iteration, because it is generally fast and it can be subsampled later at any time.}
|
||||
\item{iteration}{The number of samples for the Monte-Carlo experiment. We propose to use at least 3000 iteration because it is generally fast and it can be subsampled later at any time.}
|
||||
}
|
||||
\description{
|
||||
This funtion samples uniformly from the choosen parameters of the BiomeBGC-Muso model, which parameters are constrained by the model logic.
|
||||
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 for all selected parameters.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -12,35 +12,35 @@ musoSensi(monteCarloFile = NULL, parameters = NULL, settings = NULL,
|
||||
skipSpinup = TRUE, dpi = 300)
|
||||
}
|
||||
\arguments{
|
||||
\item{monteCarloFile}{If you run musoMonte function previously, you did not have to rerun the monteCarlo, just provide the preservedEpc.csv file with its path. If you do not set this parameter, musoSensi will fun the musoMonte function to get all of the information.}
|
||||
\item{monteCarloFile}{If you run the musoMonte function previously, you do not have to re-run the monteCarlo experiment, simply provide the preservedEpc.csv file to musoSensi with its path. If you do not set this parameter, musoSensi will run the musoMonte function to get all necessary information.}
|
||||
|
||||
\item{parameters}{This is a dataframe (heterogen data-matrix), which first column is the name of the parameters, the second is a numeric vector of the rownumbers of the given variable in the epc-fie, the last two column consist the endpont of the parameter-ranges, where the parameters will be randomized.}
|
||||
\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{settings}{A list of montecarlos environmental variables. It is generated by the setupMuso() function. In default the settings parameter is generated automatically.}
|
||||
\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{inputDir}{The location of the input directory, this directory must content a viable pack of all inputfiles and the executable file.}
|
||||
\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 monteCarlo run.}
|
||||
\item{iterations}{Number of the Monte Carlo simulations.}
|
||||
|
||||
\item{preTag}{It will be the name of the output files. For example preTag-1.csv, pretag-2csv...}
|
||||
\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 choosen the function create 1 big csv file for all of the runs, if "moreCsv" is choosen, every modell output goes to separate files, if netCDF is selected the outputs will be put in a netCDF file. The default value of the outputTypes is "moreCsv". netCDF is not implemented yet.}
|
||||
\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 (with specify 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 need.}
|
||||
\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 specify which parameter of the output will be used. You can extract this information from the ini-files. At the output parameter specifications, the parameters order will determine this number. For example, if you have set these output parameters: 412, 874, 926, 888, and you want to use 926, you should address varIndex with 3.}
|
||||
\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{outputFile}{The filename in which the output of musoSensi function will be saved. It's default value is: "sensitivity.csv"}
|
||||
\item{outputFile}{The filename in which the output of the musoSensi function will be saved. By default it is "sensitivity.csv"}
|
||||
|
||||
\item{plotName}{The name of the output barplot. It's default value is: "sensitivity.jpg"}
|
||||
\item{plotName}{The name of the output barplot. It's default value is "sensitivity.jpg"}
|
||||
|
||||
\item{skipSpinup}{With this parameter, you can turn of the spinup phase after the first spinup. I will decrease the time significantly.}
|
||||
\item{skipSpinup}{With this parameter you can turn off the spinup phase after the first spinup was successfully executed (endpoint file is available). This option can dramatically decrease the time needed for the sensitivity analysis. Note that in case of natural vegetation this option might not be feasible. For croplands this is more feasible.}
|
||||
|
||||
\item{calibrationPar}{You may want to change some parameters in your epc file, before you run the modell. You have to select the appropirate modell parameters. You can refence to these with the number of the line in the epc file where the variables are. It indexes from one. You should use a vector for this, like: c(1,5,8)}
|
||||
\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 does regression based sensitivity analysis based on the output of musoMonte.
|
||||
This function performs multiple liear regression based global sensitivity analysis based on the output of musoMonte. First the user has to select the parameters of interest with possible minimum and maximum values. After execution musoSensi will then assign weights to the predefined parameters which means that the importance of the parameters will be ranked. The sensitivity analysis calculates the effect of input variability on the output variability in Monte Carlo framework. The result will largely depend on the selected output variable (GPP, evapotranspiration, LAI, soil water content), and on the parameter ranges. Other factors like climate, management and site specific conditions might affect the results.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -8,38 +8,38 @@ normalMuso(settings,parameters=NULL, timee="d", debugging=FALSE, logfilename=NUL
|
||||
keepEpc=FALSE, export=FALSE, silent=FALSE, aggressive=FALSE, leapYear=FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{You have to run the setupMuso function before calibMuso. It is its output which contains all of the necessary system variables. It sets the whole running environment}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{parameters}{In the settings variable you have set the row indexes of the variables, you wish to change. In this parameter you can give an exact value for them in a vector like: c(1,2,3,4)}
|
||||
\item{parameters}{Using normalMuso it is possible to change some of the EPC parameters prior to model execution. This can be achieved with this option. In the parameters variable you have set the row indices of the variables that you wish to change. In this parameters you can give an exact value for them in a vector form like c(1,2,3,4).}
|
||||
|
||||
\item{timee}{The required timesteps in the modell output. It can be "d", if it is daily, "m", if it's monthly, "y", it it is yearly. I recommend to use daily data, the yearly and monthly data is not well-tested yet.}
|
||||
\item{timee}{The required timesteps in the model output. It can be "d", if it is daily, "m", if it is monthly, "y" if it is yearly. It is recommended to use daily data, as the yearly and monthly data is not well-tested yet.}
|
||||
|
||||
\item{debugging}{If it is TRUE, it copies the log file to a Log directory to store it, if it is stamplog it contatenate a number before the logfile, which is one more than the maximum of the represented ones in the LOG directory. If it is true or stamplog it collects the "wrong" logfiles}
|
||||
\item{debugging}{If debugging is set to TRUE, after model execution the function copies the Biome-BGCMuSo log file into a LOG directory and stores it for further processing. If debugging is set to STAMPLOG instead of TRUE, it concatenates a number before the logfile, which is one plus the maximum of those present in the LOG directory. In each case the log files will be saved.}
|
||||
|
||||
\item{logfilename}{If you want to set a specific name for your logfiles you can set this via logfile parameter}
|
||||
\item{logfilename}{If you would like to set a specific name for your logfiles you can set this via the logfile parameter.}
|
||||
|
||||
\item{keepEpc}{If TRUE, it keeps the epc file and stamp it, after these copies it to the EPCS directory. If debugging True or false, it copies the wrong epc files to the wrong epc directory.}
|
||||
\item{keepEpc}{If keepEpc is set to TRUE, the function keeps the EPC file and stamps it, and then copies it to the EPCS directory. If debugging is set to TRUE, it copies the wrong EPC files to the wrong epc directory.}
|
||||
|
||||
\item{export}{if it is yes or you give a filename here, it converts the ouxtput to the specific extension. For example, if you set export to "example.csv", it converts the output to "csv", if you set it to "example.xls" it converts to example.xls with the xlsx package. If it is not installed it gives back a warning message and converts it to csv.}
|
||||
\item{export}{If it is set to YES or you define a filename here, the function converts the output to the specific file format. For example, if you set export to "example.csv", it converts the output to "csv". If you set it to "example.xls" it converts the output to example.xls with the xlsx package. If the Excel converter package is not installed it gives back a warning message and converts the results to csv.}
|
||||
|
||||
\item{silent}{If you set it TRUE all off the modells output to the screen will be suppressed. It can be usefull, because it increases the model-speed.}
|
||||
\item{silent}{If you set the silent parameter to TRUE, all of the model's output normally written to the screen will be suppressed. This option can be useful to increase the speed of the model execution.}
|
||||
|
||||
\item{aggressive}{It deletes every possible modell-outputs from the previous modell runs.}
|
||||
\item{aggressive}{It deletes all previous model-outputs from previous model runs.}
|
||||
|
||||
\item{leapYear}{Should the function do a leapyear correction on the outputdata? If TRUE, then the 31.12 day will be doubled.}
|
||||
\item{leapYear}{Should the function do a leapyear correction on the output data? If TRUE, then the result for 31 December will be doubled in leap years which means that the results for the leap year will cover all 366 days. See the model's User's Guide for notes on leap years.}
|
||||
|
||||
\item{binaryPlace}{The place of the binary output files.}
|
||||
\item{binaryPlace}{The directory for the binary output files (see the keepBinary parameter).}
|
||||
|
||||
\item{fileToChange}{You can change any line of the epc or the ini file, you just have to specify with this variable which file you van a change. Two options possible: "epc", "ini"}
|
||||
\item{fileToChange}{You can change any line of the EPC or the INI file prior to model execution. All you need to do is to specify with this variable which file you want to change. Two options possible: "EPC" or "INI"}
|
||||
|
||||
\item{keepBinary}{In default RBBGCMuso to keep working area as clean as possible, deletes all the regular output files. The results are directly printed to the standard output, but you can redirect it, and save it to a variable, or you can export your results to the desired destination in a desired format. Whith this variable you can enable to keep the binary output files. If you want to set the location of the binary output, please take a look at the binaryPlace argument.}
|
||||
\item{keepBinary}{By default RBBGCMuso keeps the working environment as clean as possible, thus deletes all the regular output files. The results are directly written to the standard output (e.g. to the screen), but you can redirect it and save them to a variable. Alternatively, you can export your results to the desired destination in a desired format. Through the keepBinary parameter you can set RBBGCMuso to keep the binary output files. If you would like to set the location of the binary output, please take a look at the binaryPlace argument.}
|
||||
}
|
||||
\value{
|
||||
The simunation output matrix, where the columns are the choosen variables and each row is a day/month/year data.
|
||||
The simulation output matrix, where the columns are the chosen variables and each row is a daily/monthly/annual data.
|
||||
}
|
||||
\description{
|
||||
This function changes the epc file and after that runs the BBGC-MuSo model in normal phase and reads in its outputfile in a well-structured way.
|
||||
This function optionally changes the EPC file and runs the Biome-BGCMuSo model in normal phase and reads its output file in a well-structured way with debugging features. (Execution of spinup phase is possible with spinupMuso.) Prerequisite of normalMuso is the existence of the endpoint file (which is the result of the spinup phase and contains initial conditions for the simulation).
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/plotMuso.R
|
||||
\name{plotMuso}
|
||||
\alias{plotMuso}
|
||||
\title{plot the BBGCMuso output}
|
||||
\title{plot the Biome-BGCMuSo output}
|
||||
\usage{
|
||||
plotMuso(settings, variable,
|
||||
timee="d", silent=TRUE,
|
||||
@ -11,36 +11,36 @@ logfilename=NULL, aggressive=FALSE,
|
||||
leapYear=FALSE, export=FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{You have to run the setupMuso function before rungetMuso. It is its output which contains all of the necessary system variables. It sets the whole environment}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{variable}{column number of the variable which should be plottedor "all" if you have less than 10 variables. In this case it will plot everything in a matrix layout}
|
||||
\item{variable}{Column number of the output variable which should be plotted, or "all" if you have less than 10 variables. In this case the function will plot everything in a matrix layout.}
|
||||
|
||||
\item{timee}{The required timesteps in the modell output. It can be "d", if it is daily, "m", if it's monthly, "y", it it is yearly}
|
||||
\item{timee}{The required timesteps in the model output. It can be "d", if it is daily, "m", if it is monthly, "y" if it is yearly. It is recommended to use daily data, as the yearly and monthly data is not well-tested yet.}
|
||||
|
||||
\item{silent}{If you set it TRUE all off the modells output to the screen will be suppressed. It can be usefull, because it increases the model-speed.}
|
||||
\item{silent}{If you set the silent parameter to TRUE, all of the model's output normally written to the screen will be suppressed. This option can be useful to increase the speed of the model execution.}
|
||||
|
||||
\item{debugging}{If it is TRUE, it copies the log file to a Log directory to store it, if it is stamplog it contatenate a number before the logfile, which is one more than the maximum of the represented ones in the LOG directory. If it is true or stamplog it collects the "wrong" logfiles}
|
||||
\item{debugging}{If debugging is set to TRUE, after model execution the function copies the Biome-BGCMuSo log file into a LOG directory and stores it for further processing. If debugging is set to STAMPLOG instead of TRUE, it concatenates a number before the logfile, which is one plus the maximum of those present in the LOG directory. In each case the log files will be saved.}
|
||||
|
||||
\item{keepEpc}{If TRUE, it keeps the epc file and stamp it, after these copies it to the EPCS directory. If debugging True or false, it copies the wrong epc files to the wrong epc directory.}
|
||||
\item{keepEpc}{If keepEpc is set to TRUE, the function keeps the EPC file and stamps it, and then copies it to the EPCS directory. If debugging is set to TRUE, it copies the wrong EPC files to the wrong epc directory.}
|
||||
|
||||
\item{logfilename}{If you want to set a specific name for your logfiles you can set this via logfile parameter}
|
||||
\item{logfilename}{If you would like to set a specific name for your logfiles you can set this via the logfile parameter.}
|
||||
|
||||
\item{aggressive}{It deletes every possible modell-outputs from the previous modell runs.}
|
||||
\item{aggressive}{It deletes all previous model-outputs from previous model runs.}
|
||||
|
||||
\item{leapYear}{Should the function do a leapyear correction on the outputdata? If TRUE, then the 31.12 day will be doubled.}
|
||||
\item{leapYear}{Should the function do a leapyear correction on the output data? If TRUE, then the result for 31 December will be doubled in leap years which means that the results for the leap year will cover all 366 days. See the model's User's Guide for notes on leap years.}
|
||||
|
||||
\item{plotType}{There are two options now: continious time series("cts") or disctrete time series("dts")}
|
||||
\item{plotType}{There are two options implemented by now: continuous time series ("cts") or disctrete time series ("dts")}
|
||||
|
||||
\item{skipSpinup}{If TRUE, calibMuso wont do spinup simulation}
|
||||
\item{skipSpinup}{If TRUE, the function won't perform the spinup simulation. In this case the endpoint file must exist that provides initial conditions for the run.}
|
||||
|
||||
\item{export}{if it is yes or you give a filename here, it converts the output to the specific extension. For example, if you set export to "example.csv", it converts the output to "csv", if you set it to "example.xls" it converts to example.xls with the xlsx package. If it is not installed it gives back a warning message and converts it to csv.}
|
||||
\item{export}{If it is set to YES or you define a filename here, the function converts the output to the specific file format. For example, if you set export to "example.csv", it converts the output to "csv". If you set it to "example.xls" it converts the output to example.xls with the xlsx package. If the Excel converter package is not installed it gives back a warning message and converts the results to csv.}
|
||||
}
|
||||
\value{
|
||||
It depends on the export parameter. The function returns with a matrix with the modell output, or writes this in a file, which is given previously
|
||||
It depends on the export parameter. The function returns with a matrix with the model output, or writes this into a file, which is defined previously
|
||||
}
|
||||
\description{
|
||||
This function runs the BBGC-MuSo model and reads in its outputfile in a very structured way, and after that plot the results automaticly
|
||||
This function runs the Biome-BGCMuSo model and reads its output file in a well structured way, and after that it plots the results automatically. plotMuso is a convenient and quick method to create nice graphs from Biome-BGCMuSo output which is quite painful in other environments.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos, Dora Hidy
|
||||
Roland HOLLOS, Dora HIDY
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/plotMuso.R
|
||||
\name{plotMusoWithData}
|
||||
\alias{plotMusoWithData}
|
||||
\title{plot the BBGCMuso output with data}
|
||||
\title{plot the Biome-BGCMuSo model output with observation data}
|
||||
\usage{
|
||||
plotMuso(settings, variable,
|
||||
timee="d", silent=TRUE,
|
||||
@ -11,25 +11,25 @@ logfilename=NULL, aggressive=FALSE,
|
||||
leapYear=FALSE, export=FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{csvFile}{The file of the measurement. It must contain a header.}
|
||||
\item{csvFile}{This specifies the filename of the measurements. It must contain a header. Typically this is a CSV file.}
|
||||
|
||||
\item{variable}{The name of the output variable to plot}
|
||||
|
||||
\item{NACHAR}{This is not implemented yet}
|
||||
|
||||
\item{settings}{You have to run the setupMuso function before rungetMuso. It is its output which contains all of the necessary system variables. It sets the whole environment}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{sep}{This is the separator used in the measurement file}
|
||||
\item{sep}{This is the separator symbol used in the measurement file (that is supposed to be a delimited text file)}
|
||||
|
||||
\item{savePlot}{It it is specified, the plot will be saved in a format specified with the immanent extension}
|
||||
\item{savePlot}{It it is specified, the plot will be saved in a graphical format specified by the immanent extension. For example, it the savePlot is set to image01.png then a PNG graphics file will be created.}
|
||||
|
||||
\item{calibrationPar}{documentation in setupMuso()}
|
||||
\item{calibrationPar}{You might want to change some parameters in your EPC file before running the model. The function offers possibility for this without editing the EPC file. In this situation you have to select the appropirate model parameters first. You can refer to these parameters with the number of the line in the EPC file. Indexing of lines start from one. You should use a vector for this referencing like c(1,5,8)}
|
||||
|
||||
\item{parameters}{documentation in calibMuso()}
|
||||
\item{parameters}{Using the function it is possible to change some of the EPC parameters prior to model execution. This can be achieved with this option. In the parameters variable you have set the row indices of the variables that you wish to change. In this parameters you can give an exact value for them in a vector form like c(1,2,3,4).}
|
||||
}
|
||||
\description{
|
||||
This function runs the BBGC-MuSo model and reads in its outputfile in a very structured way, and after that plot the results automaticly along with a given measurement
|
||||
This function runs the Biome-BGCMuSo model and reads its output file in a well structured way, and after that it plots the results automatically along with a given measurement dataset provided by the user. plotMusoWithData is a convenient and quick method to create nice graphs from Biome-BGCMuSo output which is quite painful in other environments.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos, Dora Hidy
|
||||
Roland HOLLOS, Dora HIDY
|
||||
}
|
||||
|
||||
24
RBBGCMuso/man/randEpc.Rd
Normal file
24
RBBGCMuso/man/randEpc.Rd
Normal file
@ -0,0 +1,24 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/genEpc.R
|
||||
\name{randEpc}
|
||||
\alias{randEpc}
|
||||
\title{randEpc}
|
||||
\usage{
|
||||
randEpc(parameterFile = "parameters.csv", location = "./epcDir",
|
||||
sourceEpc = "maize.epc", iterations = 1000, constrains = NULL)
|
||||
}
|
||||
\arguments{
|
||||
\item{parameterFile}{parameters.csv file location}
|
||||
|
||||
\item{location}{output location directory}
|
||||
|
||||
\item{sourceEpc}{the original epc file-the template}
|
||||
|
||||
\item{iteration}{the number of iterations}
|
||||
}
|
||||
\description{
|
||||
randEpc is a random epc creator based on musoMonte
|
||||
}
|
||||
\author{
|
||||
Roland HOLLOS
|
||||
}
|
||||
@ -7,14 +7,14 @@
|
||||
readErrors(outputLoc, logfiles, type = "both")
|
||||
}
|
||||
\arguments{
|
||||
\item{outputLoc}{This is the location of the output files.}
|
||||
\item{outputLoc}{This is the location of the output file.}
|
||||
|
||||
\item{logfiles}{These are the names of the logfiles}
|
||||
\item{logfiles}{These are the names of the logfiles.}
|
||||
}
|
||||
\value{
|
||||
vector with 0 and 1 values, 1, if succed, 0 if not. The first is the spinup run, the second is the normal.
|
||||
}
|
||||
\description{
|
||||
This function reads the spinup and the normal logfiles and gives back the last line which indicates weather there are any errors.
|
||||
This function reads the spinup and the normal logfiles and gives back the last line which indicates weather there are any errors during the model execution or not.
|
||||
}
|
||||
\keyword{internal}
|
||||
|
||||
@ -8,42 +8,42 @@ calibMuso(settings,parameters=NULL, timee="d", debugging=FALSE, logfilename=NULL
|
||||
keepEpc=FALSE, export=FALSE, silent=FALSE, aggressive=FALSE, leapYear=FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{You have to run the setupMuso function before calibMuso. It is its output which contains all of the necessary system variables. It sets the whole running environment}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{parameters}{In the settings variable you have set the row indexes of the variables, you wish to change. In this parameter you can give an exact value for them in a vector like: c(1,2,3,4)}
|
||||
\item{parameters}{Using normalMuso it is possible to change some of the EPC parameters prior to model execution. This can be achieved with this option. In the parameters variable you have set the row indices of the variables that you wish to change. In this parameters you can give an exact value for them in a vector form like c(1,2,3,4).}
|
||||
|
||||
\item{timee}{The required timesteps in the modell output. It can be "d", if it is daily, "m", if it's monthly, "y", it it is yearly. I recommend to use daily data, the yearly and monthly data is not well-tested yet.}
|
||||
\item{timee}{The required timesteps in the model output. It can be "d", if it is daily, "m", if it is monthly, "y" if it is yearly. It is recommended to use daily data, as the yearly and monthly data is not well-tested yet.}
|
||||
|
||||
\item{debugging}{If it is TRUE, it copies the log file to a Log directory to store it, if it is stamplog it contatenate a number before the logfile, which is one more than the maximum of the represented ones in the LOG directory. If it is true or stamplog it collects the "wrong" logfiles}
|
||||
\item{debugging}{If debugging is set to TRUE, after model execution the function copies the Biome-BGCMuSo log file into a LOG directory to stores it for further processing. If debugging is set to STAMPLOG instead of TRUE, it concatenates a number before the logfile, which is one plus the maximum of those present in the LOG directory. In each case the log files will be saved.}
|
||||
|
||||
\item{logfilename}{If you want to set a specific name for your logfiles you can set this via logfile parameter}
|
||||
\item{logfilename}{If you would like to set a specific name for your logfiles you can set this via the logfile parameter.}
|
||||
|
||||
\item{keepEpc}{If TRUE, it keeps the epc file and stamp it, after these copies it to the EPCS directory. If debugging True or false, it copies the wrong epc files to the wrong epc directory.}
|
||||
\item{keepEpc}{If keepEpc is set to TRUE, the function keeps the EPC file and stamps it, and then copies it to the EPCS directory. If debugging is set to TRUE, it copies the wrong EPC files to the wrong epc directory.}
|
||||
|
||||
\item{export}{if it is yes or you give a filename here, it converts the ouxtput to the specific extension. For example, if you set export to "example.csv", it converts the output to "csv", if you set it to "example.xls" it converts to example.xls with the xlsx package. If it is not installed it gives back a warning message and converts it to csv.}
|
||||
\item{export}{If it is set to YES or you define a filename here, the function converts the output to the specific file format. For example, if you set export to "example.csv", it converts the output to "csv". If you set it to "example.xls" it converts the output to example.xls with the xlsx package. If the Excel converter package is not installed it gives back a warning message and converts the results to csv.}
|
||||
|
||||
\item{silent}{If you set it TRUE all off the modells output to the screen will be suppressed. It can be usefull, because it increases the model-speed.}
|
||||
\item{silent}{IIf you set the silent parameter to TRUE, all of the model's output normally written to the screen will be suppressed. This option can be useful to increase the speed of the model execution.}
|
||||
|
||||
\item{aggressive}{It deletes every possible modell-outputs from the previous modell runs.}
|
||||
\item{aggressive}{It deletes all previous model-outputs from previous model runs.}
|
||||
|
||||
\item{leapYear}{Should the function do a leapyear correction on the outputdata? If TRUE, then the 31.12 day will be doubled.}
|
||||
\item{leapYear}{Should the function do a leapyear correction on the output data? If TRUE, then the result for 31 December will be doubled in leap years which means that the results for the leap year will cover all 366 days. See the model's User's Guide for notes on leap years.}
|
||||
|
||||
\item{keepBinary}{In default RBBGCMuso to keep working area as clean as possible, deletes all the regular output files. The results are directly printed to the standard output, but you can redirect it, and save it to a variable, or you can export your results to the desired destination in a desired format. Whith this variable you can enable to keep the binary output files. If you want to set the location of the binary output, please take a look at the binaryPlace argument.}
|
||||
\item{keepBinary}{By default RBBGCMuso keeps the working environment as clean as possible, thus deletes all the regular output files. The results are directly written to the standard output (e.g. to the screen), but you can redirect it and save them to a variable. Alternatively, you can export your results to the desired destination in a desired format. Through the keepBinary parameter you can set RBBGCMuso to keep the binary output files. If you would like to set the location of the binary output, please take a look at the binaryPlace argument.}
|
||||
|
||||
\item{binaryPlace}{The place of the binary output files.}
|
||||
\item{binaryPlace}{The directory for the binary output files (see the keepBinary parameter).}
|
||||
|
||||
\item{fileToChange}{You can change any line of the epc or the ini file, you just have to specify with this variable which file you van a change. Two options possible: "epc", "ini"}
|
||||
\item{fileToChange}{You can change any line of the EPC or the INI file prior to model execution. All you need to do is to specify with this variable which file you want to change. Two options possible: "EPC" or "INI"}
|
||||
|
||||
\item{skipSpinup}{If TRUE, calibMuso wont do spinup simulation}
|
||||
\item{skipSpinup}{If this is set to TRUE, runMuso will not perform the spinup simulation. This is of course means that the endpoint file (initial conditions) must be available for the normal INI file. This option might be extremely useful to speed up multiple model execution. In cropland related simulations due to site history the EPC file used in the normal phase might differ from the one used in the spinup phase, which means that the spinup is the same even if we change the parameterization for the normal phase. In this situation skipSpinup is really useful.}
|
||||
|
||||
\item{prettyOut}{date ad Date type, separate year, month, day vectors}
|
||||
\item{prettyOut}{If this parameter is to TRUE then date will provided as the R-style Date type, and separate year, month and day vectors. In typical cases the user should use this option.}
|
||||
}
|
||||
\value{
|
||||
No return, outputs are written to file
|
||||
}
|
||||
\description{
|
||||
This function changes the epc file and after that runs the BBGC-MuSo model and reads in its outputfile in a well-structured way.
|
||||
This function runs the Biome-BGCMuSo model (with option to change the EPC file), then it reads its output file in a well-structured way. As the result is passed to R, the results can be easily post-processed in R environment.
|
||||
}
|
||||
\author{
|
||||
Roland Holl\'{o}s
|
||||
Roland HOLL\'{O}S
|
||||
}
|
||||
|
||||
@ -2,32 +2,32 @@
|
||||
% Please edit documentation in R/spinupMuso.R
|
||||
\name{spinupMuso}
|
||||
\alias{spinupMuso}
|
||||
\title{Run the BBGCMuso modell only in spinup phase, and debugging.}
|
||||
\title{Runs the Biome-BGCMuSo model in spinup phase (execution of normal phase is possible with normalMuso) with debugging features.}
|
||||
\usage{
|
||||
spinupMuso(settings, parameters=NULL, debugging=FALSE,
|
||||
logfilename=NULL, keepEpc=FALSE, silent=FALSE, aggressive=FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{settings}{You have to run the setupMuso function before spinupMuso. It is its output which contains all of the necessary system variables. It sets the whole running environment.}
|
||||
\item{settings}{RBBGCMuso uses variables that define the entire simulation environment. Those environment variables include the name of the INI files, the name of the meteorology files, the path to the model executable and its file name, the entire output list, the entire output variable matrix, the dependency rules for the EPC parameters etc. Using the runMuso function RBBGCMuso can automatically create those environment variables by inspecting the files in the working directory (this happens through the setupMuso function). It means that by default model setup is performed automatically in the background and the user has nothing to do. With this settings parameter we can force runMuso to skip automatic environment setup as we provide the environment settings to runMuso. In a typical situation the user can skip this option.}
|
||||
|
||||
\item{parameters}{In the settings variable you have set the row indexes of the variables, you wish to change. In this parameter you can give an exact value for them in a vector like: c(1,2,3,4)}
|
||||
\item{parameters}{|||| In the parameters variable you have set the row indices of the variables that you wish to change. In this parameter you can provide an exact value for them in a vector form like c(1,2,3,4)}
|
||||
|
||||
\item{debugging}{If it is TRUE, it copies the log file to a Log directory to store it, if it is stamplog it contatenate a number before the logfile, which is one more than the maximum of the represented ones in the LOG directory. If it is true or stamplog it collects the "wrong" logfiles}
|
||||
\item{debugging}{If debugging is set to TRUE, after model execution the function copies the Biome-BGCMuSo log file into a LOG directory to stores it for further processing. If debugging is set to STAMPLOG instead of TRUE, it concatenates a number before the logfile, which is one plus the maximum of those present in the LOG directory. In each case the log files will be saved.}
|
||||
|
||||
\item{logfilename}{If you want to set a specific name for your logfiles you can set this via logfile parameter}
|
||||
\item{logfilename}{If you would like to set a specific name for the logfiles you can set this via the logfilename parameter}
|
||||
|
||||
\item{keepEpc}{If TRUE, it keeps the epc file and stamp it, after these copies it to the EPCS directory. If debugging True or false, it copies the wrong epc files to the wrong epc directory.}
|
||||
\item{keepEpc}{If keepEpc is set to TRUE, the function keeps the EPC file and stamps it, and then copies it to the EPCS directory. If debugging is set to TRUE, it copies the wrong EPC files to the wrong epc directory.}
|
||||
|
||||
\item{silent}{If you set it TRUE all off the modells output to the screen will be suppressed. It can be usefull, because it increases the model-speed.}
|
||||
\item{silent}{If you set the silent parameter to TRUE, all of the model's output normally written to the screen will be suppressed. This option can be useful to increase the speed of the model execution.}
|
||||
|
||||
\item{aggressive}{It deletes every possible modell-outputs from the previous modell runs.}
|
||||
\item{aggressive}{It deletes all previous model-outputs from previous model runs.}
|
||||
}
|
||||
\value{
|
||||
No return, outputs are written to file
|
||||
}
|
||||
\description{
|
||||
This function runs the BBGC-MuSo model's in the spinup phase.
|
||||
This function runs the Biome-BGCMuSo model in spinup phase.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
@ -10,12 +10,12 @@ stampAndDir(outputLoc, names, stampDir, wrongDir, type = "output",
|
||||
\arguments{
|
||||
\item{outputLoc}{This is the location of the output files.}
|
||||
|
||||
\item{outputNames}{These are the prefixis of the logfiles}
|
||||
\item{outputNames}{These are the prefixes of the logfiles}
|
||||
}
|
||||
\value{
|
||||
Output files with their paths
|
||||
}
|
||||
\description{
|
||||
This function gives us the muso output files with their paths
|
||||
This function gives us the model output files with their paths
|
||||
}
|
||||
\keyword{internal}
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
updateMusoMapping(output_map_init="output_map_init.c")
|
||||
}
|
||||
\arguments{
|
||||
\item{output_map_init}{The outputcode-variable bindings is described in output_map_init.c file, via this parameter, you can give it the the function}
|
||||
\item{output_map_init}{The output code-variable bindings are described in output_map_init.c file that is part of the Biome-BGCMuSo source code. Using this function the user can read the output_map_init.c file and pass it to RBBGCMuso for further work.}
|
||||
}
|
||||
\value{
|
||||
The outputcode-variable matrix, and also change the global variable
|
||||
The output code-variable matrix, and also the function changes the global variable
|
||||
}
|
||||
\description{
|
||||
This function update the the muso outputcode-variable matrix
|
||||
This function updates the Biome-BGCMuSo output code-variable matrix. Within Biome-BGCMuSo the state variables and fluxes are marked by integer numbers. In order to provide meaningful variable names (e.g. 3009 means Gross Primary Production in Biome-BGCMuSo v5) a conversion table is needed which is handled by this function.
|
||||
}
|
||||
\author{
|
||||
Roland Hollos
|
||||
Roland HOLLOS
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user