Skip to content

Commit

Permalink
fix: input is in ctl file, not dat file
Browse files Browse the repository at this point in the history
  • Loading branch information
k-doering-NOAA committed Oct 27, 2021
1 parent 0ffcaa6 commit 80c889e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/single_extend_OM.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
add_OM_devs <- function(ctl, dat, parlist, timeseries, future_om_dat) {
# First check if their is any data to add if not just pass back the original files with end year updated
if (!is.null(future_om_dat)) {

# First check for recruitment deviation projections and implement them
for (i in grep("rec_devs", names(future_om_dat))) {
if (!is.null(dat[["MainRdevYrLast"]])) {
late_years <- dat[["endyr"]] - dat[["MainRdevYrLast"]]
if (!is.null(ctl[["MainRdevYrLast"]])) {
late_years <- dat[["endyr"]] - ctl[["MainRdevYrLast"]]
} else {
late_years <- 0
}
Expand Down

0 comments on commit 80c889e

Please sign in to comment.