User Tools

Site Tools


software-cst-317-2015

This is an old revision of the document!


You are in Geoinformatics - Creative Commons :: Introduction to Earth System Modelling :: Software for the Course

Introduction to Earth System Modelling: Software

Software Description

The models described in this course will be developed using TerraME. TerraME is an extension of the Lua language. Some useful documents about TerraME:

Students should read the TerraME EMS and the MREL papers first, to get a sense of the language and what we are going to teach. The next step is to learn the basics of Lua, which is a simple and elegant programming language. Good references on Lua are:

TerraME

Please first install the TerraME software, available at the TerraME github release site.

TerraME installation in Windows

Please install TerraME in “C:\TerraME” in Windows.

TerraME installation in MAC OS X

To install TerraME on a MAC, please follow the instructions below:

  1. Install homebrew, a package manager for MAC.
  2. install qt5 using homebrew (%brew install qt5)
  3. Download terrame-1.4-mac.tgz from TerraME website
  4. Copy terrame-14.mac.tgz to /usr/local directory (as “sudo”)
  5. In /usr/local directory, run the command “sudo tar xzvf terrame-1.4-mac.tgz”
  6. Include the following lines in your “.profile”
    export TERRAME=/usr/local/terrame
    export TME_PATH=$TERRAME/bin 
    export PATH=$PATH:$TME_PATH
    export LUA_PATH="./?.lua;$TME_PATH/?.lua"
    export LUA_CPATH="$TME_PATH/?.so"

Zero Brane Studio: IDE for TerraME

We suggest that you use ZeroBraneStudio as your programming environment for developing TerraME programs. In Windows, please install the program to C:\ZeroBraneStudio. In MAC and Linux, please use the default installation path.

After you download ZeroBraneStudio (ZBS), please do the following steps:

  1. Configuration file: tells ZBS where to find the TerraME interpreter. Copy the user.lua configuration file to the “cfg” folder where you have installed ZBS. In Windows, it is usually “C:\ZeroBraneStudio\cfg”. In the MAC, the folder is “/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg”. In Ubuntu, it is “/opt/zbstudio/cfg”.
  2. Interpreter description file: tells ZBS how to use TerraME. Copy the terrame.lua interpreter description file to the “interpreters” folder where you have installed ZBS. In Windows, this folder is “C:\ZeroBraneStudio\interpreters”. In the MAC, it is “/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/interpreters”. In Ubuntu, it is /opt/zbstudio/interpreters.
  3. Keyword description: tells ZBS to highlight both Lua and TerraME keywords. Copy the lua.lua keyword description file to the “spec” folder where you have installed ZeroBraneStudio. In Windows, this folder is “C:\ZeroBraneStudio\spec”.In the MAC, it is “/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/spec”. In Ubuntu, it is /opt/zbstudio/spec.
  4. Optional: delete the other interpreters of ZeroBrane (Corona, Guideros, etc.) and leave only Lua, Lua5.2 and TerraME.

Additional Packages for TerraME

For this course, we are going to use additional packages:

  • System Dynamics - a package for modelling system dynamic problems.
  • SciTerraME - a package for scientific and statistical functions in TerraME.

To install these packages, please save the “zip” files to a folder in your computer. Run TerraME, click on the button “Install New Package” and select the files one by one.

software-cst-317-2015.1439556145.txt.gz · Last modified: 2015/08/14 09:42 by gilberto