Obtaining the model source code


(Redirected from Svn)
Jump to: navigation, search

Obtaining the model source code

By using SVN, obtain the source code from our modb svn. The subversion project name is Gher3, the latest stable version is in the "trunk" directory.

Before compiling the source code, it is necessary to have the proper libraries installed on the system (e.g. netcdf, pvm ...). In order to compile the model, the Makefile needs to be built. This can be done manually. Another possibility is to use "makemake", a perl script included with the source code. It has to be called with 2 arguments, the final executable filename and "f90". It creates "Makefile", by building all dependencies between subroutines in the source code. It also adds the content of the file "Makefile.copy" and the compilation flags from "Makefile.flags". These files need to be adapted to each particular environment (e.g. the compiler names, the library locations, the compilation flags...), in order to obtain a coherent final Makefile.

Using the Makefile, the compilation will hopefully be successful; the most common error happens with missing or misplaced libraries. However, the obtained executable will be broken, as other files need to be modified as well to match one's particular implementation (e.g. TAILLES.H contains the grid size, OSB.DAT contains open boundary information, NEST?.DAT and cnesini.f90 contain information about parent and child models ...). These modifications are done automatically by some other scripts, usually stored in a directory called "Config" (read below for obtaining the "environment").

Obtaining the model "environment"

In order to use the Gher3D model, apart from the source code, one needs a lot of other datafiles, option files...

A complete working example covering the Mediterranean Sea can be used as an example. It is also available from SVN, project name "GherExample".

! TODO: add the SVN project GherExample !
Personal tools