load_nc_annage: Load Atlantis annual age outputfiles (netcdf)

View source: R/load_nc_annage.R

load_nc_annageR Documentation

Load Atlantis annual age outputfiles (netcdf)

Description

This function loads Atlantis ANNAGEBIO and ANNAGECATCH outputfiles (netcdf) and converts them to a data.frame.

Usage

load_nc_annage(
  dir = getwd(),
  file_nc,
  file_fish,
  bps,
  fgs,
  biolprm,
  select_groups,
  select_variable = c("Nums", "Weight", "Catch", "Discard"),
  check_acronyms = TRUE,
  bboxes = c(0),
  verbose = FALSE
)

Arguments

dir

The directory of the atlantis model output, where the default is getwd().

file_nc

A character value giving the file name of the netcdf file you are trying to read in. The file should be located in your current working directory or the folder you specify in dir. The argument can also be specified as the full path name, just as long as argument dir is specified as NULL.

bps

A character vector of biomass pools as read in from load_bps. The biomass pools are not true biomass pools but all epibenthic groups from the functional groups file.

fgs

A data frame created by load_fgs that reads in the csv file containing functional group names, usually "functionalGroups.csv".

biolprm

A list of biological parameters available from the [...]_Biol.prm file, as read in by load_biolprm.

select_groups

Character vector of funtional groups to select. Names have to match the ones used in the ncdf file, and therefore must be in the column "Name" in the fgs.

select_variable

A character value spefifying which variable to return. loaded. Only one variable of the options available (i.e., c( "Nums", "Weight") ) can be loaded at a time.

check_acronyms

A logical, specifying if selected groups are active in the model run. This is used in automated runs. All groups are passed when plotting is called via batch-file, (which cannot be changed easily) this will result in errors if some groups are not active in the model run. By default this argument is TRUE.

bboxes

A vector of boundary boxes. The default value is c(0) because all Atlantis models must specify box zero as a boundary box. The boundary boxes can automatically be determined using get_boundary(load_box()).

verbose

A logical value specifying if output should be written to the screen or not. The default value is FALSE.

Value

A data.frame in long format with the following coumn names: Species, timestep, polygon, agecl, and atoutput (i.e., variable).

Author(s)

Alexander Keth, modified by Sarah Gaichas

See Also

get_boundary, load_box

Other load functions: load_agebioind(), load_bioind(), load_biolprm(), load_boxarea(), load_box(), load_bps(), load_catch(), load_detailed_diet_comp(), load_diet_comp(), load_fgs(), load_fisheries(), load_meta(), load_nc_catchtons(), load_nc(), load_runprm(), load_yoy()


r4atlantis/atlantisom documentation built on Nov. 12, 2023, 2:59 a.m.