TerraME: Multiparadigm Modeling Toolkit
TerraME is a programming environment for spatial dynamical modelling. It supports cellular automata, agent-based models, and network models running in 2D cell spaces. TerraME provides an interface to TerraLib geographical database, allowing models direct access to geospatial data. Its modelling language has in-built functions that makes it easier to develop multi-scale and multi-paradigm models for environmental applications.
Two important innovations in TerraME are its use of anisotropic spaces and of hybrid automata models. Anisotropic spaces arise when modeling natural and human-related phenomena. For example, land settlers in a new area do not occupy all places at the same time. They follow roads and rivers, leading to an anisotropic pattern. Anisotropic spaces are implemented in TerraME using Generalized Proximity Matrices (GPM). The GPM is an extension of the usual definition of the spatial relations and include a combination of neighborhood measures in the absolute space and in the relative space.
A hybrid automaton is an abstract model for a system whose behavior has discrete and continuous parts. It extends the idea of finite automata to allow continuous change to take place between transitions. Adopting hybrid automata in spatial dynamical models allows complex models which include critical transitions.
A vision of research motivations and directions of Environmental Modelling in INPE is available in this presentation. An early presentation of our vision is How can GIScience contribute to Land Change Modelling?, the keynote speech at GIScience 2006. The rationale for the TerraME software is presented in the lecture Modelling human-environment interactions, presented in the Vespucci Summer School 2010.
Download
The latest version of TerraME is 2.0.1 (Released on 20 August 2020). It has installers for Windows and Mac and there is a compiled version for Linux.
In Windows, you can run TerraME by clicking in the icon on Desktop. In Mac and Linux, it is possible to run it by calling
$> terrame
using the command prompt. The graphical interface has options to run examples, configure and run models, see documentation, as well as download and install additional packages. There are links to the source code of the models as well as the examples in the documentation.
Editor
You can implement models in TerraME using any text file editor of your preference, such as Notepad++, Vim or Emacs. We currently suggest that you use ZeroBraneStudio as your programming environment to develop models in TerraME. It is free and open source (but it is possible to donate to the project). After downloading and installing ZeroBraneStudio (ZBS), please execute the steps in the tutorial available here.
Documentation
Tutorials
- Lua for TerraME: A Short Introduction
- An Introduction to TerraME
- Modeling Paradigms in TerraME
- Creating and Filling Cellular Spaces
- Multiple Simulations
- Publishing Geospatial Data
Packages
You can execute a Google search in TerraME packages here. The two basic packages of TerraME that comes with its installation are:
- base: A package with the basic modelling concepts, such as Cell, CellularSpace, Agent, Timer, and Model.
- gis: A package to handle geospatial data. It has types to manage TerraView projects as well as functions to create and fill cellular layers.
Using the graphical interface, it is possible to download and install packages from TerraME's repository. They are are:
- ca: Some cellular automata models.
- logo: Basic spatial agent-based models.
- sci: A small package with interpolation functions.
- sysdyn: Examples using system dynamics models.
- calibration: Functions to run a given model several times, as well as metrics to compute goodness-of-fit and to calibrate models using genetic algorithms.
- publish: Create webmap tools using the input as well as output of models.
- gpm: Create geospatial data as well as neighbourhood files using connectivity networks such as roads.
You can run examples directly in the graphical interface of TerraME. Click in the Desktop icon to open it in Windows or run “terrame” in the command line to open the graphical interface. From the graphical interface it is possible to see the documentation of each installed package.
Courses
We use TerraME on our courses on Enviromental Modelling. We give regular graduate courses in the research programs in Earth System Science at INPE and Computer Science at UFOP.
FAQ
Frequently asked questions are answered here.
Papers and reports
- Bezerra et al. New land-use change scenarios for Brazil: Refining global SSPs with a regional spatially-explicit allocation model. Plos one 17.4, 2022: e0256052.
- Aguiar et al. Land use change emission scenarios: anticipating a forest transition process in the Brazilian Amazon. Global change biology, v. 22, n. 5, p. 1821-1840, 2016.
- Aguiar et al. Modeling the spatial and temporal heterogeneity of deforestation‐driven carbon emissions: the INPE‐EM framework applied to the Brazilian Amazon. Global Change Biology, v. 18, n. 11, p. 3346-3366, 2012.
- Carneiro, T. G. S. ; Andrade, P. R. ; Câmara, G. ; Monteiro, A. M. V. ; Pereira, R. R. . An extensible toolbox for modeling nature-society interactions. Environmental Modelling & Software, 2013. DOI:10.1016/j.envsoft.2013.03.002.
- Silva, S. H. C. ; Carneiro, T. G. S. ; Lima, J.. TerraME HPA: Parallel Simulation of Multi-Agent Systems over SMP. ACM SIGSIM Conference on Principles of Advanced Discrete Simulation, 2013, Montreal.
- Rodrigues, A. J. C., Carneiro, T. G. S., Andrade, P. R.. TerraME Observer: An extensible real-time visualization pipeline for dynamic spatial models. XVIII Brazilian Symposium on Geoinformatics, Campos do Jordão, 2012.
- Moreira, Costa, Aguiar, Camara, Carneiro. Dynamical coupling of multiscale land change models,Landscape Ecology, 24(9), p. 1183-1194, 2009.
- Andrade, Monteiro, Câmara, Sandri. Games on Cellular Spaces: How Mobility Affects Equilibrium.Journal of Artificial Societies and Social Simulation (JASSS), 12(1), p. 4, 2009.
- Carneiro, Câmara, Maretto. Irregular Cellular Spaces: Supporting Realistic Spatial Dynamic Modeling using Geographical Databases. X Brazilian Symposium on Geoinformatics, GeoInfo'08, Rio de Janeiro, 2008.
- Carneiro. Nested-CA: a foundation for multiscale modeling of land use and land change. PhD Thesis, INPE, 2006.
Extensions
- LUCCME, an extension for top-down land change modeling.
- INPE-EM, a framework to compute greenhouse gases emission estimates from land cover change
About
TerraME has been developed as a joint effort between INPE and TerraLab (Laboratory for Modelling and Simulation of Earth Systems), at Federal University of Ouro Preto.
The chief developers of TerraME are Pedro R. Andrade, from INPE, and Tiago Garcia de Senna Carneiro, from Federal University of Ouro Preto (UFOP). INPE's researchers involved in developing models using TerraME include Dr. Gilberto Camara, Dr. Antonio Miguel Monteiro, andDr. Ana Paula Aguiar.
Past contributors to TerraME include:
- Rodrigo Avancini
- Antônio Oliveira Jr.
- Heitor Guerra
- João Chagas
- Pedro Henrique Costa
- Raphael Costa
- Rodrigo Reis Pereira
- Antônio José da Cunha Rodrigues
- Breno de Almeida Pereira
- Frederico Gadelha Guimarães
- Henrique Cota Camello
- Rafael Lage Moreira Barbosa
- Raian Vargas Maretto
- Rodolfo Ayala Lopes Costa
- Rodolfo Maduro Almeida
- Sergio Souza Costa
- Saulo Henrique Cabral Silva
- Tiago Franca de Melo Lima
- Washington Sena de França
Acknowledgements
Supporting Software
The TerraME modelling language is an extension of the Lua programming language and interfaces to TerraLib GIS library for archival and retrieval of geospatial data. Many thanks to the Lua and TerraLib teams for providing such good environments to build upon!