load_init_age: This function loads weight at age data (in mgN) from the...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/load-init-age.R

Description

This function loads weight at age data (in mgN) from the initial conditions file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
load_init_age(init, fgs, select_variable, select_groups = NULL, bboxes)

load_init_nonage(init, fgs, select_variable = "N", select_groups = NULL,
  bboxes, bps)

load_init_stanza(init, fgs, select_variable = "N", select_groups = NULL,
  bboxes)

load_init_physics(init, select_variable, bboxes)

load_init_weight(init, fgs, bboxes)

Arguments

init

Character string giving the connection of the initial conditions netcdf file. The filename usually contains init and ends in .nc.

fgs

Character string giving the connection to the functional groups file. The filename usually contains Groups and does end in .csv.

select_variable

Character value specifying which variable to load. For load_init_age this can be "Nums", "ResN", "StructN", For load_init_nonage please select "N" (default) For load_init_physics simply pass the names of the physical variables.

select_groups

Character vector of functional groups which shall be read in. Names have to match the ones used in the ncdf file. Check column "Name" in "functionalGroups.csv" for clarification. Default is NULL resulting in all available groups.

bboxes

Integer vector giving the box-id of the boundary boxes. Can be created with get_boundary.

bps

Vector of character strings giving the complete list of epibenthic functional groups (Only present in the sediment layer). The names have to match the column 'Name' in the 'functionalGroups.csv' file. Can be created with load_bps.#'

Value

A dataframes with columns atoutput, polygon, layer (if present), species (if present).

Author(s)

Alexander Keth

See Also

Other load functions: load_box, load_bps, load_dietcheck, load_fgs, load_init, load_nc_physics, load_nc, load_rec, load_spec_mort, load_txt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
init <- file.path(d, "INIT_VMPA_Jan2015.nc")
fgs <- file.path(d, "SETasGroupsDem_NoCep.csv")
bboxes <- get_boundary(load_box(bgm = file.path(d, "VMPA_setas.bgm")))

bps <- load_bps(fgs = fgs, init = init)

# There are no values in the initial conditions file. Therefore atoutput is NA.
load_init_age(init = init, fgs = fgs, bboxes = bboxes,
              select_variable = "ResN",
              select_groups = "Planktiv_S_Fish")

load_init_age(init = init, fgs = fgs, bboxes = bboxes, select_variable = "ResN")
load_init_nonage(init = init, fgs = fgs, bboxes = bboxes, bps = bps,
   select_groups = "Megazoobenthos")
load_init_nonage(init = init, fgs = fgs, bboxes = bboxes, bps = bps)
load_init_stanza(init = init, fgs = fgs, bboxes = bboxes)
load_init_weight(init = init, fgs = fgs, bboxes = bboxes)

atlantistools documentation built on Aug. 16, 2017, 9:05 a.m.