Because the models are distributed only as source, there are a few prerequisites needed before you can build and use the model. Namely:
If you already have these on your machine, skip down to the section Compiling
This is perhaps the easiest situation in which you could find yourself, not least because you probably already have everything you need.
Many distros come packaged with a C compiler and Make, but a notable few don't. If you have the following, run the commands below at the command line
Ubuntu/Debian:
$ apt-get install build-essential
Fedora:
$ yum install make automake gcc gcc-c++
Arch:
$ pacman -S base-devel
On Windows, we have had success getting DEBAM and DETIM running using Cygwin, a Linux-like system for Windows.
Each of the following instructions roughly corresponds to a single dialog window of Cygwin's installer.
setup.exe
installer; this will
install Cygwin, as well as the compiler gcc an Make.gcc
, and make
.Click "Next" and follow the remaining installation instructions.
Open Cygwin by either clicking the icon on your desktop, or via the Start Menu. Cygwin will present itself as command prompt window.
Proceed as below in the Compiling section.
Now you'll need to get a copy of the source code (We suggest you download the version master). The models are hosted from our github repository. You can download the source as zip or tar files via:
Alternately, you can also clone the project with Git by running:
$ git clone https://github.com/regine/meltmodel.git
from a terminal (i.e. open a terminal and copy the line above (git ....) into the command line). If you plan to contribute to the project and change or add to the source code, you should use git, and spend some time getting familiar with it. More information about git can be found at git-scm or at Github.
Note, that the master version will always be the most up-to-date model version. Earlier version are called 'release_XXX' with XXX denoting the release number. Older versions of the model are marked in git with tags and can be reviewed on Github under 'Branch'.
Open up a command-line window and navigate to the folder containing the model source files.
At the command prompt, do
$ cd meltmodel
$ make models
The model executables and required input parameter files will now be located in meltmodel/bin
.
The model source files are under meltmodel/src
.
A detailed description of the folders and files after installation which are under the folder meltmodel
is given here.
.
The Makefile provides several different build targets, for those who
only wish to build parts of the project. These targets are built by
running make <target_name>
at the command line, where <target_name>
is one of the following:
For information regarding running the model, please consult the model manual, located at Regine Hock's page.
Additional tools have been developed to help with certain tasks related to the model, for example, making model calibration more efficient. They are described and can be downloaded at the External Tools page.