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

three comments to improve code/manual #63

Open
vsgard opened this issue Nov 17, 2021 · 0 comments
Open

three comments to improve code/manual #63

vsgard opened this issue Nov 17, 2021 · 0 comments

Comments

@vsgard
Copy link

vsgard commented Nov 17, 2021

Hello,

just three comments that could improve the code (and/or the information provided in the manual). While trying to condition FLBEIA 1.15.5 with R4.1 we encountered the following issues:

  1. For biomass dynamic stocks the "create.biols.data.r" requires that age.min=age.max=NA,
    for the following line of code in function "create.list.stks.flqa" to run (otherwise there is a problem when checking dimensions):

stk.flqa <- FLQuant(dimnames = list(age = 'all', year = nmy, unit = nmu, season = nms, iter = 1:ni))

However "create.fleets.data.r" requires: age.min-age.max =0 otherwise this error message appears: "Error in if (stk.age.max - stk.age.min == 0) { : missing value where TRUE/FALSE needed"

  1. Although the "catch.threshold" is not a required field in fleets.ctrl for fixedEffort model (according to the manual),
    the function "CorrectCatch.r" requires it.

  2. The same is true for "discard.TAC.OS", which should be set to "FALSE" in a fixedEffort model without TACs. If not set (and TACs are not provided), the code produces an error within function "ageBased.CobbDouglas.r", while executing the following "if" statement and line: tac <- (advice$TAC[st,yr]*QS)[drop=T]" # it

if(TACOS){
yr.share <- advice$quota.share[[stknm]][flnm,yr,, drop=T] # [it]
ss.share <- fleets.ctrl$seasonal.share[[stknm]][flnm,yr,,ss, drop=T] # [it]
QS <- yr.share*ss.share # [it]
QS[is.na(QS)] <- 0
tac <- (advice$TAC[st,yr]*QS)[drop=T] # it
}

So it would be good to include this in the manual, i.e. that "discard.TAC.OS" should be specified in fleets.ctrl also for the fixedEffort model.

Thanks,
Vicky

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