ss3-source-code icon indicating copy to clipboard operation
ss3-source-code copied to clipboard

Add option for the user to input forecast fleet proportions in catch

Open k-doering-NOAA opened this issue 4 years ago • 13 comments

Imported from redmine, Issue #70956 Opened by @chantelwetzel-noaa on 2019-11-06 Status when imported: Under Review

Currently, the proportion allocation among fleets can only be entered in terms in of F proportion. Often future removals are allocated in terms of the percent of future catch by fleet or area. In terms of West Coast assessments, this has created a minor issue where the projections without fixed future catches in the forecast file do not match the forecasts with future catches allocated and fixed by fleet in terms of forecast spawning biomass.

k-doering-NOAA avatar Nov 05 '20 17:11 k-doering-NOAA

comment from @RickMethot on 2019-11-06: I think you can do this by assigning each fleet (or group of fleets) to an allocation group and then assign % allocation to the allocation groups. However, this will only be operational in loop 2 of forecast, so would not be in the OFL calculations.

Related to this is the SEFSC's interest in getting %catch allocation in the benchmark/reference point calculations. Currently they run long forecasts to get F's associated with desired catch allocation; this lakes a few re-runs of SS to achieve.

% catch allocation in equilibrium/reference point calculations will be difficult to achieve because you do not know the total equilibrium catch for a fleet until after SS is accumulated it for all ages. Hence, it would take multiple calls to equil_calc to tune the F's to get the desired %catch allocation. Possible, but a moderately large programming change.

On Wed, Nov 6, 2019 at 10:52 AM [email protected] wrote:

k-doering-NOAA avatar Nov 05 '20 17:11 k-doering-NOAA

comment from @chantelwetzel-noaa on 2019-11-06: I did a fair amount of exploration during the petrale sole assessment. During that testing I did try the allocation group approach, but was not able to match the generated ABC values when the allocation group was specified vs. adding the fixed catches into the forecast file. I may have made a mistake setting up this approach in the forecast file. When I am back at my desk in Seattle, I will revisit this and do some step-wise comparisons and check the performance of these approaches.

k-doering-NOAA avatar Nov 05 '20 17:11 k-doering-NOAA

@chantelwetzel-noaa Do you think this is still worth addressing/looking into?

k-doering-NOAA avatar Mar 07 '22 20:03 k-doering-NOAA

check with Nathan Vaughan. I think SE really needs something like this. Mare be feasible to permute the fleet allocation procedure to do it.

Rick-Methot-NOAA avatar Mar 07 '22 20:03 Rick-Methot-NOAA

@nathanvaughan-NOAA do you know if this is something the SE needs?

k-doering-NOAA avatar Mar 07 '22 22:03 k-doering-NOAA

@Rick-Methot-NOAA @k-doering-NOAA you are both correct that this is a we do the calculations for the SE. I have developed external code that performs the search loop to achieve the correct annual catch allocations as well as constant whole fishery F in each year. Like you mentioned above and we have previously discussed there is no way to achieve this without iterating the projections. My code is up on Github and I'm happy to discuss more if you are considering implementing this within SS. https://github.com/SEFSC/SFD-AllocationForecasting/blob/main/Allocation_forecasting.R

nathanvaughan-NOAA avatar Mar 07 '22 23:03 nathanvaughan-NOAA

I recall the SEFSC's goal was to get the target F by fleet to achieve a particular catch allocation while also achieving the desired overall SSB per Recruit. The equilibrium code cannot do catch allocations. So the current equilibrium code is bypassed in the SE approach and instead you run long projections with the forecast code to get catch allocation and overall SSB/R satisfied.

Rick-Methot-NOAA avatar Mar 08 '22 00:03 Rick-Methot-NOAA

@Rick-Methot-NOAA you are correct on that. The previous SE code adjusted for just the equilibrium SPR target and annual catch allocation fractions. Our new code now targets an equilibrium SPR, SSB, MSY, or Fmax target as desired, annual catch allocations between fleet, constant annual total F (this was not achieved with the old code), and rebuilding targets if specified.

nathanvaughan-NOAA avatar Mar 08 '22 16:03 nathanvaughan-NOAA

Cool augmentation. How many calls to SS3 does it take to reach a result? Still seems better to me to implement a loop for catch allocation within the current benchmark loop that searches for the target F. So, everywhere in benchmark that there is a call to do_equil_calc, substitute a call to a new do_catch_alloc which in turn would call do_equil_calc.

Rick-Methot-NOAA avatar Mar 08 '22 16:03 Rick-Methot-NOAA

For the SPR and SSB targets, it is relatively fast (on the order of 10 to 30 calls to SS3). For the MSY and Fmax searches it is much slower as the allocations can have a relatively large impact on yield and thus we implement a nested search consisting of first searching for an initial SPR target (requiring 10-30 SS3 calls), then calculating the achieved catch and iterating the SPR target to increase the achieved catch and find MSY. I agree this could probably be achieved faster and easier inside SS by removing overhead such as all the file read/writes.

nathanvaughan-NOAA avatar Mar 08 '22 16:03 nathanvaughan-NOAA

Looping in @cgrandin b/c of the loops that he has written for Pacific Hake projections, which could be similar.

kellijohnson-NOAA avatar Mar 08 '22 16:03 kellijohnson-NOAA

I didn't know about that either. Let's try to pull together info from as many users as possible to see what other permutations are being used. I imagine the CSIRO group and the IATTC group may be doing something.

Rick-Methot-NOAA avatar Mar 08 '22 16:03 Rick-Methot-NOAA

I wrote code also to modify the forecast.ss file and iterate the projections with tolerances for the values and limits to the number of iterations. The algorithm is a binary search, i.e. divide the difference from the last iteration and this one by 2 and continue until within tolerances or over the maximum iteration limit. Some of it is in parallel using future_map().

Here are the three functions that we use for Hake (run_catch_levels_default_hr(), run_catch_levels_spr_100(), run_catch_levels_stable_catch()):

https://github.com/pacific-hake/hake-assessment/blob/947de55a5943aa6ca471e7e1077720c3c19682be/R/run-catch-levels.R#L95

cgrandin avatar Mar 08 '22 18:03 cgrandin