| Title: | matreex: Simulation IPM for forest dynamic depending on climatic variables from Kunstler et al (2020) |
|---|---|
| Description: | The goal of this package is to run integrated projection models of tree species in single or multi-specific density dependence context. The simulations return the size distribution dynamics along time. These models can be completed with different harvest and disturbance models and be runned untile equilibrium. |
| Authors: | Maxime Jaunatre [aut, cre, trl] (ORCID: <https://orcid.org/0009-0002-2816-1677>), Julien Barrere [aut] (ORCID: <https://orcid.org/0000-0002-6686-726X>), Thomas Cordonnier [aut] (ORCID: <https://orcid.org/0000-0003-3684-4662>), Arnaud Guyennon [aut] (ORCID: <https://orcid.org/0000-0003-2178-3801>), Bjoern Reineking [aut] (ORCID: <https://orcid.org/0000-0001-5277-9181>), Laura Touzot [aut] (ORCID: <https://orcid.org/0000-0003-0445-554X>), INRAE [cph], Georges Kunstler [aut] (ORCID: <https://orcid.org/0000-0002-2544-1940>) |
| Maintainer: | Maxime Jaunatre <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.0 |
| Built: | 2026-05-29 09:18:05 UTC |
| Source: | https://forge.inrae.fr/lessem/rpackages/matreex |
Climate defined per species from Kunstler et al. 2021. Each species had its IPM integrated for 3 climates :
hot edge
optimum climate for the species
cold edge
climate_speciesclimate_species
An object of class data.frame with 81 rows and 11 columns.
Climate was defined from sgdd and wai variables.
https://doi.org/10.1111/1365-2745.13533
Get climatic values in matreex class object
climatic(x)climatic(x)
x |
matreex class object. Used on ipm and species at this time. |
Apply correction to a matrix by setting to 0 all right and bottom values
correction(x, correction = "none")correction(x, correction = "none")
x |
an object that require a correction addition |
correction |
Type of correction, match between cut and none (default). chr. |
Default disturbance function
def_disturb(x, species, disturb = NULL, ...)def_disturb(x, species, disturb = NULL, ...)
x |
population state distribution at time t |
species |
The species class object of interest to get mesh and RDIcoef values from. RDIcoef is a one line dataframe with RDI coefficient for one species. |
disturb |
Disturbance parameters. Highly depend on the disturbance impact parameters given to the species. |
... |
Default disturbance function does not require |
Constant rate harvest of 0.06 percent per year (check if harvest frequence is 1 in forest object).
def_harv(x, species, ...)def_harv(x, species, ...)
x |
population state at time t |
species |
ignored |
... |
Variables used in this case of Uneven harvest
|
This function is the default function for harvest_fun function of
a species and always takes arguments x, species plus specific
argument from different harvest models..
Distribution of population to harvest. Values are between 0 (null harvest) and Xi.
Other functions that defines harvest rules for a species.:
Even_harv(),
Uneven_harv(),
species()
The population will initiate with a random distribution to match a basal area of 1.
def_init(mesh, SurfEch = 0.03)def_init(mesh, SurfEch = 0.03)
mesh |
all possible states of a population, based on an IPM. Minimal and maximal values are respectively U and L, for a total number of m states. |
SurfEch |
Value of plot size surface in |
This function is the default function for init_pop function of a species
and always takes arguments mesh and SurfEch.
Other functions for initiating species population during simulation:
def_initBA(),
def_init_even(),
def_init_k(),
species()
The population will initiate with only individual in the 5 first cells of the mesh.
def_init_even(mesh, SurfEch = 0.03)def_init_even(mesh, SurfEch = 0.03)
mesh |
all possible states of a population, based on an IPM. Minimal and maximal values are respectively U and L, for a total number of m states. |
SurfEch |
Value of plot size surface in |
Other functions for initiating species population during simulation:
def_initBA(),
def_init_k(),
def_init(),
species()
Init population with precise distribution
def_init_k(x)def_init_k(x)
x |
Distribution to draw systematically. This distribution should
be composed of values in |
The resulting function will check if the provided vector is the same length as mesh.
Function similar def_init but with no random effect anymore.
Other functions for initiating species population during simulation:
def_initBA(),
def_init_even(),
def_init(),
species()
This function modify the def_init function to start at a given BA with the same process of random distribution.
def_initBA(BA = 1, fun = c("def_init", "def_init_even"))def_initBA(BA = 1, fun = c("def_init", "def_init_even"))
BA |
Basal area targeted. This single value must be above 0 but can be very close (minimal accepted value is 1e-10) |
fun |
Function to modify, single chr in choices. |
Function similar to def_init
Other functions for initiating species population during simulation:
def_init_even(),
def_init_k(),
def_init(),
species()
Add delay states to an existing pop_state class object or an ipm class object.
delay(x, delay = 0)delay(x, delay = 0)
x |
an object that require a delay addition |
delay |
the number of time delay to add. single int. Its possible to give negative values to remove delay from previously delayed objects. However final delay must be positive (0 is acceptable). |
This function is a method that call delay.ipm internal function.
Adding a topleft corner to a matrix filled with 0.
## S3 method for class 'dgCMatrix' delay(x, delay = 0)## S3 method for class 'dgCMatrix' delay(x, delay = 0)
x |
an object that require a delay addition |
delay |
the number of time delay to add. single int. Its possible to give negative values to remove delay from previously delayed objects. However final delay must be positive (0 is acceptable). |
x <- new("dtCMatrix", i = c(0L, 1L, 2L, 1L, 2L, 2L), p = c(0L, 3L, 5L, 6L), Dim = c(3L, 3L), x = c(0.1, 0.2, 0.3, 0.1, 0.2, 0.1), uplo = "L", diag = "N") x <- delay(x, 2) delay(x, -1)x <- new("dtCMatrix", i = c(0L, 1L, 2L, 1L, 2L, 2L), p = c(0L, 3L, 5L, 6L), Dim = c(3L, 3L), x = c(0.1, 0.2, 0.3, 0.1, 0.2, 0.1), uplo = "L", diag = "N") x <- delay(x, 2) delay(x, -1)
Adding a topleft corner to a matrix filled with 0.
## S3 method for class 'dsCMatrix' delay(x, delay = 0)## S3 method for class 'dsCMatrix' delay(x, delay = 0)
x |
an object that require a delay addition |
delay |
the number of time delay to add. single int. Its possible to give negative values to remove delay from previously delayed objects. However final delay must be positive (0 is acceptable). |
x <- new("dtCMatrix", i = c(0L, 1L, 2L, 1L, 2L, 2L), p = c(0L, 3L, 5L, 6L), Dim = c(3L, 3L), x = c(0.1, 0.2, 0.3, 0.1, 0.2, 0.1), uplo = "L", diag = "N") x <- delay(x, 2) delay(x, -1)x <- new("dtCMatrix", i = c(0L, 1L, 2L, 1L, 2L, 2L), p = c(0L, 3L, 5L, 6L), Dim = c(3L, 3L), x = c(0.1, 0.2, 0.3, 0.1, 0.2, 0.1), uplo = "L", diag = "N") x <- delay(x, 2) delay(x, -1)
Adding a topleft corner to a matrix filled with 0.
## S3 method for class 'dtCMatrix' delay(x, delay = 0)## S3 method for class 'dtCMatrix' delay(x, delay = 0)
x |
an object that require a delay addition |
delay |
the number of time delay to add. single int. Its possible to give negative values to remove delay from previously delayed objects. However final delay must be positive (0 is acceptable). |
x <- new("dtCMatrix", i = c(0L, 1L, 2L, 1L, 2L, 2L), p = c(0L, 3L, 5L, 6L), Dim = c(3L, 3L), x = c(0.1, 0.2, 0.3, 0.1, 0.2, 0.1), uplo = "L", diag = "N") x <- delay(x, 2) delay(x, -1)x <- new("dtCMatrix", i = c(0L, 1L, 2L, 1L, 2L, 2L), p = c(0L, 3L, 5L, 6L), Dim = c(3L, 3L), x = c(0.1, 0.2, 0.3, 0.1, 0.2, 0.1), uplo = "L", diag = "N") x <- delay(x, 2) delay(x, -1)
Species disturbance parameters.
disturb_coefdisturb_coef
An object of class data.frame with 64 rows and 10 columns.
https://doi.org/10.1111/gcb.16630
Disturbance function
disturb_fun(x, species, disturb = NULL, ...)disturb_fun(x, species, disturb = NULL, ...)
x |
population state distribution at time t |
species |
The species class object of interest to get mesh and RDIcoef values from. RDIcoef is a one line dataframe with RDI coefficient for one species. |
disturb |
Disturbance parameters. Highly depend on the disturbance impact parameters given to the species. |
... |
Not used in this case.
|
Delayed mesh cells takes the value of the minimal mesh size.
Disturbance function
disturb_fun_mixt(x, species, disturb = NULL, ...)disturb_fun_mixt(x, species, disturb = NULL, ...)
x |
population state distribution at time t |
species |
The species class object of interest to get mesh and RDIcoef values from. RDIcoef is a one line dataframe with RDI coefficient for one species. |
disturb |
Disturbance parameters. Highly depend on the disturbance impact parameters given to the species. |
... |
Not used in this case.
|
Delayed mesh cells takes the value of the minimal mesh size.
Perform the harvest Even
Even_harv(x, species, ...)Even_harv(x, species, ...)
x |
population state distribution at time t |
species |
The species class object of interest to get mesh and RDIcoef values from. RDIcoef is a one line dataframe with RDI coefficient for one species. |
... |
Variables used in this case of Uneven harvest
|
Even harvest is done at the stand level with the getPcutEven function to acomodate with the multispecific case.
Other functions that defines harvest rules for a species.:
Uneven_harv(),
def_harv(),
species()
Reformated fitted models from Kunstler et al. 2021. Each species is fitted for growth, survival and recruitment along climatic conditions based on sgdd and wai. All objects were modified with the oldfit2fit function from this package.
fit_species lag_species fit_Abies_alba fit_Acer_campestre fit_Acer_pseudoplatanus fit_Alnus_glutinosa fit_Betula fit_Carpinus_betulus fit_Fagus_sylvatica fit_Fraxinus_excelsior fit_Juniperus_thurifera fit_Larix_decidua fit_Picea_abies fit_Pinus_halepensis fit_Pinus_nigra fit_Pinus_pinaster fit_Pinus_pinea fit_Pinus_sylvestris fit_Pinus_uncinata fit_Populus_tremula fit_Prunus_padus fit_Quercus_faginea fit_Quercus_ilex fit_Quercus_petraea fit_Quercus_pubescens fit_Quercus_pyrenaica fit_Quercus_robur fit_Quercus_suber fit_Salix_capreafit_species lag_species fit_Abies_alba fit_Acer_campestre fit_Acer_pseudoplatanus fit_Alnus_glutinosa fit_Betula fit_Carpinus_betulus fit_Fagus_sylvatica fit_Fraxinus_excelsior fit_Juniperus_thurifera fit_Larix_decidua fit_Picea_abies fit_Pinus_halepensis fit_Pinus_nigra fit_Pinus_pinaster fit_Pinus_pinea fit_Pinus_sylvestris fit_Pinus_uncinata fit_Populus_tremula fit_Prunus_padus fit_Quercus_faginea fit_Quercus_ilex fit_Quercus_petraea fit_Quercus_pubescens fit_Quercus_pyrenaica fit_Quercus_robur fit_Quercus_suber fit_Salix_caprea
An object of class character of length 27.
An object of class numeric of length 27.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
An object of class fit_sgr of length 4.
The fit_species dataset contains the vector of species stored with the package. The lag_species dataset contains the vector of default delay for each species.
The lag was computed by Kunstler and missing values for Betula, Juniperus_thurifera, Prunus_padus, Quercus_faginea and Quercus_pyrenaica are set with the mean of other species. More details is given in https://github.com/gowachin/matreex/issues/10
https://doi.org/10.1111/1365-2745.13533
Species are defined by an IPM which is a transition matrix from size between t and t+1, recruitment and harvest functions. Each species has these items defined for a given climate. An additionnal vector of harvest parameers is required with minimal size to harvest (dth), size above wich harvest is constant (dha).
fit_sgr( sv_params, sv_family, gr_params, gr_sigma, rec_params, species, max_dbh, delay )fit_sgr( sv_params, sv_family, gr_params, gr_sigma, rec_params, species, max_dbh, delay )
sv_params |
Named vector of survival parameters fitted for this species and climatic condition. Minimal parameters are intercept and size. |
sv_family |
Family list contain the details of the models used when fitting by functions such as glm. Only the inverse of the link function (linkinv) is used in the model for now. list. |
gr_params |
Named vector of growth parameters fitted for this species and climatic condition. Minimal parameters are intercept and size. |
gr_sigma |
Standard deviation of the residuals for the growth fitted model. |
rec_params |
Named vector of growth parameters fitted for this species and climatic condition. Minimal parameters are intercept, BATOTSP and BATOTNonSP. |
species |
Name of the species to run simulation on. Single char. |
max_dbh |
Maximum diameter of the fitted dataset. Single dbl. |
delay |
Delay for the species. Single dbl. |
A forest is a group of one of multiple species to silumate along time using the IPM defined for each species and harvest rules.
forest( species = list(), harv_rules = c(Pmax = 0.25, dBAmin = 3, freq = 1, alpha = 1), favoured_sp = c() )forest( species = list(), harv_rules = c(Pmax = 0.25, dBAmin = 3, freq = 1, alpha = 1), favoured_sp = c() )
species |
List of species created with matreex package. |
harv_rules |
Vector for harvest rules at the scale of the forest.
|
favoured_sp |
Logical named vector to tell if species are favoured during Uneven harvesting or not. If not NULL, the species names should be the same as in the species list. |
Get the max_dbh of a fitted species
get_maxdbh(x)get_maxdbh(x)
x |
matreex class object. Used on fit_sgr for now. |
Extract the IPM matrix needed during simulation for a given BA and optionally climate.
get_step_IPM(x, ...)get_step_IPM(x, ...)
x |
IPM or mu_gr class object. |
... |
Variables used depending on the class of x.
|
Methods are set for IPM objects and mu_gr. Only the second one require to give the climate and simulation correction to apply to the matrix.
Integrate IPM for growth and survival function at a specific climate for a species on a basal area variation.
make_IPM( species, climate, clim_lab, fit, mesh = c(m = 700, L = 90, U = 1500), BA = 0:100, correction = c("none", "constant", "ceiling", "sizeExtremes"), level = 420, diag_tresh = 50, midbin_tresh = 25, mid_level = 5, year_delta = 1, IsSurv = TRUE, delay = NULL, verbose = FALSE )make_IPM( species, climate, clim_lab, fit, mesh = c(m = 700, L = 90, U = 1500), BA = 0:100, correction = c("none", "constant", "ceiling", "sizeExtremes"), level = 420, diag_tresh = 50, midbin_tresh = 25, mid_level = 5, year_delta = 1, IsSurv = TRUE, delay = NULL, verbose = FALSE )
species |
The species names to be registered in the object |
climate |
Named vector of the environmental variables used in the fitted model. Was data_plot_pred before. |
clim_lab |
Label for climatic used. This values will be matched when simulating multiple species together. |
fit |
Fitted model for growth and survival of the species and climate given. Functions will depend on size and basal area. |
mesh |
vector of mesh variables. m is the number of bins, L is the
minimum size and U the maximum size. h will be defined in the function as
|
BA |
Vector of basal area to integrate on. Integrating on 0 is important so use it. Integrating above 200 is absurd. |
correction |
Correction to apply to the IPM matrix for eviction. Choices none (default), constant, ceiling and sizeExtremes. |
level |
Number of point to use for integration in a cell during Gauss-Legendre integration. This value will be divided by 3 since size t is integrated at level = 3 and size t+1 at level = level/3. single int (default 420). |
diag_tresh |
Threshold for Gauss-Legendre integration, which a distance to the diagonal. Number of cell integrated is the number of cell for which size t+1 - size t is inferior to this threshold. single dbl (default 50). |
midbin_tresh |
Number of cells external to the GL integration to integrate with the mid bin method. |
mid_level |
Number of point to use for integration in a cell during mid bin integration. |
year_delta |
Number of year between 2 obersavtion when using this model. default 1, single int. NOTE : value for dev usage only ! |
IsSurv |
Adding survival to the IPM. Set to FALSE is useful to test for eviction of the model. TRUE by default. |
delay |
the number of time delay to add. By default, it will use
the delay stored in the |
verbose |
Print message. FALSE by default |
The check between climate variables and fitted variable will assert if all variables in the model are provided expect variables derived from "size" (size, size2, logsize), "intercept" and "BATOTcomp". An error will be triggered if the climate variable is missing.
One can desactivate each kind of integration with some treshold values. A negative value in diag_tresh (ex: -1) will cancel the Gauss-Legendre integration and a midbin_tresh null value (ex: 0) will cancel the midbin integration.
Integrate IPM for growth and survival function at a specific climate for a species on a basal area variation.
make_mu_gr( species, fit, climate = NULL, mesh = c(m = 700, L = 90, U = 1500), BA = 0:200, correction = c("none", "constant", "ceiling", "sizeExtremes"), stepMu = 0.001, level = c(3, 140), diag_tresh = 50, midbin_tresh = 25, mid_level = 5, year_delta = 1, IsSurv = TRUE, verbose = FALSE )make_mu_gr( species, fit, climate = NULL, mesh = c(m = 700, L = 90, U = 1500), BA = 0:200, correction = c("none", "constant", "ceiling", "sizeExtremes"), stepMu = 0.001, level = c(3, 140), diag_tresh = 50, midbin_tresh = 25, mid_level = 5, year_delta = 1, IsSurv = TRUE, verbose = FALSE )
species |
The species names to be registered in the object |
fit |
Fitted model for growth and survival of the species and climate given. Functions will depend on size and basal area. |
climate |
Climate table for the species.
Optionnal if the species is defined in the package.
The format is climatic variable
in column and different climate by row. An example is in the package with
|
mesh |
vector of mesh variables. m is the number of bins, L is the
minimum size and U the maximum size. h will be defined in the function as
|
BA |
Vector of basal area to integrate on. Integrating on 0 is important so use it. Integrating above 200 is absurd. |
correction |
Correction to apply to the IPM matrix for eviction. Choices constant (default), ceiling, sizeExtremes and none. |
stepMu |
Step between each mu in the species range. This value has effect simulation. Default is 1e-3. Values below 1e-5 takes longer than classical matrix integration. |
level |
Number of point to use for integration in a cell during Gauss-Legendre integration. This value will be divided by 3 since size t is integrated at level = 3 and size t+1 at level = level/3. single int (default 420). |
diag_tresh |
Threshold for Gauss-Legendre integration, which a distance to the diagonal. Number of cell integrated is the number of cell for which size t+1 - size t is inferior to this threshold. single dbl (default 50). |
midbin_tresh |
Number of cells external to the GL integration to integrate with the mid bin method. |
mid_level |
Number of point to use for integration in a cell during mid bin integration. |
year_delta |
Number of year between 2 obersavtion when using this model. default 1, single int. NOTE : value for dev usage only ! |
IsSurv |
Adding survival to the IPM. Set to FALSE is useful to test for eviction of the model. TRUE by default. |
verbose |
Print message. FALSE by defaul |
The check between climate variables and fitted variable will assert if all variables in the model are provided expect variables derived from "size" (size, size2, logsize), "intercept" and "BATOTcomp". An error will be triggered if the climate variable is missing.
One can desactivate each kind of integration with some treshold values. A negative value in diag_tresh (ex: -1) will cancel the Gauss-Legendre integration and a midbin_tresh null value (ex: 0) will cancel the midbin integration.
This is a working function to test faster integration but it integrate a ba value
This package is developped for LESSEM internal users only. It allow to run simulation from IPM and NFI datasets.
Fill the package description !
load old fitted models
old_fit2fit(species, path = here(), replicat = 42, mean = FALSE)old_fit2fit(species, path = here(), replicat = 42, mean = FALSE)
species |
Name of the species to run simulation on. Single char. |
path |
Place to save the resulting file. Single Char. |
replicat |
Numeric for the simulation to select. By default, the 42th. |
mean |
Should the return element be a mean of all models or a single value. FALSE by default, TRUE will ignore replicat argument |
Read old ipm and put them in the new class format.
old_ipm2forest(sp_name, climatic = 1, path = here(), replicat = 42)old_ipm2forest(sp_name, climatic = 1, path = here(), replicat = 42)
sp_name |
Name of the species to add in a single forest object. char. |
climatic |
Vector of climatic situations to run on. IPM must exist for each one or else this climatic value will be skipped. int. |
path |
Place to save the resulting file. Single Char. |
replicat |
Numeric for the simulation to select. By default, the 42th. |
Read old ipm and put them in the new species class format.
old_ipm2species( species, climatic = 1, path = here(), replicat = 42, harvest = def_harv, disturb = def_disturb, init_pop = def_init, delay = 0 )old_ipm2species( species, climatic = 1, path = here(), replicat = 42, harvest = def_harv, disturb = def_disturb, init_pop = def_init, delay = 0 )
species |
Name of the species to load. Single char. |
climatic |
Numeric that coded old climatic state. int. |
path |
Place to load the previous IPM file. Single Char. |
replicat |
Numeric for the model to select. By default, the 42th. |
harvest |
Function to impact the population with harvest rule.
Argument must be |
disturb |
Function to impact the population with possibles
disturbances. Extra care is needed to give this function all needed parameters/
Default is |
init_pop |
Function to initiate the population at simulation start.
Arguments must be |
delay |
Number of year delay between the recruitment of an individual
and it's inclusion in the IPM. This will enlarge the IPM and add sub diagonal
values of 1. See |
Compute the quadratic mean diameter for a given size distribution.
QMD(size, n)QMD(size, n)
size |
Size class vector of the following distribution. dbl vector |
n |
population state distribution at time t. dbl vector. |
Both input share the same length.
Species Rdi intercept and slope.
rdi_coefrdi_coef
An object of class data.frame with 28 rows and 4 columns.
Missing values for Quercus faginea from french NFI
Personnal contact with Patrick Vallet
Simulate a population size state during times.
The state at time is dependent on state at time and
the projection matrix (IPM).
The simulation will run until and if the equilibrium is not reached,
it will continue. Only simulation in , and equilibrium
state are returned.
sim_deter_forest( Forest, tlim = 3000, equil_dist = 250, equil_diff = 1, equil_time = 10000, harvest = c("default", "Uneven", "Even", "Favoured_Uneven"), targetBA = 20, targetRDI = 0.9, targetKg = 0.9, final_harv = 100, climate = NULL, disturbance = NULL, correction = "none", SurfEch = 0.03, verbose = FALSE )sim_deter_forest( Forest, tlim = 3000, equil_dist = 250, equil_diff = 1, equil_time = 10000, harvest = c("default", "Uneven", "Even", "Favoured_Uneven"), targetBA = 20, targetRDI = 0.9, targetKg = 0.9, final_harv = 100, climate = NULL, disturbance = NULL, correction = "none", SurfEch = 0.03, verbose = FALSE )
Forest |
Group of species that each contains IPM for deterministic
transition for |
tlim |
Number of simulation iterations (years) in the future. single int. |
equil_dist |
Number of last n time for which the range difference
should not exceed |
equil_diff |
Difference threshold of the basal area under which equilibrium is assumed. single real. |
equil_time |
Total maximum time simulation allowed in equilibrium research. Must be higher or equal to tlim and equil_dist. single int. |
harvest |
Choice of harvest rules between default, Uneven and Even. This indicate what settings will be used. See Details. |
targetBA |
BA value per ha that is targeted when using uneven harvesting.
Single numeric in |
targetRDI |
RDI value that is targeted when using even harvesting. RDI is the ratio between the number of trees and the maximum number of trees given the self-thinning boundary for the corresponding mean diameter and species. |
targetKg |
Kg value that is targeted when using even harvesting. Kg is the ratio between mean quadratic diameter of killed trees and mean quadratic diameter of trees before harvesting. |
final_harv |
Final harvest time used when |
climate |
Optional, climate matrix if climate variation along time is needed. Climate variation rely on species created with mu_gr class objects. This matrix require as many rows as time steps until equil_time. If the climate does not variate, a single row can given and will be reused. |
disturbance |
|
correction |
Choice of correction of the IPM between |
SurfEch |
Value of plot size surface in ha |
verbose |
Print message. FALSE by default |
At each iteration, the basal area is evaluated to select the corresponding IPM matrix.
Basic simulations input are illustrated in the main vignette. The harvesting scenario and theory is explained in the harvesting vignette.
Data.frame with long tidyverse format : a row for each observation and a column per variable. Columns are listed below, some may contains NA values, as for example species when there is a non-specific variable (BA).
Name of the species.
Variable of interest
Time step of the simulation. If the equilibrium is the last
time in tlim input, this time will occur twice in the table.
Mesh class number, from 1 to n class.
Size corresponding to the mesh class.
Logical if this time step is the equilibrium or last step of simulation
Numeric values of the variables.
The variables are :
Distribution of density by mesh along time per ha.
Sum of density per ha. (colSums for n)
Basal area of the population per ha and species
Basal area of the population per ha and species when excluding size class below dth. See Harvesting vignette.
Distribution of harvest density by mesh along time per ha.
Sum of harvested density per ha. (colSums for h)
Compute RDI and Kg from simulations output
sim_rdikg(sim, rdi_c = NULL)sim_rdikg(sim, rdi_c = NULL)
sim |
simulation output table. |
rdi_c |
rdic coefficients for all species. Named vector. If NULL (default, the values are taken from matreex::rdi_coef) |
List the species in matreex class object
sp_name(x)sp_name(x)
x |
matreex class object. Used on ipm and species at this time. |
Get species recruitment function
sp_rec(x, climatic, regional = FALSE)sp_rec(x, climatic, regional = FALSE)
x |
Species to get the recruitment function from |
climatic |
Climate vector is needed for mu_gr object to build the corresponding recruitment function. |
regional |
TRUE/FALSE if we want to use a regional BA for fecundity. |
Species are defined by an IPM which is a transition matrix from size between t and t+1, recruitment and harvest functions (see Details). Each species has these items defined for a given climate. An additionnal vector of harvest parameters is required with minimal size to harvest (dth), size above wich harvest is constant (dha).
species( IPM, init_pop = def_init, harvest_fun = def_harv, disturb_fun = def_disturb, harv_lim = c(dth = 175, dha = 575, hmax = 1), rdi_coef = NULL, disturb_coef = NULL, type = c("Undefined", "Broadleaf", "Coniferous") )species( IPM, init_pop = def_init, harvest_fun = def_harv, disturb_fun = def_disturb, harv_lim = c(dth = 175, dha = 575, hmax = 1), rdi_coef = NULL, disturb_coef = NULL, type = c("Undefined", "Broadleaf", "Coniferous") )
IPM |
ipm class object from the matreex package. |
init_pop |
Function to initiate the population at simulation start.
Arguments must be |
harvest_fun |
Function to impact the population with harvest rule.
Argument must be |
disturb_fun |
Function to impact the population with possibles
disturbances. Extra care is needed to give this function all needed
parameters. Default is |
harv_lim |
Limits of harvest for a population size distribution.
|
rdi_coef |
Coefficient for RDI curve used in even harvest. The model require the intercept and slope. |
disturb_coef |
Species coefficient for disturbance reaction. These
values and names are highly dependent on the disturbance function.
|
type |
Type of the tree, choosing between "Broadleaf" and "Coniferous". This value is only used during biotic disturbance with a specific disturb_fun. This is experimental |
A species is defined by an IPM that is an integrated prediction matrix for growth and survival functions of the species. Since the species has other functions defined, they are accessible and editable.
init_popFunction to initiate a new population. Default is
def_init.
recruit_funFunction that give a distribution for recruits.
The default is defined from models associated with the IPM
(x$IPM$rec) but it's possible to replace it. For example you can
nullify the recruitment to simulate extinction.
harvest_funFunction that give harvest density distribution
when an harvest event occurs (this frequence is set at the forest scale.).
The default function is def_harv with a constant
harvest rate of 0.6 percent. Other functions are
Uneven_harv and Even_harv.
Other functions for initiating species population during simulation:
def_initBA(),
def_init_even(),
def_init_k(),
def_init()
Other functions that defines harvest rules for a species.:
Even_harv(),
Uneven_harv(),
def_harv()
Additionnal argument :
skip the first line. FALSE by default.
## S3 method for class 'ipm' summary(object, ...)## S3 method for class 'ipm' summary(object, ...)
object |
Ipm object. |
... |
Dots are dots. |
This function is not written yet.
## S3 method for class 'mu_gr' summary(object, ...)## S3 method for class 'mu_gr' summary(object, ...)
object |
Ipm object. |
... |
Dots are dots. |
Additionnal argument :
Print IPM summary. TRUE by default.
## S3 method for class 'species' summary(object, ...)## S3 method for class 'species' summary(object, ...)
object |
Ipm object. |
... |
Dots are dots. |
Species type.
tree_typetree_type
An object of class data.frame with 28 rows and 2 columns.
Maxime Jaunatre
Perform the harvest Uneven
Uneven_harv(x, species, ...)Uneven_harv(x, species, ...)
x |
population state distribution at time t |
species |
The species class object of interest to get mesh and harv_lim values from. |
... |
Variables used in this case of Uneven harvest
|
Other functions that defines harvest rules for a species.:
Even_harv(),
def_harv(),
species()