Closed gavinfay closed 2 years ago
@gavinfay Yes, the fishery_q matirx in the pin file is meant to represent catchabilities of each species by different fleet. Will look into the Fyr variable.
What levels of F are you seeing? For the historic runs the largest F's are seen with yellowtail. The largest being about 1.5.
To fix:
Target species for a fleet, what other species does it catch:
Target species 1 to Nfleet (.dat)
Each fleet, vector of species it catches (.dat)
Matrix first column fleet second column species Order of those maps to order of qs in parameter vector
Number of species per fleet matrix (.dat file) Vector with how many q coefficient there are (Data file) Vector that maps coefficient to species and fleet
Parameter vector is q, n species that are caught minus n fleets (.pin)
Commit bfc1d0770c516595bd0ff507b1f25cd91ec27de4 reimplements fishing per the above (slight mod).
Specifically, in the .dat file:
indicator_fishery_q
is a 3darray (areas, fleets, species) containing flags if that species is a target species for that fleet*area. (NOTE change in order of indexing for this)
The code then creates:
f_map
that contains the primary species (first) in the indicator vector for each fleet*area combo, Nqpars
which is the number of fishery catchability parametersq_map
that defines the area, species, and fleet each catchability parameter refers to.The PARAMETER_SECTION is then updated so: (important for .pin file)
ln_fishery_q
is a vector of length Nqpars
, suggest initial value of 0.avgF
is the average fishing mortality over the time series for each area * fleet combo
Trying to sort out what is happening with fishing mortality. Currently F is calculated as Fyr(area,spp,ifleet,iy) = fishery_q(area,spp,ifleet)effort_updated(area,ifleet)effortScaled(area,spp);
then these are (effectively) summed over fleets to get the F to apply for each species. (q's are a 1:1 function of (log-transformed) estimated parameters, and the effort vals are fixed inputs (currently set to 1 for all years for the NOBA model))
Question is, what is the intent of the matrix ln_fishery_q ? It looks like this is meant to represent an indicator matrix, saying which fleets are active for which species, but this is not how they are implemented in the model - in that these are exponentiated to return VERY high fishing mortality rates, as well as what appears to be a bunch of extraneous parameters.
Simple fix is to replace the entry in the NOBA.pin file with something like this:
-10 -10 -10 -10 -10 0 -10 -10 -10 -10 -10 # Blue_whiting -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 0 # Capelin 0 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 # Green_halibut -10 -10 0 -10 -10 -10 -10 -10 -10 -10 -10 # Haddock -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 # Long_rough_dab -10 0 -10 -10 -10 -10 -10 -10 -10 -10 -10 # Mackerel -10 -10 -10 -10 0 -10 -10 0 0 0 -10 # North_atl_cod -10 -10 -10 -10 -10 -10 0 -10 -10 -10 -10 # Norwegian_ssh -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 -10 # Polar_cod -10 -10 -10 -10 0 -10 -10 -10 -10 -10 -10 # Redfish -10 -10 -10 0 -10 -10 -10 -10 -10 -10 -10 # Saithe
But, this still means there's a bunch of parameters that are getting in the way.
Perhaps a better solution would be to have a vector of q's and some indicator vectors that map the parameter to the relevant species/fleets where catch occurs.
This would still be estimating constant F over time however, for that to vary needs a time series of effort (given the current implementation). Alternative would be to estimate time series of F's for each fleet as parameters, and have q's for the second and subsequent species caught by each fleet.
However, the q input is also inconsistent with the data, as there are only catches for fleet 1; which (according to NOBA-ts.dat) catches all the species, yet the q's suggest (if these are indicators) that this fleet should only catch species 3 (Greenland halibut).
@gavinfay is happy to sort this out, just wanting to understand what the intention is.
Tagging @sgaichas & @andybeet for thoughts.