PRE_FATE.params_savingYears: Create _SAVE_ parameter files for a 'FATE' simulation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/PRE_FATE.params_savingYears.R

Description

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.

Usage

1
2
3
4
5
6
PRE_FATE.params_savingYears(
  name.simulation,
  years.maps = NULL,
  years.objects = NULL,
  opt.folder.name = NULL
)

Arguments

name.simulation

a string corresponding to the main directory or simulation name of the FATE simulation

years.maps

(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)

years.objects

(optional)
a vector of simulation years at which FATE simulation state will be saved

opt.folder.name

(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

Details

FATE software allows the user to save two different types of outputs :

Raster maps

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.

Model objects

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).

Value

Two .txt files into the name.simulation/DATA/SAVE/ directory :

If the opt.folder.name has been used, the files will be into the folder name.simulation/DATA/SAVE/opt.folder.name/.

Author(s)

Maya Guéguen

See Also

PRE_FATE.skeletonDirectory, PRE_FATE.params_globalParameters

Examples

1
2
3
4
5
6
7
## 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)

MayaGueguen/RFate documentation built on Oct. 17, 2020, 8:06 a.m.