FATE
simulationR/PRE_FATE.params_savingYears.R
PRE_FATE.params_savingYears.Rd
This script is designed to create a parameter file containing
simulation years at which the FATE
software must save rasters of
PFG abundances (as well as light and soil resources if these modules are
activated) and/or simulation objects.
PRE_FATE.params_savingYears(
name.simulation,
years.maps = NULL,
years.objects = NULL,
opt.folder.name = NULL
)
a string
corresponding to the main directory
or simulation name of the FATE
simulation
(optional)
a vector
of simulation years
at which PFG abundance maps will be saved
(as well as maps of
light and soil resources if these modules are activated)
(optional)
a vector
of simulation
years at which FATE
simulation state will be saved
(optional)
a string
corresponding
to the name of the folder that will be created into the
name.simulation/DATA/SAVE/
directory to store the results
Two .txt
files into the name.simulation/DATA/SAVE/
directory :
SAVE_YEARS_maps.txt
: one line for each simulation year for
which the raster maps are to be saved
SAVE_YEARS_objects.txt
: one line for each simulation year
for which the FATE
objects are to be saved
If the opt.folder.name
has been used, the files will be into the
folder name.simulation/DATA/SAVE/opt.folder.name/
.
FATE
software allows the user to save two different types of
outputs :
PFG abundance maps can be saved for all specified
simulation years.
It includes maps per PFG per strata
(ABUND_perPFG_perStrata
folder) and summary maps
per PFG for all height strata combined (ABUND_perPFG_allStrata
folder).
If the light and / or soil modules are activated (see
PRE_FATE.params_globalParameters
), maps for light and / or
soil resources are also saved.
Raster format used is depending on
input data format. It can be either .img
or .tif
.
using BOOST
library and its serialization
functions, FATE
is able to save a simulation at a specific
time. This object allows the user to restart a simulation from this
precise state by specifying its name within the Simul_parameters
file with the SAVED_STATE
flag (see
PRE_FATE.params_simulParameters
).
## Create a skeleton folder with the default name ('FATE_simulation') ------------------------
PRE_FATE.skeletonDirectory()
## Create a SAVE_year_maps or/and SAVE_year_objects parameter file ---------------------------
PRE_FATE.params_savingYears(name.simulation = 'FATE_simulation'
, years.maps = c(100, 150, 200)
, years.objects = 200)