Skip to content
Kelly Kochanski edited this page May 30, 2018 · 1 revision

Get the source code

Without an LLNL LC account:

The source code for ReSCAL v.1.6 is available from the original developers, or from this wiki. This version is stable and at time of writing does not include any new snow physics or optimizations. This may be cloned with:

$git clone https://github.com/kellykochanski/rescal-snow.git

With an LLNL LC account:

Clone the current development version from:

$git clone https://[email protected]/bitbucket/scm/sno/rescal-snow.git

Configure

On unix-like systems and LC machines

$./configure

On MacOSX

You'll need to install gtk using jhbuild. Follow the instructions for Python 2. Do not expect this to go smoothly.

Once gtk is installed, you'll need to show ReSCAL where to find it and the included library libpng.

LDFLAGS="-L/Users/kochanski1/gtk/inst/lib -lpng" CFLAGS="-I/Users/kochanski1/gtk/inst/include -O2" ./configure

Finally, ReSCAL v1.6 includes openmp optimizations that do not run on MacOS. Go into src/defs.h and comment out: #def PARALLEL and #def OPENMP if they are present.

Build

$make

Run

$cd scripts

$run

Run something else

The src/run script hasoptions (most commented our) for PAR_FILE=XX.par. Different .par files may be chosen to give different initial conditions, and the parameter files contain a number of parameters which may be varied.

Compile-time options, such as the choice between a dune (DUN), snow (SNO), or river (RIV) model are defined and selected in src/defs.h. The model selected in the .par script must agree with the one defined at compile time.

Initial conditions and parameters are generally defined in src/models.c

Clone this wiki locally