Skip to content

Commit 0a06b57

Browse files
author
Dongchen Zhang
committed
Switch argument name.
1 parent 19e8ef4 commit 0a06b57

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

modules/assim.sequential/R/sda.enkf_MultiSite.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,12 @@ sda.enkf.multisite <- function(settings,
321321
if(restart_flag){
322322
new.params <- new.params
323323
} else {
324-
gen.samples <- FALSE
324+
generate_samples <- FALSE
325325
if (is.null(ensemble.samples)) {
326326
if (file.exists(file.path(settings$outdir, "samples.Rdata"))) {
327327
load(file.path(settings$outdir, "samples.Rdata"))
328328
} else {
329-
gen.samples <- TRUE
329+
generate_samples <- TRUE
330330
}
331331
}
332332
# get the joint input design.
@@ -347,7 +347,7 @@ sda.enkf.multisite <- function(settings,
347347
}
348348
}
349349
# if we generated new samples file within the `generate_joint_ensemble_design` function.
350-
if (gen.samples) {
350+
if (generate_samples) {
351351
load(file.path(settings$outdir, "samples.Rdata"))
352352
}
353353
new.params <- sda_matchparam(settings, ensemble.samples, site.ids, nens)

modules/assim.sequential/R/sda.enkf_parallel.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ sda.enkf_local <- function(settings,
195195
###-------------------------------------------------------------------###----
196196
# Reading param samples-------------------------------
197197
# create params object using samples generated from TRAITS functions
198-
gen.samples <- FALSE
198+
generate_samples <- FALSE
199199
if (is.null(ensemble.samples)) {
200200
if (file.exists(file.path(settings$outdir, "samples.Rdata"))) {
201201
load(file.path(settings$outdir, "samples.Rdata"))
202202
} else {
203-
gen.samples <- TRUE
203+
generate_samples <- TRUE
204204
}
205205
}
206206
# get the joint input design.
@@ -220,7 +220,7 @@ sda.enkf_local <- function(settings,
220220
}
221221
# reformatting params.
222222
# if we generated new samples file within the `generate_joint_ensemble_design` function.
223-
if (gen.samples) {
223+
if (generate_samples) {
224224
load(file.path(settings$outdir, "samples.Rdata"))
225225
}
226226
new.params <- sda_matchparam(settings, ensemble.samples, site.ids, nens)

modules/uncertainty/R/generate_joint_ensemble_design.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
#'
66
#' @param settings A PEcAn settings object containing ensemble configuration
77
#' @param ensemble_size Integer specifying the number of ensemble members
8-
#' @param gen.samples Logical: logical variable determine if we want to generate the samples.
8+
#' @param generate_samples Logical: logical variable determine if we want to generate the samples.
9+
#' Default is TRUE.
910
#' Since the `input_design` will only be generated once for the entire model run,
1011
#' the only situation, where we might want to recycle the existing `ensemble_samples`,
1112
#' is when we split and submit the larger SDA runs (e.g., 8,000 sites) into
@@ -19,7 +20,7 @@
1920

2021
generate_joint_ensemble_design <- function(settings,
2122
ensemble_size,
22-
gen.samples = FALSE,
23+
generate_samples = TRUE,
2324
sobol = FALSE) {
2425
if (sobol) {
2526
ensemble_size <- as.numeric(ensemble_size) * 2

modules/uncertainty/man/generate_joint_ensemble_design.Rd

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)