From 2031e542085fab34f80cc151ee1b62353f305e45 Mon Sep 17 00:00:00 2001 From: Dongchen Zhang Date: Sat, 9 Dec 2023 12:11:33 -0500 Subject: [PATCH] improve function. --- modules/assim.sequential/R/sda.enkf_MultiSite.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/assim.sequential/R/sda.enkf_MultiSite.R b/modules/assim.sequential/R/sda.enkf_MultiSite.R index 323f2ad88c8..c46fe720f8c 100644 --- a/modules/assim.sequential/R/sda.enkf_MultiSite.R +++ b/modules/assim.sequential/R/sda.enkf_MultiSite.R @@ -439,7 +439,11 @@ sda.enkf.multisite <- function(settings, paste(file.path(rundir, 'runs.txt')) ## testing Sys.sleep(0.01) ## testing if(control$parallel_qsub){ - PEcAn.remote::qsub_parallel(settings, files=PEcAn.remote::merge_job_files(settings, control$jobs.per.file), prefix = paste0(obs.year, ".nc")) + if (is.null(control$jobs.per.file)) { + PEcAn.remote::qsub_parallel(settings, prefix = paste0(obs.year, ".nc")) + } else { + PEcAn.remote::qsub_parallel(settings, files=PEcAn.remote::merge_job_files(settings, control$jobs.per.file), prefix = paste0(obs.year, ".nc")) + } }else{ PEcAn.workflow::start_model_runs(settings, write=settings$database$bety$write) }