View source: R/calc_biomass_age.R
calc_biomass_age | R Documentation |
Calculate biomass in t per age-structured-groups per polygon, time and ageclass.
calc_biomass_age(nums, resn, structn, biolprm)
nums |
A |
resn |
A |
structn |
A |
biolprm |
A list of biological parameters available from the
|
This functions converts the ATLANTIS output to a data.frame
which can be processed in R.
A data.frame
in tidy format with the following columns:
species, agecl, time, polygon and atoutput.
Atoutput is the total biomass in t.
At this point biomass was aggregated (sum) per layer!
Alexander Keth
Other calc functions:
calc_Z()
,
calc_age2length()
,
calc_avgwtstage2age()
,
calc_biomass_pool()
,
calc_pred_cons()
,
calc_pred_diet()
,
calc_stage2age()
,
calc_timestep2time()
# Set up the example with input files
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")
biolprm <- load_biolprm(dir = d,
file_biolprm = "Biology.prm")
boxes <- get_boundary(load_box(dir = d, file_bgm = "Geography.bgm"))
# Get the catch values
catch <- load_nc(dir = d, file_nc = "outputsCATCH.nc",
bps = bps, fgs = fgs, select_groups = fgs[fgs$IsTurnedOn > 0, "Name"],
select_variable = "Catch", check_acronyms = TRUE, bboxes = boxes)
structn <- load_nc(dir = d, file_nc = "outputs.nc",
bps = bps, fgs = fgs, select_groups = fgs[fgs$IsTurnedOn > 0, "Name"],
select_variable = "StructN", check_acronyms = TRUE, bboxes = boxes)
resn <- load_nc(dir = d, file_nc = "outputs.nc",
bps = bps, fgs = fgs, select_groups = fgs[fgs$IsTurnedOn > 0, "Name"],
select_variable = "ResN", check_acronyms = TRUE, bboxes = boxes)
biomassatage <- calc_biomass_age(nums = catch,
resn = resn, structn = structn, biolprm = biolprm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.