Skip to content

Commit

Permalink
add fleetnames_all where get_F() function is called to account for fl…
Browse files Browse the repository at this point in the history
…eets type==3
  • Loading branch information
CassidyPeterson-NOAA committed Jan 26, 2024
1 parent 70410ff commit 7d4748b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion R/MS_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ get_no_EM_catch_df <- function(OM_dir, yrs, MS = "last_yr_catch") {
)
# get F.
F_vals <- get_F(outlist[["timeseries"]],
fleetnames = dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "fleetname"]
fleetnames = dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "fleetname"],
fleetnames_all = dat[["fleetinfo"]][["fleetname"]]
)
catch_F <- F_vals[["F_rate_fcast"]][
,
Expand Down
3 changes: 2 additions & 1 deletion R/extendOM.R
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ update_OM <- function(OM_dir,
# Extract the achieved F and Catch
F_list <- get_F(
timeseries = outlist[["timeseries"]],
fleetnames = dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "fleetname"]
fleetnames = dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "fleetname"],
fleetnames_all = dat[["fleetinfo"]][["fleetname"]] # added to account for fleets of type==3
)

units_of_catch <- dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "units"]
Expand Down
5 changes: 3 additions & 2 deletions R/initOM.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ create_OM <- function(OM_out_dir,
# use report.sso time series table to find the F's to put into the parlist.
F_list <- get_F(
timeseries = outlist[["timeseries"]],
fleetnames = dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "fleetname"]
)
fleetnames = dat[["fleetinfo"]][dat[["fleetinfo"]][["type"]] %in% c(1, 2), "fleetname"],
fleetnames_all = dat[["fleetinfo"]][["fleetname"]] # add to account for fleets type=3
)

# SINGLE_RUN_MODS:
update_F_years <- (dat[["endyr"]] + 1):(dat[["endyr"]] + nyrs)
Expand Down

0 comments on commit 7d4748b

Please sign in to comment.