discard_groundfish_diagnostic: discard_groundfish_diagnostic: Calculate groundfish discards:...

View source: R/discard_groundfish_diagnostic.R

discard_groundfish_diagnosticR Documentation

discard_groundfish_diagnostic: Calculate groundfish discards: Calculate discards for May groundfish fishing year

Description

Support tables in this version ar function variables. This allows them to be modified and run for diagnostic testing. This function can output a summary of discard information by strata, including number of trips used, variance, CV, discard amount, and KALL. It can also output a table, by subtrip, with all information. This table can be summarized afterward as well. If testing several scenarios, it is recommended to only output the summary rather than the full subtrip table as each output is 1-2GB.

Usage

discard_groundfish_diagnostic(
  con = con_maps,
  species = species,
  FY = fy,
  gf_dat = gf_dat,
  non_gf_dat = non_gf_dat,
  return_table = T,
  return_summary = F,
  CAMS_GEAR_STRATA = CAMS_GEAR_STRATA,
  STOCK_AREAS = STOCK_AREAS,
  CAMS_DISCARD_MORTALITY_STOCK = CAMS_DISCARD_MORTALITY_STOCK
)

Arguments

con

Oracle connection

species

data frame of species for evaluation. Can be a dataframe of multiple species or single row (preferred for testing)

FY

fishing year for evaluation

gf_dat

Data frame of groundfish trips built from CAMS_OBS_CATCH and control script routine. sourced from CAMS_OBS_CATCH

non_gf_dat

Data frame of non-groundfish trips built from CAMS_OBS_CATCH and control script routine. sourced from CAMS_OBS_CATCH

return_table

logical, should a table (very large!) of trip level info be returned?

return_summary

logical, should a summary (very not large) be returned?

CAMS_GEAR_STRATA

support table sourced from Oracle

STOCK_AREAS

support table sourced from Oracle

CAMS_DISCARD_MORTALITY_STOCK

support table sourced from Oracle

Details

The original function pushed .fst files directly to the Wind server at GARFO. This version does not do that and only produces local results. When running windowpane or yellowtail flounders, this function will save .fst files of scallop trips locally. These will be auto-saved in your working directory.

Value

nothing currently, writes out to fst files (add oracle?)

Author(s)

Benjamin Galuardi

Examples

see vignette



noaa-garfo/discaRd documentation built on April 17, 2025, 10:32 p.m.