Dennou-OGCM Installation Guide

Operation Environment

Dennou-OGCM is operated sucessfully by following environments.

  * OS
      + Debian GNU/Linux >= ver. 7,
  * Fortran Compiler
      + GFortran >= ver. 4.7
          o with OpenMPI >= 1.4.5
      + Intel &reg; Compilers

General outline

Install Dennou-OGCM as follows. Refer each items for details.

 1. Satisfy Software Requirements.
 2. Build the library following How to build.
 3. Install the library following How to install.
 4. Check whether the installed library functions normally following
    Execute test programs.

Software Requirements

The following software needs to use Dennou-OGCM

  * LAPACK
  * NetCDF, >= ver. 3.6
  * gtool5
  * ispack
  * spml
  * (MPI library)
  
How to build

Extract TGZ Package

Make an empty directory, and extract archive. A directory
`dennou-ogcm-version' created at the current working directory.

$ tar xvzf dennou-ogcm_latest.tgz

or

$ zcat dennou-ogcm_latest.tgz | tar -xvf -

Specify Fortran Compiler

Specify Fortran compiler to environment variable FC . For example, if
you use "gfortran",

  * sh, bash

    $ FC=gfortran ; export FC

  * csh, tcsh

    $ setenv FC gfortran

Specify Fortran compiler options for optimization and debug to
environment variable FCFLAGS . For example, if you set options for
automatic optimization and automatic parallelization to gfortran,

  * sh, bash

    $ FCFLAGS="-O3 -fopenmp" ; export FCFLAGS

  * csh, tcsh

    $ setenv FCFLAGS "-O3 -fopenmp"

Execute `configure'

Move created directroy, and excute ` ./configure '. You should set
necessary library location (e.g,. LAPACK, NetCDF, gtool5, and ispack).
If your path of LAPACK library is `/usr/local/lapack/lib/liblapack.a',
NetCDF library is `/usr/local/netcdf/lib/libnetcdf.a', gtool5 library
is `/usr/local/gtool5/lib/libgtool5.a', ISPACK library is
`/usr/local/ispack/lib/libisp.a', you should set options as follow.
Then a `Makefile' will be created at the current working directory.
If the NetCDF library is a shared library, --with-netcdff= option may
be needed. See details of options as follows.

$ ./configure --with-lapack=/usr/local/lapack/lib/liblapack.a  \
              --with-netcdf=/usr/local/netcdf/lib/libnetcdf.a \
              --with-gtool5=/usr/local/gtool5/lib/libgtool5.a \
              --with-ispack=/usr/local/ispack/lib/libisp.a

If you want to use sjpack for spectral transformation, add --enable-sjpack
into configure option. Further, if you want to build axisymmetric spectral
ocean model, specify --with-dsogcm-mode=AXISYM (default setting is 3D). 

If you want to change directory to which the library and the module,
etc. are installed, please set --help option as follow. Available
options are showed.

$ ./configure --help

Descriptions about principal options are listed below.

--with-netcdf=ARG
    Specify netCDF library needed for build to ARG. You must specify
    explicitly.
--with-netcdff=ARG
    If the netCDF library is a shared library, the library may be
    divided C library from Fortran library. In the case, specify the C
    library to above option, and specify the Fortran library to ARG in
    this option.
--with-netcdf-include=ARG
    Set location of netCDF header file for fortran(netcdf.inc), if you
    need.
--with-gtool5=ARG
    Specify gtool5 library needed for build to ARG. You must specify
    explicitly.
--with-ispack=ARG
    Specify ispack library needed for build to ARG. You must specify
    explicitly.
--prefix=ARG
    Specify prefix to ARG. Default value is /usr/local/spml .
--host=ARG
    When cross-compiling, specify the type of system on which the
    package will run to ARG.
--libdir=ARG
    Specify directory to which the library is installed to ARG. Default
    value is /usr/local/dennou-ogcm/lib .
--includedir=ARG
    Specify directory to which the module is installed to ARG. Default
    value is /usr/local/dennou-ogcm/include .
--bindir=ARG
    Specify directory to which the executable file is installed to ARG.
    Default value is /usr/local/spml/bin .
--with-docdir=ARG
    Specify directory to which the documentation file is installed to
    ARG. Default value is /usr/local/dennou-ogcm/doc .
--with-abort=ARG
    Specify one of abort, errtra-setrcd, exit, setrcd, stop to ARG.
    Default value is abort .

    abort
        Stop by intrinsic subroutine "abort".
    errtra-setrcd
        Stop by Fujitsu Fortran service subroutine "ERRTRA". And
        outputs error trace back map.
    exit
        Stop by intrinsic subroutine "exit".
    setrcd
        Stop by Fujitsu Fortran service subroutine "SETRCD". And
        outputs error trace back map.
    stop
        Stop by intrinsic subroutine "stop".

See Execute `configure' about other options.

Compile source code

When ./configure is executed, Makefile is updated displayed as follows.
Execute `make' as follows:

$ make

How to install

In current directory, execute following command. If you install to
system, you need to be administrator. (By default, you install to
system).

# make install

Execute test programs

In current directry, execute following command. If message " ***
Compilation and installation are succeeded !! *** " are showed without
error, installation is completed.

$ make test


