dcpam5 Installation Guide

Operation Environment

This program is operated by following compilers.

Software Requirements

Following softwares should be installed for installing dcpam.

netCDF (version 3.6.X or more)

Debian GNU/Linux (use binary packages)

If you use Debian GNU/Linux, you can use binary package of netCDF.

Building from source codes

gtool5 (version 20100924 or more)

If you use Debian GNU/Linux and use binary package of gtool5, see here and install it.

Building from source codes

ISPACK (in Japanese) (version 1.0.2)

If you use Debian GNU/Linux and use binary package of ISPACK, see here and install it.

See "README" file in a tar.gz file. (but that is written in Japanese)

spmodel (version 0.8.0 or more)

If you use Debian GNU/Linux and use binary package of spmodel, see here and install it.

Building from source codes

MPI library
If you perform parallel computing by using the MPI, install MPI library.

Software Requirements for developers

Following softwares should be installed for modification of source code and generation of documents. (But if you get tar.gz package, documentations are already generated).

How to build

Extract TGZ Package

Make an empty directory, and extract archive as follows. A directory `dcpam5-version' created at the current working directory.

$ tar xvzf dcpam5_latest.tgz

or

$ zcat dcpam5_latest.tgz | tar -xvf -

Specify Fortran Compiler

Specify Fortran compiler to environmental variable FC . For example, if you use "spmfrt",

  • sh, bash

    $ FC=spmfrt ; export FC
  • csh, tcsh

    $ setenv FC spmfrt

Specify Fortran compiler options for optimization and debug to environmental variable FFLAGS . For example, if you set -O option,

  • sh, bash

    $ FFLAGS="-O" ; export FFLAGS
  • csh, tcsh

    $ setenv FFLAGS "-O"

On the one hand, specify -DSJPACK to FFLAGS if you use sjpack for spectral transformation.

Further, specify -DAXISYMMETRY or -DAXISYMMETRY_SJPACK to FFLAGS if you perform axisymmetric calculation.

Create `Config.mk'

Move created directroy, and excute ` ./configure '.

Specify library files in Libraries needed for compile to following options.

--with-ispack=ARG
ispack library filename (*.a)
--with-netcdf=ARG
netcdf library filename (*.a)
--with-gtool5=ARG
gtool5 library filename (*.a)
--with-spml=ARG
spmodel library filename (*.a)

For exapmle, specify as follow. This command will generate Config.mk .

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

GNU make is needed to build, so configure automatically inquires into GNU make in PATH. However, it returns error when GNU make is not found. In that case, please set the GNU make command for environment variable MAKE . And rerun execute ` ./configure '.

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.

--prefix=ARG
Specify prefix to ARG. Default value is /usr/local/dcpam5 .
--libdir=ARG
Specify directory to which the library is installed to ARG. Default value is /usr/local/dcpam5/lib .
--includedir=ARG
Specify directory to which the module is installed to ARG. Default value is /usr/local/dcpam5/include .
--bindir=ARG
Specify directory to which the executable file is installed to ARG. Default value is /usr/local/dcpam5/bin .
--with-docdir=ARG
Specify directory to which the documentation file is installed to ARG. Default value is /usr/local/dcpam5/doc .
--with-dcpam_lib_name=ARG
Specify dcpam5 library name to ARG. Library name becomes lib<ARG>.a . Default value is dcpam5 , so library name becomes libdcpam5.a .
--with-dcpam_suffix=ARG
Specify suffix of installdir, library name, executable files toARG. For example, you specify ffc5 when others are default, prefix of installdir becomes /usr/local/dcpam5-ffc5 , library name becomes libdcpam5-ffc5.a , executable files become gt4frt.ffc5 , gt4config.ffc5 .
--with-lang_conform_check=ARG
Specify language standard to ARG. And when you compile source code, check the language standard conformance. Now, "95" is valid. The compiler that can be used is limited.
--enable-debug
When you compile source code and execute binary file, output debug messages. The compiler that can be used is limited.
--config-cache or -C

config.cache is created at the same time as Config.mk 's being generated. config.cache stores information investigated with ./configure .

If you set this option, when you execute ./configure again, config.cache is loaded. If you want to ignore config.cache, don't set this option

For example, execute ./configure as follows.

$ ./configure -C  --enable-debug \
              --with-ispack=/usr/local/lib/libisp.a \
              --with-netcdf=/usr/local/lib/libnetcdf.a \
              --with-gtool5=/usr/local/lib/gtool5/lib/libgtool5.a \
              --with-spml=/usr/local/lib/spml/lib/libspml.a \

Then, information such as the locations of the netCDF library etc. is succeeded by executing ./configure as follows after next time.

$ ./configure -C

If you use Fujitsu Fortran compiler in Debian GNU/Linux, copy "Config.cache.debian-ffc*" to config.cache and execute ./configure . So, locations of libraries are specified automatically.

$ cp Config.cache.debian-ffc5 config.cache
$ ./configure
--enable-mpi
If you set this option, the parallelized version is compiled.

Edit `Config.mk'

A file ' Config.mk ' in which elemental settings are written is created by above "configure". However, the settings may be insufficient by "configure" in some environments. In that case, edit ' Config.mk ' manually according to need.

Followings are main items.

FC
Fortran compiler
SYSFFLAGS
Flags needed when compiled and linked
SYSLDFLAGS
Flags needed when linked
SYSLDLIBS
Libraries needed when linked
prefix
Directory where dcpam5 library, modules, executable files, and documentations are installed
CLEAN_MODS
Extensions of Module Files used when "make clean"
MAKE
GNU make command
AR
Archive command
ARFLAGS
Flag of Archive command
RANLIB
Generate index to archive command

Compile source code

You must use GNU make to build. No other "make" program is acceptable. "make" tentatively means GNU make at the following. Replace them with GNU make of your system.

When ./configure is executed, the command name of GNU make is displayed as follows. Execute GNU make according to the message.

Execute GNU make in the current directory, as follows.

  /usr/bin/make

If dcpam5 is built successfully, following messages will be displayed.

You have successfully built dcpam5.

Generate documentations

To generate documentations, execute following command in current directory. If you get from dcpam5 TGZ package, documentations are already generated.

$ make doc

Execute programs

If dcpam5 is built successfully, some executable files dcpam_main, init_data, sst_data are created under "src/main".

See GOKURAKU (easiest) dcpam5 for execution of the files. .


$Id: INSTALL,v 1.33 2014/03/10 04:37:06 yot Exp $