Mediterranean Forest Simulation

medfate package provides functions to simulate forest dynamics (Daily Water Balance, Photosynthesis, Growth...) using cohort-based description of vegetation.

Here you will learn how to use the medfate R package to simulate forest dynamics.

In addition, an interactive shiny app is provided to illustrate the package capabilities, using an imaginary field plot and several plausible climatic and physiological scenarios

Package installation

Package medfate can be found at CRAN, where we update versions every few months. Users can also download and install the latest stable versions GitHub as follows:


Required packages devtools and curl may be installed/updated first. Documentation on the models included in medfate and how to run them using the package functions can be found below. Additionally, users can have help to run package functions directly as package vignettes, by forcing their inclusion in installation:

devtools::install_github("miquelcaceres/medfate", build_opts = c("--no-resave-data", "--no-manual"))

Package vignettes

Tutorials explaining the main functions of the package and how to run simulations

Model description

Conceptual design, process schedule and details of the formulation of dynamic simulation models and static functions

Simulating soil water balance in a single forest stand or for multiple stands distributed spatially.

Simulating soil water balance, plant hydraulics stomatal regulation and photosynthesis, in a single forest stand or for multiple stands.

Simulating plant growth of a set of cohorts (competing for light and water) in a single forest stand or for multiple stands.

Details of plant hydraulics, stomatal regulation and photosynthesis processes.

Estimate fuel properties and potential fire behaviour in forest stands.

Play with medfate!

With this app you can explore the capabilities and visualize the outputs of the modelization.

In this imaginary plot you can select a tree and a shrub species, change the LAI for that species and specify the soil description. Output plots are redrawed with each change. At the bottom the input object used to modelize the forest dynamic is showed.

spwbInput object



This web-based service has been develop by the Vegetation Modeling Group at Forest Science and Technology Centre of Catalonia (CTFC), in collaboration with the Center for Ecological Research and Forestry Applications (CREAF):

  • Idea and conceptual design: Miquel de Cáceres (CTFC/CREAF), Víctor Granda (CTFC), Antoine Cabon (CTFC/CREAF) & Jordi Martínez Vilalta (UAB/CREAF)

  • Package development: Miquel De Cáceres (CTFC/CREAF), Antoine Cabon (CTFC/CREAF) & Víctor Granda (CTFC).

  • User interface: Víctor Granda (CTFC).

  • Contact: Miquel De Cáceres (

Scientific advisory board

  • Jordi Martínez Vilalta (UAB/CREAF)
  • Maurizio Mencuccini (ICREA)
  • Nicolas Martin-StPaul (INRA)
  • Lluís Coll (CTFC/CREAF)
  • Juli G. Pausas (CIDE-CSIC)
  • Pere Casals (CTFC)
  • Lluís Brotons (CTFC/CREAF/CSIC)
  • Pilar Llorens (IDAEA-CSIC)
  • Rafael Poyatos (CREAF)
  • Albert Álvarez (CREAF)
  • Jordi Vayreda (CREAF)
  • Mario Beltrán (AGS-CTFC)

Funding projects

  • Projects: FORESTCAST (CGL2014-59742-C2-2-R, Ministerio de Economía y Competitividad), DRESS (CGL2017-89149-C2-2-R, Ministerio de Economía y Competitividad).

  • Fellowships: RYC-2012-11109 to M. De Cáceres (Ministerio de Economía y Ciencia).


The data offered in this website is the result of modelling exercises and the accuracy of results may be impaired by several factors, like inaccuracies of input data, inappropriate model design or parameterization. Users should be aware of all these limitations when using the data offered here. We decline all responsibility for how the data in this website is used by third parties.