View source: R/calc_pred_cons.R
calc_pred_cons | R Documentation |
Function to calculate the eaten total biomass in tonnes: "consumption" for each functional group per time, polygon, and ageclass.
calc_pred_cons(eat, grazing, vol, biolprm, runprm)
eat |
A |
grazing |
A |
vol |
A |
biolprm |
A list of biological parameters available from the
|
A codedata.frame in tidy format with the following columns: species, agecl, time, polygon, atoutput (bio_eaten)
Alexander Keth, Sarah Gaichas
Other calc functions:
calc_Z()
,
calc_age2length()
,
calc_avgwtstage2age()
,
calc_biomass_age()
,
calc_biomass_pool()
,
calc_pred_diet()
,
calc_stage2age()
,
calc_timestep2time()
d <- system.file("extdata", "SETAS_Example", package = "atlantisom")
fgs <- load_fgs(d, "Functional_groups.csv")
bps <- load_bps(dir = d, fgs = "Functional_groups.csv",
file_init = "Initial_condition.nc")
runprm <- load_runprm(d, "Run_settings.xml")
boxes <- get_boundary(load_box(dir = d, file_bgm = "Geography.bgm"))
groups <- load_fgs(dir = d, "Functional_groups.csv")
groups <- groups[groups$IsTurnedOn > 0, "Name"]
eat <- load_nc(dir = d, file_nc = "outputsPROD.nc",
bps = bps, fgs = fgs, select_groups = groups,
select_variable = "Eat", check_acronyms = TRUE,
bboxes = boxes)
grazing <- load_nc(dir = d, file_nc = "outputsPROD.nc",
bps = bps, fgs = fgs, select_groups = groups,
select_variable = "Grazing", check_acronyms = TRUE,
bboxes = boxes)
vol <- load_nc_physics(dir = d, file_nc = "outputs.nc",
physic_variables = "volume", aggregate_layers = FALSE,
bboxes = boxes)
biolprm <- load_biolprm(dir = d,
file_biolprm = "Biology.prm")
runprm <- load_runprm(dir = d, file_runprm = "Run_settings.xml")
calcs <- calc_pred_cons(eat = eat, grazing = grazing,
vol = vol, biolprm = biolprm, runprm = runprm)
rm(calcs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.