Skip to content

Commit

Permalink
fix: fix em starter update
Browse files Browse the repository at this point in the history
move starter file update to only occur when EM exists
  • Loading branch information
nathanvaughan-NOAA committed Mar 15, 2024
1 parent d7d2e7e commit ef2b462
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ clean_init_mod_files <- function(OM_out_dir, EM_out_dir = NULL, MS = "EM",
EM_start <- SS_readstarter(file.path(EM_out_dir, "starter.ss"),
verbose = FALSE
)

# turn on sd reporting for all em model years by default
EM_start[["minyr_sdreport"]] <- -1
EM_start[["maxyr_sdreport"]] <- -2

EM_dat <- SS_readdat(file.path(EM_out_dir, EM_start[["datfile"]]), verbose = FALSE)

EM_ctl <- SS_readctl(file.path(EM_out_dir, EM_start[["ctlfile"]]), datlist = EM_dat, verbose = FALSE)
Expand All @@ -173,9 +178,7 @@ clean_init_mod_files <- function(OM_out_dir, EM_out_dir = NULL, MS = "EM",
styr <- OM_dat[["styr"]]
endyr <- OM_dat[["endyr"]]

# turn on sd reporting for all em model years by default
EM_start[["minyr_sdreport"]] <- -1
EM_start[["maxyr_sdreport"]] <- -2



# get years in range function
Expand Down

0 comments on commit ef2b462

Please sign in to comment.