Skip to content

Commit 80a8ac8

Browse files
Merge pull request #47 from biometry/develop
Develop
2 parents 0f3f253 + fdd13fe commit 80a8ac8

File tree

401 files changed

+1674
-29522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+1674
-29522
lines changed

rLPJGUESS/DESCRIPTION

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
Package: rLPJGUESS
22
Title: A R package that wraps the LPJ-GUESS 3.1 model
3-
Version: 1.1.0
3+
Version: 1.1.1
4+
Date: 2018-07-03
45
Authors@R: c(person("Florian", "Hartig", , "[email protected]", role = c("aut")),
56
person("Maurizio", "Bagnara", , "[email protected]", role = c("aut", "cre")),
67
person("Ramiro", "Silveyra Gonzalez", , "[email protected]", role = c("aut")))
7-
Description: The rLPJGUESS package provides functions to run LPJ-GUESS within R. It
8-
also allows to parallelize the model execution on personal laptops and on HPC.
8+
Description: The rLPJGUESS package provides functions to run LPJ-GUESS within
9+
R. It also allows to parallelize the model execution on personal laptops and on
10+
HPC clusters.
911
Depends:
1012
R (>= 3.1.0)
1113
Imports:
@@ -17,7 +19,7 @@ Suggests:
1719
rmarkdown (>= 1.3),
1820
testthat (>= 1.0.2),
1921
Rmpi (>= 0.6-5)
20-
License: file LICENSE
22+
License: GPL-3
2123
LazyData: true
2224
VignetteBuilder: knitr
23-
RoxygenNote: 6.0.1
25+
RoxygenNote: 5.0.1

rLPJGUESS/LICENSE

Lines changed: 0 additions & 7 deletions
This file was deleted.

rLPJGUESS/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
rLPJGUESS 1.1.1
3+
4+
- various smaller fixes
5+
- improved unit tests

rLPJGUESS/R/LPJDataClass.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#' }
1010
#' @keywords rLPJGUESS
1111
#' @export
12+
#' @example /inst/examples/LPJDataClassHelp.R
1213
#' @author Ramiro Silveyra Gonzalez
1314
setClass("LPJData",
1415
representation(

rLPJGUESS/R/LPJSetupClass.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#' }
1717
#' @keywords rLPJGUESS
1818
#' @export
19+
#' @example /inst/examples/LPJSetupClassHelp.R
1920
#' @author Ramiro Silveyra Gonzalez
2021
setClass("LPJSetup",
2122
representation(

rLPJGUESS/R/callLPJ.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
#' If not provided, package templates will be used
99
#' @param mode a character string indicating whether using cru or cf data
1010
#' @return none
11+
#' @details Please note that this function is integrated in \code{\link{runLPJ}}.
1112
#' @keywords rLPJGUESS
1213
#' @export
1314
#' @author Ramiro Silveyra Gonzalez, Maurizio Bagnara, Florian Hartig
1415
#' @note Based an older code of Istem Fer, Uni Potsdam
15-
#' @examples \dontrun{
16-
#' callLPJ("/home/LPJrun", "/home/LPJrun/runDirectory1", "global_cru.ins")
17-
#' }
16+
#' @example /inst/examples/callLPJHelp.R
1817
callLPJ <- function(mainDir, runDir , template2, mode){
1918
#----------------------------------------------------------------------------#
2019
# CHECK INPUTS AND EXIT IF ANY ERROR

rLPJGUESS/R/exitMPI.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
#' The function is a wrapper of mpi.finalize from the Rmpi package. Check the
1111
#' package manual for futher advise on using mpi.finalize and mpi.quit.
1212
#'
13-
#' @examples \dontrun{
14-
#' exitMPI()
15-
#' }
13+
#' @example /inst/examples/exitMPIHelp.R
1614
exitMPI <- function(){
1715
if (is.loaded("mpi_initialize")){
1816
if (Rmpi::mpi.comm.size(comm =1) > 1){

rLPJGUESS/R/getData.R

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' @title A function to process LPJ-GUESS outputs
22
#' @description This function reads the ASCII outputs produced by LPJ-GUESS.
33
#' It takes a list of output types (typeList) and finds them in the specified path.
4-
#' The data is stored in a data class object: LPJData. If processing is TRUE,
4+
#' The data is stored in a data class object: \linkS4class{LPJData}. If processing is TRUE,
55
#' the data will be stored as zoo time series. Ohterwise, as data frames.
66
#' @param x a character string indicating path to the output files
77
#' @param typeList a character vector with the outputs to be analyzed.
@@ -11,18 +11,17 @@
1111
#' the processed outputs of the model (optional)
1212
#' @param processing a boolean indicating whether output files will be turned
1313
#' into time series (default is FALSE)
14-
#' @return the processed data returned in a S4 Class: LPJData Class
14+
#' @return the processed data returned in a S4 Class: \linkS4class{LPJData} class
15+
#' @details Please note that this function is integrated in \code{\link{runLPJ}},
16+
#' which alread returns the data as a \linkS4class{LPJData} object.
1517
#' @seealso \linkS4class{LPJData}, \url{https://cran.r-project.org/web/packages/zoo/zoo.pdf}
1618
#' @author Ramiro Silveyra Gonzalez, Maurizio Bagnara, Florian Hartig
1719
#' @note Based on an older code of Joerg Steinkamp
1820
#' @details To convert the outputs into zoo time series is only supported when running the
19-
#' model for one grid cell. For running LPJ-GUESS for several grid cells, please set
21+
#' model for one grid cell. When running LPJ-GUESS for several grid cells, please set
2022
#' processing to FALSE.
2123
#' @export
22-
#' @examples \dontrun{
23-
#' LPJout <- getLPJData( typeList = c("aaet", "cflux","lai", "nflux"),
24-
#' "~/path/to/output/files", runInfo = list(parameter1 = 0.5, grid = 1))
25-
#' }
24+
#' @example /inst/examples/getDataHelp.R
2625
getLPJData <- function(x, typeList = NULL, runInfo=NULL, processing = FALSE){
2726
#, fun = NULL){
2827
# other options which could be included:

rLPJGUESS/R/getDesign.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
#' @return a list or a matrix with design parameter names and their values
77
#' @export
88
#' @author Ramiro Silveyra Gonzalez, Maurizio Bagnara
9-
#' @examples \dontrun{
10-
#' parameterList <- getParameterList("global")
11-
#' }
9+
#' @example /inst/examples/getDesignHelp.R
1210
getDesign <- function(scale, list = F){
1311
if ( is.null(scale) || scale != "global" & scale != "europe"){
1412
stop("Please provide a valid scale: global or europe")

rLPJGUESS/R/getParameterList.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
#' as a list, otherwise as a matrix.
77
#' @return a list or a matrix with parameter names and their values
88
#' @export
9+
#' @details To obtain the parameters used in previous runs, see \code{\link{getRunInfo}}.
10+
#' @seealso \code{\link{runLPJ}}, \code{\link{getRunInfo}}
911
#' @author Ramiro Silveyra Gonzalez, Maurizio Bagnara
10-
#' @examples \dontrun{
11-
#' parameterList <- getParameterList("global")
12-
#' }
12+
#' @example /inst/examples/getParameterListHelp.R
1313
getParameterList <- function(scale, list = TRUE){
1414
if ( is.null(scale) || scale != "global" & scale != "europe"){
1515
stop("Please provide a valid scale: global or europe")

0 commit comments

Comments
 (0)