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.


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.

Download TerraME 2.0.1

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.


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.




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.


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.


Frequently asked questions are answered here.

Papers and reports


  • LUCCME, an extension for top-down land change modeling.
  • INPE-EM, a framework to compute greenhouse gases emission estimates from land cover change


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:


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!

http://www.lua.org/ TerraLib


cnpq fundo amazonia fapesp


Locations of visitors to this page