This script is designed to produce raster maps of PFG simulated relative abundances for one (or several) specific FATE simulation year.

POST_FATE.relativeAbund(
  name.simulation,
  file.simulParam = NULL,
  years,
  opt.no_CPU = 1
)

Arguments

name.simulation

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

file.simulParam

default NULL.
A string corresponding to the name of a parameter file that will be contained into the PARAM_SIMUL folder of the FATE simulation

years

an integer, or a vector of integer, corresponding to the simulation year(s) that will be used to extract PFG abundance maps

opt.no_CPU

(optional) default 1.
The number of resources that can be used to parallelize the unzip/zip of raster files

Value

One result folder is created :

ABUND_REL_perPFG
_allStrata

containing relative abundance raster maps for each PFG across all strata

Details

This function allows to obtain, for a specific FATE simulation and a specific parameter file within this simulation, raster maps of PFG relative abundance.

For each PFG and each selected simulation year, raster maps are retrieved from the results folder ABUND_perPFG_allStrata and unzipped. Informations extracted lead to the production of the same number of raster before the maps are compressed again :

  • for each selected simulation year(s), relative abundances for all strata combined are calculated : $$\frac{abund_{\text{ PFG}_i\text{, }\text{Stratum}_{all}}} {abund_{\text{ PFG}_{all}\text{, }\text{Stratum}_{all}}}$$

These raster files can then be used by other functions :

Author

Maya Guéguen

Examples


if (FALSE) {                      
POST_FATE.relativeAbund(name.simulation = "FATE_simulation"
                        , file.simulParam = "Simul_parameters_V1.txt"
                        , years = 850
                        , opt.no_CPU = 1)
                                    
POST_FATE.relativeAbund(name.simulation = "FATE_simulation"
                        , file.simulParam = "Simul_parameters_V1.txt"
                        , years = c(850, 950)
                        , opt.no_CPU = 1)
}