MadingleyR: An R package for mechanistic ecosystem modelling. Issue 9 (19th July 2021) - Hoeks, Selwyn; Tucker, Marlee A.; Huijbregts, Mark A. J.; Harfoot, Mike B. J.; Bithell, Mike; Santini, Luca
Abstract: Aim: Mechanistic general ecosystem models are used to explore fundamental ecological dynamics and to assess possible consequences of anthropogenic and natural disturbances on ecosystems. The Madingley model is a mechanistic general ecosystem model (GEM) that simulates a coherent global ecosystem, consisting of photo‐autotrophic and heterotrophic life, based on fundamental ecological processes. The C++ implementation of the Madingley model delivers fast computational performance, but it (a) limits the userbase to researchers that are familiar with the intricacies of C++ programming, (b) has limited possibility to change model settings and provide model outputs required to address specific research questions, and (c) has limited reproducibility of simulation experiments. The aim of this paper is to present an R package of the Madingley model to aid with increasing the accessibility and flexibility of the model. Innovation: The MadingleyR R package streamlines the installation procedure and supports all major operating systems. MadingleyR enables users to combine multiple consecutive simulations, making case study specific modifications to MadingleyR objects along the way. Default input files are available from the package and study‐specific inputs can be easily loaded from the R environment. MadingleyR also provides functions to plot and summarize MadingleyR outputs. We provide a comprehensive description of the MadingleyR functions and workflow. We also demonstrate the applicability of the MadingleyR package using three case studies: (a) simulating the cascading effects of the loss of mega‐herbivores on food‐web structure, (b) simulating the impacts of increased land‐use intensity on the total biomass of different feeding guilds by restricting the total vegetation biomass available for feeding and (c) simulating the impacts of an intensive land‐use scenario on a continental scale. Main conclusions: The MadingleyR package provides direct accessibility to simulations with the mechanistic ecosystem model Madingley and is flexible in its application without a loss in performance.