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

Error in F_flbeia #67

Open
marchtaylor opened this issue Oct 29, 2024 · 0 comments
Open

Error in F_flbeia #67

marchtaylor opened this issue Oct 29, 2024 · 0 comments

Comments

@marchtaylor
Copy link
Contributor

In F_flbeia, there appears to be an error in how fishing mortality is calculated for stocks with a single age dimension. It appears to show that F = catch/biomass, but I believe the function is actually calculating catch.n / stockBiomass:

if(na == 1){
# Catch:
catch <- apply(catchStock(obj$fleets, stk),c(2,4,6), sum)[,years,drop = TRUE] # [ny,ns,it]
B <- (obj$biols[[stk]]@n*obj$biols[[stk]]@wt)[,years,,,drop= TRUE] # [ny,ns, it] , 1st season biomass
res[stk,,,] <- (catch/B)
}

The fix should possibly be to use numbers (catch.n / stock.n), which I believe is preferable to total weight (catch/stock). In the case of biomass dynamics stocks, we use mean weights = 1.0 and numbers equal the total weight of the stock and catch. Thus, harvest weight based on weight or numbers would be equivalent. However, with Nephrops, mean weights are different for landings and discards, and harvest rates should be based on numbers.

Likewise, I believe the perfectObs function would benefit from using numbers as the basis for harvest rate calculation - currently catch/stockBiomass:

if(na == 1){
harvest(res)[] <- (res@catch)/(res@stock.n*res@stock.wt)
units(res@harvest) <- 'hr'

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