TreeMig-Framework ¶
The TreeMig framework consists of
- the TreeMig core model, implemented in FORTRAN,
- the TreeMig R package that prepares the inputs for the core model, calls the core model, processes the model results further, plots them, and
- a graphical user interface, implemented with R shiny and Javascript.
The TreeMig core model is controlled via a text file with control settings and uses species parameters, bioclimate and land use data as input. The new TreeMig R package greatly simplifies the preparation of this control and input data, the call of TreeMig and the graphical output of the results. The R package can be used directly via an R script or with the help of a graphical user interface (GUI). The GUI also enables the output of the TreeMig-R-script generated and used by it, which in turn can be used as a basis for further, more complex simulations.
TreeMig core model ¶
The TreeMig core model is implemented in FORTRAN. This FORTRAN code is available on request. Please note that this is an extensive, complex code and that, despite the extensive documentation, modifying the code is difficult and error-prone.
TreeMig R package ¶
The code of the TreeMig R package is available on our GitLab. On the Wiki-page you will find detailed information on the various functions and the specifications for the input data.
The latest version of the TreeMig R package can be installed with the following R code:
# Install package "remotes"
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}# Install the latest version of TreeMig from GitLab
remotes::install_gitlab(repo = "TreeMig/treemig-r@main", host = "https://gitlabext.wsl.ch")
Graphical user interface ¶
The graphical user interface (GUI) can be started with the following R code.
Note: For the very first use of the TreeMig Framework we strongly recommend to get started with the Starter kit!
# Running the GUI
TreeMig::runTreeMigShiny(port=NULL)
Note on usage ¶
TreeMig, the TreeMig R package and the example data can be freely used for your work.
If you do so, please note that this is a preliminary version, and that TreeMig [1,2], the TreeMig R package [3] and the example data [4] must be cited if you publish results based on them.
It would be best if you contact us for assistance, especially if you need to work with the FORTRAN code of the model.
Citation
[1] Lischke, H. 2020. Simulation der Baumartenmigration im Klimawandel. Schweiz. Z. Forstwes. 171:151–157.
[2] Lischke, H., N. E. Zimmermann, J. Bolliger, S. Rickebusch, and T. J. Loffler. 2006. TreeMig: A forest-landscape model for simulating spatio-temporal patterns from stand to landscape scale. Ecological Modelling 199:409-420.
[3] treemig.wsl.ch, more citations will follow.
[4] References of Example input data for Switzerland