View source: R/calc_pred_diet.R
| calc_pred_diet | R Documentation | 
Function to calculate the eaten biomass in tonnes for each functional group per time, polygon, ageclass, and prey item.
calc_pred_diet(dietcomp, eat, grazing, vol, biolprm, runprm)
dietcomp | 
 A   | 
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, vol, prey, dietcomp, bio_eaten
Alexander Keth
Other calc functions: 
calc_Z(),
calc_age2length(),
calc_avgwtstage2age(),
calc_biomass_age(),
calc_biomass_pool(),
calc_pred_cons(),
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")
dietcomp <- load_diet_comp(dir = d, file_diet = "outputsDietCheck.txt",
  fgs = fgs)
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_diet(dietcomp = dietcomp, 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.