Skip to contents

Computes age-specific harvest rates by fishery for a given year and season.

Usage

get_harvest_rate(
  y,
  s,
  first_yr,
  first_yr_catch,
  removal_switch_f,
  catch_obs_ysf,
  number_ysa,
  sel_fya,
  weight_fya,
  af_sliced_ysfa
)

Arguments

y

Integer year index.

s

Integer season index (1 or 2).

first_yr

Integer first model year.

first_yr_catch

Integer first year with catch data.

removal_switch_f

A vector of flags indicating removal type for each fishery (0=Baranov, 1=direct sliced removal).

catch_obs_ysf

A 3D array of observed catch weights with dimensions year by season by fishery.

number_ysa

A 3D array of numbers-at-age with dimensions year by season by age.

sel_fya

A 3D array of selectivity values with dimensions fishery by year by age.

weight_fya

A 3D array of weights-at-age with dimensions fishery by year by age.

af_sliced_ysfa

A 4D array of sliced age-frequency numbers with dimensions year by season by fishery by age.

Value

A list containing:

h_rate_fa

Matrix of age-specific harvest rates by fishery and age.

h_rate_a

Vector of total harvest rates by age (summed across fisheries).

penalty

Numeric penalty value from posfun to constrain harvest rates.