run_truth | R Documentation |
Reads in data generated from an Atlantis scenario and returns a list
containing the desired information. The list contains the 'truth' as known
from the Atlantis scenario. The truth can later be sampled
from to create a data set with observation error.
Currently, the run_truth
depends on the following files
being in your working directory (dir
):
"functionalGroups.csv"
"[...]TOTCATCH.nc"
"[...]DietCheck.txt"
,
where [...] specifies the entry used for the scenario
argument.
run_truth(
scenario,
dir = getwd(),
file_fgs,
file_bgm,
select_groups,
file_init,
file_biolprm,
file_runprm,
file_fish,
verbose = FALSE,
save = TRUE,
annage = FALSE
)
scenario |
A character value, specifying the Atlantis scenario name.
More specifically the name which Atlantis uses to name all of the
output files. The value will be used to search for files specified in
|
dir |
The directory of the atlantis model output, where the
default is |
file_fgs |
A character value specifying the file name of the Atlantis
functional groups file. The file should be located in your current working
directory or the folder you specify in |
file_bgm |
A character value specifying the file name of a |
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 |
file_init |
A character value giving the file name of the intial conditions
file. The file should be located in your current working directory or the
folder you specify in |
file_biolprm |
A character value giving the file name of the biology
|
file_runprm |
A character value giving the file name of the biology
|
verbose |
A logical value specifying if output should be written
to the screen or not. The default value is |
A |
logical value specifying if the function should save the output
to the disk or not. The default is |
Returns a list object.
Sean Lucey, Kelli Faye Johnson
d <- system.file("extdata", "SETAS_Example", package = "atlantisom")
groups <- load_fgs(dir = d, "Functional_groups.csv")
truth <- run_truth(scenario = "outputs",
dir = d,
file_fgs = "Functional_groups.csv",
file_bgm = "Geography.bgm",
select_groups = groups[groups$IsTurnedOn > 0, "Name"],
file_init = "Initial_condition.nc",
file_biolprm = "Biology.prm",
file_runprm = "Run_settings.xml",
file_fish = "Fisheries.csv")
str(truth)
rm(truth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.