Skip to content

Commit

Permalink
only call remove.config if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed Sep 9, 2014
1 parent 8a46fe1 commit 6d19ad1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/R/run.write.configs.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ run.write.configs <- function(settings, write = TRUE) {
trait.samples <- sa.samples <- ensemble.samples <- env.samples <- runs.samples <- list()

## Prepare for model output. Cleanup any old config files (if exists)
do.call(paste("remove.config", model, sep="."), args = list(settings$rundir, settings))
my.remove.config <- paste0("remove.config.",model)
if(exists(my.remove.config)) {
do.call(my.remove.config, args = list(settings$rundir, settings))
}

## Load PFT priors and posteriors
for (i in seq(pft.names)){
Expand Down

0 comments on commit 6d19ad1

Please sign in to comment.