This function loads Atlantis outputfiles (any netcdf file) and
converts them to a data.frame
.
load_nc( nc, fgs, bps, select_groups, select_variable, prm_run, bboxes, check_acronyms = TRUE, warn_zeros = FALSE, report = TRUE )
nc | Character string giving the connection of the netcdf file to read in.
The filename usually contains |
---|---|
fgs | Character string giving the connection to the functional groups file.
The filename usually contains |
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
|
select_groups | Character vector of funtional groups which shall be read in. Names have to match the ones used in the netcdf file. Check column "Name" in "functionalGroups.csv" for clarification. |
select_variable | Character value specifying which variable to load.
Only one variable of the options available (i.e., |
prm_run | Character string giving the connection of the run parameterfile.
The filename usually contains |
bboxes | Integer vector giving the box-id of the boundary boxes.
Can be created with |
check_acronyms | Logical testing if functional-groups in select_groups are inactive in the current model run. They will be omitted in the output. |
warn_zeros | Logical indicating if check for actual zeros in the
data shall be printed or not. Default is |
report | Logical indicating if progress bars shall be printed ( |
A data.frame
in long format with the following column names:
species, timestep, polygon, agecl, and atoutput (i.e., variable).
Other load functions:
load_box()
,
load_bps()
,
load_dietcheck()
,
load_fgs()
,
load_init_age()
,
load_init()
,
load_mort()
,
load_nc_physics()
,
load_rec()
,
load_spec_mort()
,
load_spec_pred_mort()
,
load_txt()
Alexander Keth
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools") nc <- file.path(d, "outputSETAS.nc") fgs <- file.path(d, "SETasGroupsDem_NoCep.csv") bps <- load_bps(init = file.path(d, "INIT_VMPA_Jan2015.nc"), fgs = fgs) bboxes <- get_boundary(boxinfo = load_box(bgm = file.path(d, "VMPA_setas.bgm"))) prm_run <- file.path(d, "VMPA_setas_run_fishing_F_Trunk.prm") test <- load_nc(nc = nc, bps = bps, fgs = fgs, prm_run = prm_run, bboxes = bboxes, select_groups = c("Planktiv_S_Fish", "Cephalopod", "Diatom"), select_variable = "ResN") test <- load_nc(nc = nc, bps = bps, fgs = fgs, prm_run = prm_run, bboxes = bboxes, select_groups = c("Planktiv_S_Fish", "Cephalopod", "Diatom"), select_variable = "Nums")