Description Usage Arguments Details Value See Also Examples
View source: R/load-nc-physics.R
This function loads Atlantis outputfiles (netcdf) and converts them to a dataframe.
1 2 | load_nc_physics(nc, select_physics, prm_run, bboxes, aggregate_layers = FALSE,
warn_zeros = FALSE)
|
nc |
Character string giving the connection of the netcdf file to read in.
The filename usually contains |
select_physics |
Character vector of physical variables which shall be read in. Names have to match the ones used in the ncdf file. |
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 |
aggregate_layers |
Logical indicating if values for layers should be
aggregated ( |
warn_zeros |
Logical indicating if check for actual zeros in the
data shall be printed or not. Default is |
This functions converts the ATLANTIS output to a dataframe which can be processed in R.
A data.frame
in long format with the following column names:
variable, time, polygon, layer, and atoutput (i.e., variable).
Other load functions: load_box
,
load_bps
, load_dietcheck
,
load_fgs
, load_init_age
,
load_init
, load_nc
,
load_rec
, load_spec_mort
,
load_txt
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-becdev", package = "atlantistools")
nc <- file.path(d, "outputSETAS.nc")
prm_run <- file.path(d, "VMPA_setas_run_fishing_F_New.prm")
bboxes <- get_boundary(boxinfo = load_box(file.path(d, bgm = "VMPA_setas.bgm")))
select_physics <- c("salt", "NO3", "volume")
test <- load_nc_physics(nc, select_physics, prm_run, bboxes)
str(test)
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
nc <- file.path(d, "outputSETAS.nc")
prm_run <- file.path(d, "VMPA_setas_run_fishing_F_Trunk.prm")
bboxes <- get_boundary(boxinfo = load_box(file.path(d, bgm = "VMPA_setas.bgm")))
test <- load_nc_physics(nc, select_physics, prm_run, bboxes)
str(test)
test <- load_nc_physics(nc, select_physics = "nominal_dz", prm_run, bboxes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.