Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eqsim_run error if Fbar=0 in one year #30

Open
vtrijoulet opened this issue Nov 23, 2022 · 0 comments
Open

eqsim_run error if Fbar=0 in one year #30

vtrijoulet opened this issue Nov 23, 2022 · 0 comments

Comments

@vtrijoulet
Copy link

vtrijoulet commented Nov 23, 2022

It must rarely happen but if catch is null in one of the years (hence Fbar, e.g. due to 0 catch advice or in simulations with HCR where SSB is below Blim), the calculation of selectivity l.205 as follows:
sel <- sweep(sel, 2, Fbar, "/")
will return a NaN, than induces errors later in the code that makes the function stops.
A simple fix would be to add l.206:
sel[!is.finite(sel)] <- 0
Maybe not ideal but will solve the problem.

Cheers,

Vanessa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant