You are looking at an old revision of the page Getting-started. This revision was created by Robert Spence.

Table of Content

How to get started with Alpine3D


First, we would thank you for your interest in Alpine3D. This document will now explain you how to download Alpine3D, how to compile it according to your needs and how to find your way in its code and documentation.

Getting Alpine3D

In order to reduce the maintenance burden and to make Alpine3D easier to tailor to specific needs, it has been decomposed into several tools:

  • inishell for graphical configuration of the simulations
  • MeteoIO for data retrieval and preprocessing
  • libsnowpack for doing the 1D soil/snow/canopy modeling
  • Alpine3D itself that combines MeteoIO and Snowpack, distributes it over a DEM and adds a radiation model and a snow drift model.

So, you need to get these packages (either as binary or source form) and then, get Alpine3D (In the future, there will be Alpine3D packages containing all you need in one package). There are several ways to get Alpine3D itself:

  • as binary packages for your platform;
  • as source package, to recompile for your platform;
  • as SVN working copy (checkout).

Please follow the instructions as given for MeteoIO, simply replacing "meteoio" by "alpine3d".

Compiling Alpine3D

You need to download and install (or download/compile and install) the previously listed packages so they can be automatically found. If you don't want to install either MeteoIO or Snowpack on your system, you have to keep the following directory structure:

                |-----> snowpack trunk
                |-----> meteoio trunk
                |-----> alpine3d trunk

and then Alpine3D would still find MeteoIO and snowpack automatically. Please review the compiling instructions for MeteoIO, since here only what differs will be listed. The generation of the documentation also follows the instructions given for MeteoIO in the previous link (the generated documentation being in doc/Alpine3D_doc.html). Otherwise, you can download a documentation only package (in the Downloads).

Compiling on Linux/Unix

  • open a terminal and change into the trunk folder of alpine3d
  • "ccmake ."
  • Press [c] to configure, it will then populate the screen with configurable options
  • choose the relevant options (toggle ON/OFF by pressing Enter)
  • Press [c] to configure
  • Switch "Openmp" to ON if you want to run Alpine3D in parallel using opnmp
  • Press [g] to generate and exit the interface (you might have to press [c] a few times for it to have everything finally setup)
  • "make"
  • "make deploy" to copy all the necessary files for a run in the "bin" subdirectory
  • you currently have to manually copy the "bin" subdirectory to your simulation folder (see Running-a-simulation)

For an openmp parallel run, you must run on an SMP system. Your queuing system (if any) must also support openmp and you must define the OMP_NUM_THREADS environment variable (to define how many threads you want to use) for each run. Basically, if running on a standard 4 cores desktop system, you would type on the command line:

  • export OMP_NUM_THREADS=4

If submitting the job to a cluster using the Sun Grid Engine queuing system, you add the following to your script:

  • add to the header the following SGE directive "#$ -pe smp 6" ("smp" being the parallel environment for requesting an SMP system, this depends on what your sysadmin has defined)
  • add "export OMP_NUM_THREADS=$NSLOTS" after the SGE directives
  • edit the Alpine3D command line to use the number of threads as number of workers for ebalance and snowpack:

    • --np-ebalance=$NSLOTS \
    • --np-snowpack=$NSLOTS \

Running a simulation

See Running-a-simulation for a whole description of how to define and run an Alpine3D simulation!