View source: R/PRE_FATE.params_changingYears.R
PRE_FATE.params_changingYears | R Documentation |
FATE
simulationThis script is designed to create several parameter files to manage the update of simulation maps : 1) simulation years at which the maps should be changed ; 2) filenames corresponding to the new simulation maps to be used.
PRE_FATE.params_changingYears(
name.simulation,
type.changing,
mat.changing,
opt.folder.name = NULL
)
name.simulation |
a |
type.changing |
a
|
mat.changing |
a |
opt.folder.name |
(optional) |
Several modules of the FATE
software allow the user to simulate
changes over time :
the core module is based on a raster mask given
within the Simul_parameters file with the MASK
flag (see
PRE_FATE.params_simulParameters
), with either
0
or 1
within each pixel, 1
corresponding to the
cells in which the PFG can try to colonize. The available pixels can
change through time, to simulate habitat loss (e.g. urbanization) or gain
(e.g. glacial retreat).
if this module is activated (see
PRE_FATE.params_globalParameters
), PFG colonization depends
on maps given for each PFG within the Simul_parameters file with
the PFG_HAB_MASK
flag (see
PRE_FATE.params_simulParameters
).
These maps must
contain values between 0
and 1
corresponding to the
probability of presence of the PFG in each pixel. These probabilities
can change through time, as they often come from Species Distribution
Models (SDM) that can be based for example on climatic variables (e.g.
simulating regional warming).
if this module is activated (see
PRE_FATE.params_globalParameters
), each disturbance relies
on a raster given within the Simul_parameters file with the
DIST_MASK
flag (see PRE_FATE.params_simulParameters
).
As for succession, this mask is filled with either 0
or 1
to define where the perturbation occurs. The impacted pixels
can also change through time (e.g. change in forestry practices, expansion
of grazing areas, etc).
if this module is activated (see
PRE_FATE.params_globalParameters
), drought disturbance
relies on a raster given within the Simul_parameters file with the
DROUGHT_MASK
flag (see
PRE_FATE.params_simulParameters
).
This map contains values defining the drought intensity experienced by
the area. This intensity can change through time and space (e.g. regional
warming, extreme years, change in agriculture practices that can leave a
place more exposed, etc).
if this module is activated (see
PRE_FATE.params_globalParameters
), aliens introduction
depends on maps given for each alien within the Simul_parameters
file with the PFG_ALIENS_MASK
flag (see
PRE_FATE.params_simulParameters
).
As for succession, these masks are filled with either 0
or 1
to define where the introductions occur. The impacted pixels
can also change through time (e.g. colonization, eradication campaign,
etc), as well as the frequencies of introduction (see ALIENS_FREQ
flag in PRE_FATE.params_globalParameters
).
if this module is activated (see
PRE_FATE.params_globalParameters
), fire disturbance
can rely on a raster given within the Simul_parameters file with
the FIRE_MASK
flag (see
PRE_FATE.params_simulParameters
).
As for succession, this mask is filled with either 0
or 1
to define where the perturbation occurs. The impacted pixels
can also change through time (e.g. change in forestry practices, expansion
of drought events, etc), as well as the frequencies of perturbations (see
FIRE_FREQ
flag in PRE_FATE.params_globalParameters
).
Several parameters, given within mat.changing
, are required to set up
these temporal changes :
all simulation years at which the raster files of a specific
module (succession MASK
, habitat suitability HABSUIT
,
disturbance DIST
, drought DROUGHT
, aliens introduction
ALIENS
or ALIENS_F
, fire FIRE
or FIRE_F
) will
be changed
the names of the new raster files for each year of
change. It can be either .img
or .tif
.
There is an exception if ALIENS_F
or FIRE_F
is selected :
the values should be integer
representing the frequencies of aliens
introduction or fire perturbations.
an integer
associated to each new map in order to
always give the raster maps in the same order throughout the years
Several ‘.txt’ files into the
name.simulation/DATA/SCENARIO/
:
..type.changing..‘.changingmask_years.txt’ : one line for each simulation year
..type.changing..‘.changingmask_files_t’..year..‘.txt’ :
one line for each new raster file
OR
..type.changing..‘.changingfreq_years.txt’ : one line for each simulation year
..type.changing..‘.changingfreq_files_t’..year..‘.txt’ :
one line for each new frequency
If the opt.folder.name
has been used, the files will be into the folder
name.simulation/DATA/SCENARIO/opt.folder.name/
.
Maya Guéguen
PRE_FATE.skeletonDirectory
,
PRE_FATE.params_globalParameters
,
PRE_FATE.params_PFGdisturbance
## Create a skeleton folder with the default name ('FATE_simulation') ------------------------
PRE_FATE.skeletonDirectory()
tab.changing = data.frame(year = c(50,50,80,80)
, order = c(1,2,1,2)
, new.value = c('FATE_simulation/DATA/MASK/MASK_DIST1_50.tif'
, 'FATE_simulation/DATA/MASK/MASK_DIST2_50.tif'
, 'FATE_simulation/DATA/MASK/MASK_DIST1_80.tif'
, 'FATE_simulation/DATA/MASK/MASK_DIST2_80.tif'))
## Create a Changing_times parameter file ----------------------------------------------------
PRE_FATE.params_changingYears(name.simulation = 'FATE_simulation'
, type.changing = 'DIST'
, mat.changing = tab.changing)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.