Translations of this page:

Environmental Modelling

This course is part of the generic course program of the MSc in Geospatial Technologies, course “Applications of GI within and outside geosciences”.

Lecturer: Prof. Dr. Tiago Carneiro


This course presents the environmental modelling discipline by problem-based learning.

Environmental modelling deals with the computational representation and simulation of natural systems and their interaction with human activities. These models address humanity's impact on natural resouces, including use of water, energy, land, and its consequences, such as deforestation, climate change, and depletion of biodiversity. Through a series of laboratory classes, we introduce different concepts and techniques for environmental modelling using TerraME toolbox for model development.

Students will implement well-established human and natural models in areas such as hydrology, deforestation, dengue disease propagation, spatial seggregation, and urban dynamics. The course will also investigate the assumptions, results, and conclusions of these models. Laboratory exercises and a final project will be used to grade students.

Class venue

Classes will take place at IFGI, room 125, StudLAB “C”.

Class hours

Classes will be from 9.00 to 12.00am every weekday. I will introduce programming and modelling theory in the first two hours (9.00-11.00) and fill the last hour with pratices (11.00-12.00).

Office hours

Tiago will be available in principle from 2.00 to 5.00pm at his office to help students with their questions - based on timely request by the students for individual or group meetings.


Students are expected to complete most of their workload outside formal contact hours through personal study, reading and assignments. They must be prepared for 4.5 hours per day of extra-class activities. This way, the overall course workload will sum 150 hours, e. g., 60h of contact classes and 90h of extra-class studies.


  • 20% - Two theoretical exams
  • 30% - Several pratices & readings: In class and at home.
  • 50% - Final project: Model code + wiki page + seminar.
  • Click here to see the: project outline. :!:

Text books


  • Ford, A. Modeling the Environment (2nd edition), Island Press, 2010.
  • Meadows, D. Thinking in Systems, Chelsea Publishing, 2008.


  • Wainwright, J., Mulligan, M. (2004). Environmental Modelling: Finding Simplicity in Complexity, John Wiley and Sons Ltd.
  • Zeigler, B. P., T. G. Kim, et al. (2005). Theory of modeling and simulation. Orlando, FL, USA, Academic Press, Inc.



Date Lecture Models Description Exercise
Get ready to be a modeler…
21/7Introduction Invited speaker: Prof.Dr. Gilberto Camara At home: Read Chapter 1 from the book “Environmental Modelling: Finding Simplicity in Complexity”
At home: Read the position paper Ten iterative steps in development and evaluation of environmental models
There will be an exam on next Friday, from 11:00 to 12:00.
22/7Notices Learn with drag and drop programming. Hour of Code - Beginners and
Hour of Code - LightBot
Do you like games? See this: Lua fo WoW.

At home: Install TerraME for the next class! If you want also install the MySQL Community database server (version 5.5.38 tested). For classes we will use the one availabe on the University network (
23/7TerraME online - Setting up TerraME bundle:
(1) TerraME 1.3.0,
(2) TerraView 4.2.0 and
(3) Crinson Text Editor
- Hello world in Lua programming language
At home: (1) Read Lua for TerraME: A short introduction
(2) Study homework 1 for the next class. You may learn lots of Lua programming on this page. If you need more… :-P Homework 2 is for advanced users! Homework 3 is for master of Lua. Homework 4 is for professional programmers who wants to export C and C++ API to Lua programming languague.
24/7 Mr. Worm,
Lua for TerraME and
Play with Lua online
(1) Mr Worm scripts
(2) Lua scripts
(3) Homework 1
- Introdution to Lua programming
- Types: nil, number, boolean, string, table, function
At home: Solve these exercises for the next class: Programming in Lua.
Compress your codes in a ZIP file. Give your name to the file. Email me the file BEFORE the next class.
You may find the Lua Reference Manual very useful
25/07 Let's do it together: Homework 1 and
Solving Lua exercices
Review on Lua programing.
System Dynamics …
28/07 Modelling basics Review on modelling theory. Experiment 1: Water in a bottle.
29/07 Introduction to model development Review on the model development process Experiment 2: Play with Maths.
At home: Read the paper “An extensible toolbox for modeling nature-society interactions” (about TerraME)
30/07 Introduction to system theory System theory scripts Review on the General System Theory At home: Whatch the video: Analytical Solution for the Logistic Equation. It will be discussed in class. Exercises for the next class
31/07 Introduction to system dynamics(same as above) System theory scripts (same as above) Review on stochatics systems, dynamic equilibrium & System Dynamics. At home: Exercises for the next class
01/08 Prey-predator model
Pratice, pratice & pratice…
Continuous systems scripts
Epidemics scripts
Integration methods are ready to use in TerraME, even for coupled systems. They are fast and precise. At home: Exercises on epidemics simulation - Compress your code in a ZIP file. Give your name to the file. Email me the file BEFORE the class on 06/08. This presentation can be useful: SIR models .
Cellular Automata modelling …
04/08 Mono Lake model
( Chapter 4 )
CA models
First exame
Mono Lake scripts
Game of Life
- Simulating the use of renewable resources
- Introducition to Cellular Automata
At home: Read the paper “An extensible toolbox for modeling nature-society interactions” (about TerraME - see the “Papers” section in this page)
05/08 CA models
(same as above)
Fire spreading CA
Fire spreading code - Introducition to Cellular Automata
- Simulating diffusive spatial processes
At home: (1) Exercises on diffusive processes. Write your answers in a PDF. Give your name to the file. Email me the file BEFORE the class on 06/08 - TOMORROW.
(2) Email me the exercises for “Temperature Control & Feedbacks in a Heat System”. Compress your codes in a ZIP file. Give your name to the file. Email me the file BEFORE the class on 06/08 - TOMORROW.
(3) Exercises on diffusive processes Compress your code in a ZIP file. Give your name to the file. Email me the file BEFORE the class on 07/08.
06/08 - Fire in geodatabases.
- Rain drainage models in a real topography
- Spatial prey-predator model
- Fire spreading code
- Rain drainage codes
- Spatial prey-predator codes
- How to build cellular spaces using the TerraView GIS and use it within TerraME models
- Continuous CA
At home: Final Project :!:
Agent based modelling…
07/08 - Agent based models
- Segregation models
Schelling's agent codes At home: Final project
08/08 TerraME - Putting all together ABM basics code Multiscale spatially-explicit modelling in TerraME At home: Final project

In Other Languages
Translations of this page: