From 4ff3d793df0b8a0733d6867b810a7f7e4603eb92 Mon Sep 17 00:00:00 2001 From: hollorol Date: Thu, 26 Apr 2018 12:27:03 +0200 Subject: [PATCH] musoSensi documentation --- Documents/musoSensi_usage_v3.rmd | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documents/musoSensi_usage_v3.rmd diff --git a/Documents/musoSensi_usage_v3.rmd b/Documents/musoSensi_usage_v3.rmd new file mode 100644 index 0000000..71c0163 --- /dev/null +++ b/Documents/musoSensi_usage_v3.rmd @@ -0,0 +1,62 @@ +--- +title: Preparation to use sensitivity analysis of Biome-BGCMuSo using the RBBGCMuSo + package +author: "Roland HOLLOS, Dora HIDY, Zoltan BARCZA" +date: "April 26, 2018" +output: html_document +--- + + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` +## Installation of requirements + +Before start using the RBBGCMuso package, you have to install it on your computer under the R environment. Note that the latest R package is suitable, and we also suggest to use the latest RStudio software. + +In this stage of development, you have to have Rtools and devtools installed. In the future, this package will be available throught CRAN, which is the official repository of R. + +In order to install Rtools, please visit this link: https://cran.r-project.org/bin/windows/Rtools/ then download the installation file and install it. + +The installation of package devtools is much easier: + + +```{r devtools_installation, eval=FALSE} +install.packages("devtools") +``` + +## Installation of RBBGCMuso +After you get devtools and Rtools, we propose to install the most recent RBBGCMuso package, and load it using the following commands in R: + +```{r install_RBBGCMuso,eval=FALSE} +devtools::install_github("hollorol/RBBGCMuso/RBBGCMuso") +library(RBBGCMuso) +``` + +## Preparations + + Before starting the sensitivity analysis you have to specify the parameters you are interested in. This list has to be stored in an external file. You should give the name, the index (in other words, the line number of the EPC file), and the range with minimum and maximum values of the parameter. You should strictly use the following format (the contents of the rows are just examples): + +| NAME | INDEX | MIN | MAX | +|-------|-------|-----|-----| +| LRTF | 34 | 0 | 1 | +| WTF | 35 | 0 | 1 | +| WPM | 36 | 0 | 1 | +| FM | 37 | 0 | 1 | +| CN_lv | 38 | 0 | 200 | +| CN_li | 39 | 0 | 200 | +| CN_ro | 40 | 0 | 200 | +| CN_fr | 41 | 0 | 200 | +| CN_ss | 42 | 0 | 200 | + + The header names are: NAME, INDEX, MIN, MAX (all uppercase). Note that NAME can be anything that might help you to identify the parameter. I suggest to use the csv format for these parameter tables, and I also strongly recommend to use comma as separator of the content, and not semicolon. + +After you have saved the parameter table to a file (in this example we store the content of the above table in a file called "parameters.csv"), you have to read it into a suitable variable within R with the command: parameters <- read.csv("/path/to/your/parameters.csv") + +In our example it is: + +```{r,eval=FALSE} +parameters <- read.csv("parameters.csv") +``` + + \ No newline at end of file