Dynlib

From gfi
Revision as of 15:12, 11 January 2013 by Tsp065 (talk | contribs) (Created page with '== Documentation == The steps necessary to obtain dynlib are described below. A more thorough documentation is compiled in [[Dynlib Documentation|the ma…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation

The steps necessary to obtain dynlib are described below. A more thorough documentation is compiled in the main documentation page.

Obtaining dynlib

  1. Copying the source code repository
    git clone /Data/gfi/users/tsp065/lib/dynlib.git
  2. Change into the dynlib folder
    cd dynlib
  3. Compile the library
    ./compile

Quick start to developing with dynlib

Editing the Fortran code

The fortran code lives in the main source code directory. At the moment there are six source code files

$ ls *.f95
dynlib_config.f95 dynlib_const.f95 dynlib_conv.f95 dynlib_diag.f95 dynlib_kind.f95 dynlib_stat.f95

The most important are dynlib_diag.f95 which contains subroutines that calculate various diagnostics, and dynlib_stat.f95 which contains statistical functions. Changed Fortran sources need to be recompiled, again using

./compile

Version control

The changes you made to the source code files can be listed by

git status

or viewed in detailed diff-comparisons by

git diff

or for one file only

git diff [filename]

Commit your changes from time to time and give a sensible and brief description of your changes in the editor that is opened (automatically)

git commit -a

The commit is then stored in your copy of the source code repository, but not yet available for others, which allows you to also commit work-in-progress.

Using the Fortran functions

An example python script which calculates deformation using the Fortran function is provided with deformation.py.