Skip to content

Commit

Permalink
Merge pull request #121 from Burke-Lauenroth-Lab/expose_calc_of_evapc…
Browse files Browse the repository at this point in the history
…oeff

Expose and fix calculation of evapcoeff as funtion

- pull request/commit passes all CI builds by travis and appveyor

- pull request passes all test projects (except 6 which is currently not set up)
>       elapsed_s has_run has_problems made_new_refs deleted_output
> Test1  1191.355    TRUE         TRUE         FALSE          FALSE
> Test2   942.577    TRUE        FALSE         FALSE          FALSE
> Test3   174.627    TRUE        FALSE         FALSE          FALSE
> Test4    42.126    TRUE        FALSE         FALSE          FALSE
> Test5    46.085    TRUE        FALSE         FALSE          FALSE
> Test6     0.000   FALSE         TRUE         FALSE          FALSE
> Test7   305.494    TRUE        FALSE         FALSE          FALSE
> Test8   248.107    TRUE        FALSE         FALSE          FALSE
>                                                     referenceDB
> Test1        dbTables_Test1_downscaling_overhaul_v2.1.1.sqlite3
> Test2        dbTables_Test2_LookupWeatherFolders_v2.1.1.sqlite3
> Test3         dbTables_Test3_OnlyMeanDailyOutput_v2.1.1.sqlite3
> Test4 dbTables_Test4_AllOverallAggregations_snow_v2.1.1.sqlite3
> Test5  dbTables_Test5_AllOverallAggregations_mpi_v2.1.1.sqlite3
> Test6                                                          
> Test7           dbTables_Test7_livneh_extraction_v2.1.1.sqlite3
> Test8          dbTables_Test8_ExperimentalDesign_v2.1.1.sqlite3

- pull request passes all unit tests when run locally with devtools::test()
> Testing rSFSW2
> dbOutput: action: check: .............
> dbWork: runIDs organization: 
> Delta-hybrid (mod3) downscaling: add_delta_to_PPT: ..............
> Delta-hybrid (mod3) downscaling: applyPPTdelta_simple and applyPPTdelta_detailed: .........................
> Delta-hybrid (mod3) downscaling: fix_PPTdata_length: ...........
> GISSM: germination_wait_times: .............
> GISSM: get_KilledBySoilLayers: ...................
> GISSM: setFALSE_SeedlingSurvival_1stSeason: .........
> Indices: .........................................................................................................
> Input/Output of rSFSW2 datafiles: ...........
> lints: S
> Match for appending data: ....
> Pedotransfer functions: SWP <-> VWC: ...................................................................................................................................................
> Soil functions: ..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
> Manipulate soil layers: .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
> 
> Skipped -------------------------------------------------
> 1. Package Style (@test_lint.R#4) - rSFSW2 is not ready for 'lint' testing...
> 
> DONE ====================================================
  • Loading branch information
dschlaep authored Jul 23, 2017
2 parents 85cd7b5 + 86feb1b commit b0ee32c
Show file tree
Hide file tree
Showing 36 changed files with 588 additions and 337 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
env:
- _R_CHECK_FORCE_SUGGESTS_=false # because of Rmpi, ncdf4, hydromat, and weathergen
sudo: false
cache: packages
warnings_are_errors: false # this is only needed for rSOILWAT2
cache:
- packages
warnings_are_errors: false # turn this back on for more severe testing

before_install:
# install dependencies of rSOILWAT2 (because rSOILWAT2 is installed 'before install' and
# thus dependencies are not installed and r_packages has not taken effect yet)
- Rscript -e 'utils::install.packages(c("blob", "DBI", "RSQLite"))'
# obtain source code of rSOILWAT2 from github
- git clone -b master --single-branch --recursive https://github.com/Burke-Lauenroth-Lab/rSOILWAT2.git /tmp/rSOILWAT2
- cd /tmp/rSOILWAT2
- ./tools/TarAndInstall_31n.sh
# install rSOILWAT2
- R CMD INSTALL /tmp/rSOILWAT2

after_success:
- Rscript -e 'covr::codecov()'
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rSFSW2
Title: Simulation Framework for SOILWAT2
Version: 2.2.0
Date: 2017-07-20
Version: 2.3.0
Date: 2017-07-23
Authors@R: c(person("Daniel", "Schlaepfer", email = "daniel.schlaepfer@yale.edu", role = c("aut", "cre")),
person("Caitlin", "Andrews", role = "ctb"),
person("Zach", "Kramer", role = "ctb"),
Expand All @@ -14,7 +14,7 @@ Imports:
rSOILWAT2 (>= 1.3.4),
RSQLite (>= 1.1),
DBI (>= 0.5),
Rcpp (>= 0.12.7),
Rcpp (>= 0.12.12),
raster (>= 2.5.8),
sp (>= 1.2.3),
methods
Expand Down
5 changes: 3 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export(TranspCoeffByVegType)
export(VWCtoSWP)
export(align_with_target_grid)
export(align_with_target_res)
export(calc_CalculateBareSoilEvaporationCoefficientsFromSoilTexture)
export(calc_BareSoilEvaporationCoefficientsFromSoilTexture)
export(calc_ExtendSoilDatafileToRequestedSoilLayers)
export(calc_SiteClimate)
export(check_lock_content)
Expand All @@ -40,6 +40,7 @@ export(dbOutput_ListDesignTables)
export(dbOutput_ListOutputTables)
export(dbOutput_Tables_have_SoilLayers)
export(dbW_has_missingClimScens)
export(dbW_missingAmbient_siteIDs)
export(dbWork_check)
export(dbWork_redo)
export(dbWork_timing)
Expand Down Expand Up @@ -136,4 +137,4 @@ importFrom(methods,setGeneric)
importFrom(methods,setMethod)
importFrom(methods,signature)
importFrom(methods,slot)
useDynLib(rSFSW2, .registration = TRUE, .fixes = "C_")
useDynLib(rSFSW2, .registration = TRUE)
7 changes: 4 additions & 3 deletions R/ExtractData_ClimateDownscaling.R
Original file line number Diff line number Diff line change
Expand Up @@ -2938,9 +2938,10 @@ PrepareClimateScenarios <- function(SFSW2_prj_meta, SFSW2_prj_inputs, opt_parall
SFSW2_prj_meta[["sim_scens"]][["sources"]])

if (resume) {
todos <- dbW_has_missingClimScens(fdbWeather = SFSW2_prj_meta[["fnames_in"]][["fdbWeather"]],
SFSW2_prj_inputs, req_scenN = SFSW2_prj_meta[["sim_scens"]][["N"]], opt_verbosity,
opt_chunks)
todos <- dbW_has_missingClimScens(
fdbWeather = SFSW2_prj_meta[["fnames_in"]][["fdbWeather"]], SFSW2_prj_inputs,
runIDs_sites = SFSW2_prj_meta[["sim_size"]][["runIDs_sites"]],
req_scenN = SFSW2_prj_meta[["sim_scens"]][["N"]], opt_verbosity, opt_chunks)

} else {
todos <- SFSW2_prj_inputs[["include_YN"]] &
Expand Down
4 changes: 2 additions & 2 deletions R/ExtractData_Soils.R
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ ISRICWISE_try_weightedMeanForSimulationCell <- function(i, sim_cells_SUIDs,
#' modelling (WISE30sec) with estimates of global soil carbon stocks. Geoderma 269,
#' 61-68 (http://dx.doi.org/10.1016/j.geoderma.2016.01.034).
#' @references Batjes N.H. 2015. World soil property estimates for broad-scale modelling
#' (WISE30sec, ver. 1.0). Report 2015/01, ISRICWorld Soil Information, Wageningen
#' (WISE30sec, ver. 1.0). Report 2015/01, ISRIC-World Soil Information, Wageningen
#' [available at ISRIC Soil Data Hub](http://geonode.isric.org/search/?title__icontains=World%20soil%20property%20estimates%20for%20broad-scale%20modelling%20(WISE30sec)&limit=100&offset=0),
#' with addendum and corrigendum.
#'
Expand Down Expand Up @@ -625,7 +625,7 @@ do_ExtractSoilDataFromISRICWISE_Global <- function(MMC, sim_size, sim_space,
res = cell_res_wise, grid = grid_wise, sp_sites = run_sites_wise,
att = rat_att)
}

sim_cells_SUIDs <- do.call(rbind, sim_cells_SUIDs)
}

Expand Down
18 changes: 17 additions & 1 deletion R/Miscellaneous_Functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,23 @@ tabulate_values_in_bins <- function(x, method = c("duration", "values"),
list(eventsPerYear = eventsPerYear, freq.summary = freq.summary)
}


#' NAs present but only in deepest soil layers
#'
#' Checks that NAs are present and that NAs occur only grouped together
#' in the right-most columns per row (e.g., deepest soil layers if columns represent
#' soil layers and rows represent sites).
#'
#' @param x A data.frame, matrix, or array with at least two dimensions.
#'
#' @return A logical vector of length equal to the first dimension of \code{x} with
#' \code{TRUE} if there are n[k] \code{NA}s in the k-th row and they occupy the k
#' rightmost columns.
#'
has_NAs_pooled_at_depth <- function(x) {
stopifnot(!is.null(dim(x)))
temp <- apply(x, 1, function(dat) rle(is.na(dat)))
sapply(temp, function(dat) length(dat$values) <= 2 && dat$values[length(dat$values)])
}


benchmark_BLAS <- function(platform, seed = NA) {
Expand Down
150 changes: 110 additions & 40 deletions R/PriorCalculations.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ calc_ExtendSoilDatafileToRequestedSoilLayers <- function(SFSW2_prj_meta, SFSW2_p
}


#' Calculate potential bare soil evaporation coefficients per soil layer
#' Calculate potential bare-soil evaporation coefficients
#'
#' Soil texture influence based on re-analysis of data from Wythers et al. 1999.
#' Default of depth_max_bs_evap = 15 cm from Torres et al. 2010.
#' Default of \code{depth_max_bs_evap} = 15 cm from Torres et al. 2010.
#'
#' @references Torres EA, Calera A (2010) Bare soil evaporation under high evaporation
#' demand: a proposed modification to the FAO-56 model. Hydrological Sciences Journal-
Expand All @@ -123,8 +123,111 @@ calc_ExtendSoilDatafileToRequestedSoilLayers <- function(SFSW2_prj_meta, SFSW2_p
#' @references Wythers KR, Lauenroth WK, Paruelo JM (1999) Bare-Soil Evaporation Under
#' Semiarid Field Conditions. Soil Science Society of America Journal, 63, 1341-1349.
#'
#' @param layers_depth A numeric vector, matrix, or data.frame. Values describe the lower
#' soil layer depths in units of centimeters.
#' @param sand A numeric vector, matrix, or data.frame. Values are sand contents in units
#' of mass-percentage / 100.
#' @param clay A numeric vector, matrix, or data.frame. Values are clay contents in units
#' of mass-percentage / 100.
#' @param depth_max_bs_evap_cm A numeric value. The maximal soil depth in centimeters from
#' which bare-soil evaporation is potentially drawing moisture.
#'
#' @section Notes: Rows of soil input arguments \code{layers_depth}, \code{sand}, and
#' \code{clay} correspond to sites and columns to soil layers. If \code{sand} and/or
#' \code{clay} are vectors, then they are converted to 1-row matrices.
#' If \code{layers_depth} is a vector, then it is converted to a matrix with as many
#' sites/rows as \code{sand} and \code{clay} have. That is the code assumes identical
#' soil layer depths for each site. All soil input arguments must have a the same number
#' of sites and of soil layers, i.e., identical matrix dimensions.
#'
#' @return A numeric matrix with potential bare-soil evaporation coefficients where rows
#' correspond to sites and columns to soil layers.
#'
#' @export
calc_CalculateBareSoilEvaporationCoefficientsFromSoilTexture <- function(SFSW2_prj_meta,
calc_BareSoilEvaporationCoefficientsFromSoilTexture <- function(layers_depth, sand, clay,
depth_max_bs_evap_cm = 15) {

#--- If inputs are not site x layers, then convert them into 1 site x layers table
if (is.null(dim(sand))) {
sand <- matrix(sand, nrow = 1, ncol = length(sand))
}
if (is.null(dim(clay))) {
clay <- matrix(clay, nrow = 1, ncol = length(clay))
}
if (is.null(dim(layers_depth))) {
layers_depth <- matrix(layers_depth, nrow = dim(sand)[1], ncol = length(layers_depth),
byrow = TRUE)
}

#--- Test inputs
# - sand and clay have identical number of sites and layers
# - all soil inputs have identical number of sites and at least as many layers as depths
# - soil layer depths are numeric and positive -- or NA, if all deeper layers are NA
# - sand and clay are numeric and values between 0 and 1 -- or NA, if all deeper
# layers are NA as well
# - the sum of sand and clay is less or equal to 1
sand_and_clay <- sand + clay
stopifnot(
identical(dim(sand), dim(clay)),
identical(dim(sand)[1], dim(layers_depth)[1]), dim(sand)[2] >= dim(layers_depth)[2],
is.numeric(layers_depth), layers_depth > 0 | has_NAs_pooled_at_depth(layers_depth),
is.numeric(unlist(sand)), sand >= 0 & sand <= 1 | has_NAs_pooled_at_depth(sand),
is.numeric(unlist(clay)), clay >= 0 & clay <= 1 | has_NAs_pooled_at_depth(clay),
sand_and_clay <= 1 | has_NAs_pooled_at_depth(sand_and_clay),
is.finite(depth_max_bs_evap_cm) & depth_max_bs_evap_cm >= 0)


#--- Calculate

depth_min_bs_evap <- min(layers_depth[, 1], na.rm = TRUE)
if (depth_min_bs_evap > depth_max_bs_evap_cm) {
# all sites have first layer with coeff = 1
res <- array(1, dim = dim(sand))
res[, -1] <- 0
return(res)
}

lyrs_max_bs_evap <- t(apply(layers_depth, 1, function(x) {
xdm <- depth_max_bs_evap_cm - x
i0 <- abs(xdm) < SFSW2_glovars[["tol"]]
ld <- if (any(i0, na.rm = TRUE)) {
which(i0)
} else {
temp <- which(xdm < 0)
if (length(temp) > 0) temp[1] else length(x)
}
c(diff(c(0, x))[seq_len(ld)], rep(0L, length(x) - ld))
}))
ldepth_max_bs_evap <- rowSums(lyrs_max_bs_evap)

sand_mean <- rowSums(lyrs_max_bs_evap * sand, na.rm = TRUE) / ldepth_max_bs_evap
clay_mean <- rowSums(lyrs_max_bs_evap * clay, na.rm = TRUE) / ldepth_max_bs_evap

temp_depth <- 4.1984 + 0.6695 * sand_mean ^ 2 + 168.7603 * clay_mean ^ 2 # equation from re-analysis
depth_bs_evap <- pmin(pmax(temp_depth, depth_min_bs_evap, na.rm = TRUE),
depth_max_bs_evap_cm, na.rm = TRUE)
lyrs_bs_evap0 <- t(apply(depth_bs_evap - layers_depth, 1, function(x) {
i0 <- abs(x) < SFSW2_glovars[["tol"]]
ld <- if (any(i0, na.rm = TRUE)) {
which(i0)
} else {
temp <- which(x < 0)
if (length(temp) > 0) temp[1] else sum(!is.na(x))
}
ld0 <- max(0, ld - 1)

c(rep(TRUE, ld0), rep(FALSE, length(x) - ld0))
}))

# function made up to match previous cummulative distributions
temp_coeff <- 1 - exp(- 5 * layers_depth / depth_bs_evap)
temp_coeff[!lyrs_bs_evap0 | is.na(temp_coeff)] <- 1
coeff_bs_evap <- round(t(apply(cbind(0, temp_coeff), 1, diff)), 4)
coeff_bs_evap / rowSums(coeff_bs_evap, na.rm = TRUE)
}


get_BareSoilEvaporationCoefficientsForSoilInputFile <- function(SFSW2_prj_meta,
SFSW2_prj_inputs, runIDs_adjust, resume = TRUE, verbose = FALSE) {

if (verbose) {
Expand Down Expand Up @@ -158,47 +261,14 @@ calc_CalculateBareSoilEvaporationCoefficientsFromSoilTexture <- function(SFSW2_p
temp <- SFSW2_prj_inputs[["sw_input_soillayers"]][runIDs_adjust, grep("depth_L",
names(SFSW2_prj_inputs[["sw_input_soillayers"]]))[use_layers], drop = FALSE]
layers_depth <- as.matrix(temp)
depth_min_bs_evap <- min(layers_depth[, 1])
stopifnot(stats::na.exclude(depth_min_bs_evap < SFSW2_prj_meta[["opt_sim"]][["depth_max_bs_evap_cm"]]))

lyrs_max_bs_evap <- t(apply(layers_depth, 1, function(x) {
xdm <- SFSW2_prj_meta[["opt_sim"]][["depth_max_bs_evap_cm"]] - x
i0 <- abs(xdm) < SFSW2_glovars[["tol"]]
ld <- if (any(i0, na.rm = TRUE)) {
which(i0)
} else {
temp <- which(xdm < 0)
if (length(temp) > 0) temp[1] else length(x)
}
c(diff(c(0, x))[seq_len(ld)], rep(0L, length(x) - ld))
}))
ldepth_max_bs_evap <- rowSums(lyrs_max_bs_evap)

#TODO: add influence of gravel
sand <- SFSW2_prj_inputs[["sw_input_soils"]][runIDs_adjust, icol_sand, drop = FALSE]
clay <- SFSW2_prj_inputs[["sw_input_soils"]][runIDs_adjust, icol_clay, drop = FALSE]
sand_mean <- rowSums(lyrs_max_bs_evap * sand, na.rm = TRUE) / ldepth_max_bs_evap
clay_mean <- rowSums(lyrs_max_bs_evap * clay, na.rm = TRUE) / ldepth_max_bs_evap

temp_depth <- 4.1984 + 0.6695 * sand_mean ^ 2 + 168.7603 * clay_mean ^ 2 # equation from re-analysis
depth_bs_evap <- pmin(pmax(temp_depth, depth_min_bs_evap, na.rm = TRUE),
SFSW2_prj_meta[["opt_sim"]][["depth_max_bs_evap_cm"]], na.rm = TRUE)
lyrs_bs_evap <- t(apply(depth_bs_evap - layers_depth, 1, function(x) {
i0 <- abs(x) < SFSW2_glovars[["tol"]]
ld <- if (any(i0, na.rm = TRUE)) {
which(i0)
} else {
temp <- which(x < 0)
if (length(temp) > 0) temp[1] else sum(!is.na(x))
}
c(rep(TRUE, ld), rep(FALSE, length(x) - ld))
}))

# function made up to match previous cummulative distributions
temp_coeff <- 1 - exp(- 5 * layers_depth / depth_bs_evap)
temp_coeff[!lyrs_bs_evap | is.na(temp_coeff)] <- 1
coeff_bs_evap <- round(t(apply(cbind(0, temp_coeff), 1, diff)), 4)
coeff_bs_evap <- coeff_bs_evap / rowSums(coeff_bs_evap, na.rm = TRUE)

coeff_bs_evap <- calc_BareSoilEvaporationCoefficientsFromSoilTexture(layers_depth, sand, clay,
depth_max_bs_evap_cm = SFSW2_prj_meta[["opt_sim"]][["depth_max_bs_evap_cm"]])


#add data to sw_input_soils and set the use flags
icol <- seq_len(sum(apply(coeff_bs_evap, 2, function(x) any(x > SFSW2_glovars[["tol"]]))))
Expand Down
6 changes: 3 additions & 3 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#'
#' @export
germination_wait_times <- function(time_to_germinate, duration_fave_cond) {
.Call(C_rSFSW2_germination_wait_times, time_to_germinate, duration_fave_cond, PACKAGE = "rSFSW2")
.Call(`_rSFSW2_germination_wait_times`, time_to_germinate, duration_fave_cond)
}

#' Determine if all conditions across rooted soil layers are deadly
Expand Down Expand Up @@ -74,7 +74,7 @@ germination_wait_times <- function(time_to_germinate, duration_fave_cond) {
#'
#' @export
get_KilledBySoilLayers <- function(relevantLayers, kill_conditions) {
.Call(C_rSFSW2_get_KilledBySoilLayers, relevantLayers, kill_conditions, PACKAGE = "rSFSW2")
.Call(`_rSFSW2_get_KilledBySoilLayers`, relevantLayers, kill_conditions)
}

#' Determine seedling survival in the first season (ss1s)
Expand All @@ -100,6 +100,6 @@ get_KilledBySoilLayers <- function(relevantLayers, kill_conditions) {
#'
#' @export
setFALSE_SeedlingSurvival_1stSeason <- function(ss1s, ry_year_day, ry_useyrs, y, doy) {
.Call(C_rSFSW2_setFALSE_SeedlingSurvival_1stSeason, ss1s, ry_year_day, ry_useyrs, y, doy, PACKAGE = "rSFSW2")
.Call(`_rSFSW2_setFALSE_SeedlingSurvival_1stSeason`, ss1s, ry_year_day, ry_useyrs, y, doy)
}

2 changes: 1 addition & 1 deletion R/Simulation_Project.R
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ populate_rSFSW2_project_with_data <- function(SFSW2_prj_meta, opt_behave, opt_pa
if (SFSW2_prj_meta[["pcalcs"]][["CalculateBareSoilEvaporationCoefficientsFromSoilTexture"]]) {
if (todo_intracker(SFSW2_prj_meta, "calc_bsevap", "prepared")) {

SFSW2_prj_inputs <- calc_CalculateBareSoilEvaporationCoefficientsFromSoilTexture(
SFSW2_prj_inputs <- get_BareSoilEvaporationCoefficientsForSoilInputFile(
SFSW2_prj_meta, SFSW2_prj_inputs, runIDs_adjust, resume = opt_behave[["resume"]],
verbose = opt_verbosity[["verbose"]])

Expand Down
4 changes: 2 additions & 2 deletions R/WeatherDB_Check.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ dbW_missingAmbient_siteIDs <- function(req_sites, fdbWeather, dbW_iSiteTable = N
#' all data are in the weather database, then \code{FALSE}.
#'
#' @export
dbW_has_missingClimScens <- function(fdbWeather, SFSW2_prj_inputs, req_scenN,
dbW_has_missingClimScens <- function(fdbWeather, SFSW2_prj_inputs, runIDs_sites, req_scenN,
opt_verbosity, opt_chunks) {
# Init: set every included site as having missing climate scenario data. If a site_id
# is found to have all climate scenario data, then set its todo element to FALSE
todos <- SFSW2_prj_inputs[["include_YN"]]

# Determine 'site_id's for which the dbWeather should contain daily weather data for
# every climate scenario
req_siteIDs <- SFSW2_prj_meta[["sim_size"]][["runIDs_sites"]] # equal to SFSW2_prj_inputs[["SWRunInformation"]][todos, "site_id"]
req_siteIDs <- runIDs_sites # runIDs_sites equal to SFSW2_prj_meta[["sim_size"]][["runIDs_sites"]] and equal to SFSW2_prj_inputs[["SWRunInformation"]][todos, "site_id"]

# Check presence of records with climate scenario data in dbWeather
con <- DBI::dbConnect(RSQLite::SQLite(), dbname = fdbWeather, flags = RSQLite::SQLITE_RO)
Expand Down
2 changes: 1 addition & 1 deletion R/rSFSW2-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#' GNU General Public License for more details.
#'
#' @useDynLib rSFSW2, .registration = TRUE, .fixes = "C_"
#' @useDynLib rSFSW2, .registration = TRUE
#' @docType package
#' @name rSFSW2
"_PACKAGE"
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,19 @@ system2(command = "git", args = "clone -b master --single-branch https://github.
tools::Rcmd(args = paste("INSTALL rSFSW2"))
```

### Binary package version
If you want a binary version of the 'rSFSW2' package (e.g., to distribute to someone
without development tools) for a platform to which you do not have access, then you may
consider using one of the cloud services (no endorsements):
- https://builder.r-hub.io offers different Linux, Windows, and mac OS flavors as targets
- http://win-builder.r-project.org/ offers Windows OS as target

Alternatively, you may access the previous binary package version for Windows OS from our
CI appveyor service if the build was successful and an artifact was generated for the
binary package (this would be named 'rSWSF2_X.Y.Z.zip' with version number X.Y.Z) at
- https://ci.appveyor.com/project/dschlaep/soilwat-r-wrapper/build/artifacts
If the latest build should have failed, then you may want to check out the 'History' tab
for binaries of older versions.

# Use rSFSW2 for your simulation project

Expand Down
Loading

0 comments on commit b0ee32c

Please sign in to comment.