diff --git a/RBBGCMuso/DESCRIPTION b/RBBGCMuso/DESCRIPTION index 9931869..42afaec 100644 --- a/RBBGCMuso/DESCRIPTION +++ b/RBBGCMuso/DESCRIPTION @@ -7,7 +7,7 @@ Depends: R (>= 3.3.2) License: GPL-2 LazyData: true NeedsCompilation: no -Packaged: Wed 13 Nov 2019 02:41:52 PM CET hollorol +Packaged: Wed 13 Nov 2019 02:41:52 PM CET hollorol Author: Roland Hollo's [aut, cre] Imports: grDevices, @@ -28,7 +28,7 @@ Imports: LinkingTo: Rcpp SystemRequirements: C++11 Maintainer: Roland Hollo's -RoxygenNote: 6.1.1 +RoxygenNote: 7.0.0 Suggests: knitr, rmarkdown, VignetteBuilder: knitr diff --git a/RBBGCMuso/NAMESPACE b/RBBGCMuso/NAMESPACE index a11b3e9..b8ab8b6 100644 --- a/RBBGCMuso/NAMESPACE +++ b/RBBGCMuso/NAMESPACE @@ -22,6 +22,7 @@ export(paramSweep) export(plotMuso) export(plotMusoWithData) export(randEpc) +export(readObservedData) export(runMuso) export(rungetMuso) export(saveAllMusoPlots) @@ -32,6 +33,8 @@ export(updateMusoMapping) import(ggplot2) import(utils) importFrom(Rcpp,evalCpp) +importFrom(data.table,data.table) +importFrom(data.table,fread) importFrom(digest,digest) importFrom(dplyr,'%>%') importFrom(dplyr,filter) diff --git a/RBBGCMuso/man/changemulline.Rd b/RBBGCMuso/man/changemulline.Rd index 7acf438..e7ec966 100644 --- a/RBBGCMuso/man/changemulline.Rd +++ b/RBBGCMuso/man/changemulline.Rd @@ -4,8 +4,14 @@ \alias{changemulline} \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) +changemulline( + filePaths, + calibrationPar, + contents, + fileOut, + fileToChange, + modifyOriginal = FALSE +) } \description{ The function uses the previous changspecline function to operate. diff --git a/RBBGCMuso/man/compareMuso.Rd b/RBBGCMuso/man/compareMuso.Rd index 4890945..b4c6380 100644 --- a/RBBGCMuso/man/compareMuso.Rd +++ b/RBBGCMuso/man/compareMuso.Rd @@ -4,9 +4,15 @@ \alias{compareMuso} \title{compareMuso} \usage{ -compareMuso(settings = NULL, parameters, variable = 1, - calibrationPar = NULL, fileToChange = "epc", skipSpinup = TRUE, - timeFrame = "day") +compareMuso( + settings = NULL, + parameters, + variable = 1, + calibrationPar = NULL, + fileToChange = "epc", + skipSpinup = TRUE, + timeFrame = "day" +) } \arguments{ \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.} diff --git a/RBBGCMuso/man/musoDate.Rd b/RBBGCMuso/man/musoDate.Rd index 011a92a..e01765c 100644 --- a/RBBGCMuso/man/musoDate.Rd +++ b/RBBGCMuso/man/musoDate.Rd @@ -4,8 +4,14 @@ \alias{musoDate} \title{It generates BiomeBGC-MuSo dates} \usage{ -musoDate(startYear, numYears, timestep = "d", combined = TRUE, - corrigated = TRUE, format = "en") +musoDate( + startYear, + numYears, + timestep = "d", + combined = TRUE, + corrigated = TRUE, + format = "en" +) } \arguments{ \item{timestep}{timestep, which can be daily ("d"), monthly ("m"), yearly("y")} diff --git a/RBBGCMuso/man/musoMonte.Rd b/RBBGCMuso/man/musoMonte.Rd index e7b37cf..6931dc1 100644 --- a/RBBGCMuso/man/musoMonte.Rd +++ b/RBBGCMuso/man/musoMonte.Rd @@ -4,11 +4,24 @@ \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, ...) +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, + ... +) } \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.} diff --git a/RBBGCMuso/man/musoQuickEffect.Rd b/RBBGCMuso/man/musoQuickEffect.Rd index 1676a4e..a6a7bef 100644 --- a/RBBGCMuso/man/musoQuickEffect.Rd +++ b/RBBGCMuso/man/musoQuickEffect.Rd @@ -4,9 +4,16 @@ \alias{musoQuickEffect} \title{musoQuickEffect} \usage{ -musoQuickEffect(settings = NULL, calibrationPar = NULL, startVal, - endVal, nSteps = 1, fileToChange = "epc", outVar, - parName = "parVal") +musoQuickEffect( + settings = NULL, + calibrationPar = NULL, + startVal, + endVal, + nSteps = 1, + fileToChange = "epc", + outVar, + parName = "parVal" +) } \arguments{ \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.} diff --git a/RBBGCMuso/man/musoRand.Rd b/RBBGCMuso/man/musoRand.Rd index ebb2d78..d512ce1 100644 --- a/RBBGCMuso/man/musoRand.Rd +++ b/RBBGCMuso/man/musoRand.Rd @@ -4,7 +4,7 @@ \alias{musoRand} \title{musoRand} \usage{ -musoRand(parameters, constrains = NULL, iterations = 3000) +musoRand(parameters, iterations = 3000, fileType = "epc", constrains = NULL) } \arguments{ \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.} diff --git a/RBBGCMuso/man/musoSensi.Rd b/RBBGCMuso/man/musoSensi.Rd index 4086151..01eba32 100644 --- a/RBBGCMuso/man/musoSensi.Rd +++ b/RBBGCMuso/man/musoSensi.Rd @@ -4,12 +4,24 @@ \alias{musoSensi} \title{musoSensi} \usage{ -musoSensi(monteCarloFile = NULL, parameters = NULL, settings = NULL, - inputDir = "./", outLoc = "./calib", outVars = NULL, - iterations = 30, preTag = "mont-", outputType = "moreCsv", - fun = mean, varIndex = 1, outputFile = "sensitivity.csv", - plotName = "sensitivity.png", plotTitle = "Sensitivity", - skipSpinup = TRUE, dpi = 300) +musoSensi( + monteCarloFile = NULL, + parameters = NULL, + settings = NULL, + inputDir = "./", + outLoc = "./calib", + outVars = NULL, + iterations = 30, + preTag = "mont-", + outputType = "moreCsv", + fun = mean, + varIndex = 1, + outputFile = "sensitivity.csv", + plotName = "sensitivity.png", + plotTitle = "Sensitivity", + skipSpinup = TRUE, + dpi = 300 +) } \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 epc-fie, the last two column consist the endpont of the parameter-ranges, where the parameters will be randomized.} diff --git a/RBBGCMuso/man/paramSweep.Rd b/RBBGCMuso/man/paramSweep.Rd index 39d435a..8933dce 100644 --- a/RBBGCMuso/man/paramSweep.Rd +++ b/RBBGCMuso/man/paramSweep.Rd @@ -4,9 +4,14 @@ \alias{paramSweep} \title{paramSweep} \usage{ -paramSweep(inputDir = "./", parameters = NULL, outputDir = NULL, - iterations = 10, outVar = "daily_gpp", - htmlOutName = "paramsweep.html") +paramSweep( + inputDir = "./", + parameters = NULL, + outputDir = NULL, + iterations = 10, + outVar = "daily_gpp", + htmlOutName = "paramsweep.html" +) } \arguments{ \item{inputDir}{The directory which contains the MuSo model's ini files} diff --git a/RBBGCMuso/man/randEpc.Rd b/RBBGCMuso/man/randEpc.Rd index 6087be7..4a83540 100644 --- a/RBBGCMuso/man/randEpc.Rd +++ b/RBBGCMuso/man/randEpc.Rd @@ -4,8 +4,13 @@ \alias{randEpc} \title{randEpc} \usage{ -randEpc(parameterFile = "parameters.csv", location = "./epcDir", - sourceEpc = "maize.epc", iterations = 1000, constrains = NULL) +randEpc( + parameterFile = "parameters.csv", + location = "./epcDir", + sourceEpc = "maize.epc", + iterations = 1000, + constrains = NULL +) } \arguments{ \item{parameterFile}{parameters.csv file location} diff --git a/RBBGCMuso/man/saveAllMusoPlots.Rd b/RBBGCMuso/man/saveAllMusoPlots.Rd index 79b184b..ec4c9d8 100644 --- a/RBBGCMuso/man/saveAllMusoPlots.Rd +++ b/RBBGCMuso/man/saveAllMusoPlots.Rd @@ -4,9 +4,15 @@ \alias{saveAllMusoPlots} \title{saveAllMusoPlots} \usage{ -saveAllMusoPlots(settings = NULL, plotName = ".png", silent = TRUE, - type = "line", outFile = "annual.csv", colour = NULL, - skipSpinup = FALSE) +saveAllMusoPlots( + settings = NULL, + plotName = ".png", + silent = TRUE, + type = "line", + outFile = "annual.csv", + colour = NULL, + skipSpinup = FALSE +) } \arguments{ \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.} diff --git a/RBBGCMuso/man/stampAndDir.Rd b/RBBGCMuso/man/stampAndDir.Rd index c1d2843..c30516e 100644 --- a/RBBGCMuso/man/stampAndDir.Rd +++ b/RBBGCMuso/man/stampAndDir.Rd @@ -4,8 +4,15 @@ \alias{stampAndDir} \title{stampAndCopy} \usage{ -stampAndDir(outputLoc, names, stampDir, wrongDir, type = "output", - errorsign, logfiles) +stampAndDir( + outputLoc, + names, + stampDir, + wrongDir, + type = "output", + errorsign, + logfiles +) } \arguments{ \item{outputLoc}{This is the location of the output files.}