You are in Geoinformatics - Creative Commons :: Introduction to Earth System Modelling :: Software for the Course
The models described in this course will be developed using TerraME. TerraME is an extension of the Lua language. Please read the following introduction about TerraME, 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. We provide an introduction about Lua for TerraME users:
The TerraME software is available at the TerraME github release site.
export PATH=$PATH:/Applications/terrame.app/Contents/bin
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:
Copy three configuration files below to a directory within Zero Brane Studio installation directory.
File | What it does | Copy to |
---|---|---|
lua.lua | Tells ZBS to highlight both Lua and TerraME keywords. | ZeroBraneStudio/spec (there is already one with this name here, overwrite it) |
terrame.lua | Tells ZBS how to use TerraME. | ZeroBraneStudio/interpreters |
user.lua | Tells ZBS where to find the TerraME interpreter. | ZeroBraneStudio/cfg |
The default installation directories for Zero Brane are:
C:\ZeroBraneStudio\
/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/
/opt/zbstudio/
File
menu, and click New
print(“hello”)
.lua
extension in your computerprint
and “hello”
will become coloredProject
menu, in Lua Interpreter
, select TerraME
Execute the current project/file
)Output
box in the bottom of Zero Brane:Program 'terrame' started in [...] hello Program completed in [...] seconds [...]
For this course, we are going to use additional packages:
To install these packages, run TerraME, click on the button “Install Package” and select the files one by one.