Skip to content

Commit

Permalink
Change attainment to a minimum value (3000) when zero is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrandin committed Dec 1, 2020
1 parent 1d6d037 commit 77a6710
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/run_season_loop_om.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ run_season_loop_om <- function(om,
}

# Calculate catch distribution ------------------------------------------
e_tmp <- catch_space * ifelse(yr > om$m_yr, attain[space], 1) * om$catch_props_space_season[space, season] %>% pull
if(attain[space] == 0){
e_tmp <- 3000
}else{
e_tmp <- catch_space * ifelse(yr > om$m_yr, attain[space], 1) * om$catch_props_space_season[space, season] %>% pull
}
# Save the catch actually applied to each country so the EM can access it
if(yr > om$m_yr){
tmp_space_catch <- om$catch_country[[grep(space, names(om$catch_country))]][yr_ind]
Expand Down

0 comments on commit 77a6710

Please sign in to comment.