Skip to content

Commit

Permalink
fixed bug such that the clean_up value is passed to the model parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernbos committed Jul 10, 2020
1 parent 85462c9 commit 5af986f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion R/add_trajectory_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ add_trajectory_params <- function(model,
model$binary_path <- binary_path
}

if (!is.null(clean_up)) {
model$clean_up <- clean_up
}

model
}

Expand All @@ -96,7 +100,8 @@ add_dispersion_params <- function(model,
model_height = NULL,
exec_dir = NULL,
met_dir = NULL,
binary_path = NULL) {
binary_path = NULL,
clean_up = TRUE) {

if (!is.null(start_time)) {
model$start_time <- start_time
Expand Down Expand Up @@ -134,5 +139,9 @@ add_dispersion_params <- function(model,
model$binary_path <- binary_path
}

if (!is.null(clean_up)) {
model$clean_up <- clean_up
}

model
}
6 changes: 4 additions & 2 deletions R/run_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ run_model <- function(model) {
traj_name = model$traj_name,
exec_dir = model$exec_dir,
met_dir = model$met_dir,
binary_path = model$binary_path
binary_path = model$binary_path,
clean_up = model$clean_up
)

model$traj_df <- traj_df
Expand Down Expand Up @@ -80,7 +81,8 @@ run_model <- function(model) {
species = species_list,
exec_dir = model$exec_dir,
met_dir = model$met_dir,
binary_path = model$binary_path
binary_path = model$binary_path,
clean_up = model$clean_up
)

model$disp_df <- disp_df
Expand Down

0 comments on commit 5af986f

Please sign in to comment.