Swiss Federal Institute for Forest, Snow and Landscape Research WSL

TreeMig coupling

Forest dynamics are not completely autonomous, but are influenced by external factors and in turn influence other systems. If these influences work in both directions, in simulations dynamic models for the external factors should be coupled to TreeMig

Coupling concept

The TreeMig-R package provides functions (currently in CoupleOtherModelToTreeMig.R  in the example scripts) to simplify the coupling of another model (OM) to TreeMig (TM). The coupling function CoupleOtherModelToTreeMig iterates through predefined coupling time points (CTP, minimum interval 1 year) of the overall simulation. Between the CTP both models run independently of each other. At each CTP, TM and OM exchange data on state and input data. The OM modifies initial values and/or input data of TM. 

How to do the coupling?

Before the coupling, the states, settings, and input data of TM must be known. This can be achieved by means of a spin-up simulation, e.g., with a TM-R script.

OM must be written in R with a defined interface. The parameters for the CoupleOtherModelToTreeMig function (e.g., all CTPs, the location of the TM state file, the TM control settings, OM's  name,  input data, and model parameters) must be defined.   
TM and OM are then simulated in a coupled manner using the CoupleOtherModelToTreeMig function.

Examples

Several example scripts of varying complexity, ranging from “no mutual influence” to (a greatly simplified) “forest-climate system feedback”, demonstrate how other models can be coupled to TreeMig.  
The source code for these sample models can be found in VariousOtherModels.R; they are called using TestCouplingOM_and_TM.R. This requires the coupling functions in CoupleOtherModelToTreeMig.R and the input data from the starter kit.  
The example models are only intended to illustrate the coupling; their functions and parameters are not scientifically supported.