View source: R/sample_fishery_totcatch.R
sample_fishery_totcatch | R Documentation |
The function takes total catch data from an Atlantis scenario
where the data was read in from Atlantis output using load_catch
function or from the load_nc_catchtons
function.
One does not need to use these functions
to create dat
, rather you must only ensure that the structure of
dat
is the same.
sample_fishery_totcatch(dat, cv)
dat |
A
The |
cv |
Coefficient of variation for the entire species specific catch a matrix with columns: species, cv |
If a total catch time series is input from load_catch
,
this function simply creates an observed total catch time series from
total catch input using by applying a user-specified cv.
If catch by polygon and timestep is input from load_nc_catchtons
followed by create_fishery_subset
, then catches are aggregated
over polygons and the subannual timesteps are retained. Fleet specific catch
can be created by selecting a subset of fleets as input to
create_fishery_subset
. Either way, the result is a coastwide
catch (tons) estimate in tons from the fishery.
The standard dataframe as specified used in dat
.
Poseidon
d <- system.file("extdata", "SETAS_Example", package = "atlantisom")
groups <- c("Pisciv_T_Fish","Pisciv_S_Fish")
file <- "outputsCatch.txt"
fgs <- load_fgs(dir = d, "Functional_groups.csv")
truetotcatch <- load_catch(dir = d, fgs = fgs, file_catch = file)
groupcatch <- truetotcatch[truetotcatch$species %in% groups, ]
cv <- data.frame(species=groups, cv=c(0.2,0.3))
fishObsCatch <- sample_fishery_totcatch(dat=groupcatch,cv=cv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.