nwfsc-fram / boatnet

At-Sea Field Data Collection Software Components for Scientific Surveys and Observers
8 stars 5 forks source link

EM expansions for grouping species codes #1927

Open neilriley-NOAA opened 3 years ago

neilriley-NOAA commented 3 years ago

@sethgerou-noaa @melinashak-noaa @BHHorness-NOAA

We need to make sure any catch grouping codes are included in calculations in Appendix C of the "IFQ Accounting: Business Rules for sending EM and Logbook Data to NMFS" document. I have included the language from the doc below and species codes. There are some specific rules listed that allow for weights to be dropped if < 50 lbs/trip. I don't want this to get overlooked.

WCEM Species Code Common Name
100 Flatfish Unid
136 Sanddab Unid
200 Roundfish Unid
300 Rockfish Unid
349 Shortspine/ Longspine Thornyhead
777 Fish Unidentified
899 Decomposed Fish
999 Unknown
3004 Fish Unidentified(IFQ)
3005 Flatfish Unid(IFQ)
3006 Roundfish Unid(IFQ)
3007 Rockfish Unid(IFQ)

Specific Business Rules: • Rules apply to discards in the EM Bottom Trawl and Fixed Gear fleets. • Rules apply to discards that are identified to a group level (thornyheads, flatfish, rockfish, roundfish) rather than a specific IFQ category. • Discards identified to a group level are divided up and assigned to an IFQ category based on the logbook reported ratio of all species (IFQ and non-IFQ) from that group. If the logbook reports non-IFQ species from the group, that same proportion would be dropped from the EM estimate. For example, if EM has 10 lbs of unidentified flatfish and the logbook reports 5 lbs of Dover sole and 5 lbs of deepsea sole, the final EM estimate would be 5 lbs of Dover sole and the remaining 5 lbs would be dropped from debiting. • The logbook ratio is calculated preferentially in the following order:

  1. Use the ratio of species in the group from the trip logbook.
  2. Use the ratio of species in the group from the vessel’s logbooks (sum of all logbooks in the previous year within the same management area) if there are no fish from the group reported in the logbook from that trip.
  3. Use the ratio of species in the group from the fleet logbooks (sum of all fleet logbooks in the previous year in the same management area) if there are no fish from the group reported in either the trip logbook or the vessel’s previous year logbooks. • Calculations are made at the trip level. • If an EM reviewer identifies some fish within a group to a species level and others to a group level, only the fish identified to a group level are divided up per the above rules. For example, if the reviewer identifies 5 lbs of English sole and 3 lbs of unidentified flatfish, only the 3 lbs of unidentified flatfish are split up based on the logbook ratio. • All unidentified categories and combo species from a given group are combined and then divided per the logbook ratio (for example, unidentified Sanddabs are combined with unidentified flatfish). • If there are more than 50 pounds of discards of unidentified fish (fish that cannot be identified even to a group level) for a trip, the discards will be divided according to the ratio of fish on the fish ticket (i.e., the discard will be treated like a non-selective discard). If there are less than 50 pounds, these discards will be dropped.
neilriley-NOAA commented 3 years ago

@melinashak-noaa is there anything left on this ticket that needs to be implemented or do we just need to test each scenario?

melinashak-noaa commented 3 years ago

otherwise believe everything else should be implemented

neilriley-NOAA commented 3 years ago

@sethgerou-noaa We need to revisit this ticket as it pertains to IFQ species grouping calculations. I don't think these calcs have been completed. Example is tripId 100321 in Prod. This trip has a use case where there is a catch grouping UNST. No discard was calculated for the UNST discard.

neilriley-NOAA commented 3 years ago

@sethgerou-noaa @melinashak-noaa I am going to move this up the priority list. Another example to reference for unsorted logbook catch is trip 100327 in prod.