[English | Japanese] [GFD Dennou Club | DCPAM Project]

dcpam Installation Guide

Operation Environment

This program is operated by following compilers.

Libraries needed for compile

Following softwares should be installed for installing dcpam.

netCDF (version 3.5.0 or 3.6.0)

For using debian package.

For compiling source code.

gt4f90io (version 20070427)
For compiling source code.
ISPACK (in JAPANESE) (version 0.71)

For using debian package.

For compiling source code.

spmodel (version 0.4.0-2)

For using debian package.

For compiling source code.

If you get dcpam from CVS. Following softwares should be installed for generating documentations. (But if you get tar.gz package, documentations are already generated).

Compile source code

Extract TGZ Package

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

$ tar xvzf dcpam3-current.tgz

or

$ zcat dcpam3-current.tar.gz | tar -xvf -

Specify Fortran Compiler

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

Specify Fortran compiler options for optimization and debug to environmental variable FFLAGS . For example, if you set options for automatic optimization and automatic parallelization to "frt",

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-gt4f90io=ARG
gt4f90io 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-gt4f90io=/usr/local/lib/gt4f90io/lib/libgt4f90io.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/dcpam3 .
--libdir=ARG
Specify directory to which the library is installed to ARG. Default value is /usr/local/dcpam3/lib .
--includedir=ARG
Specify directory to which the module is installed to ARG. Default value is /usr/local/dcpam3/include .
--bindir=ARG
Specify directory to which the executable file is installed to ARG. Default value is /usr/local/dcpam3/bin .
--with-docdir=ARG
Specify directory to which the documentation file is installed to ARG. Default value is /usr/local/dcpam3/doc .
--with-dcpam_lib_name=ARG
Specify dcpam3 library name to ARG. Library name becomes lib<ARG>.a . Default value is dcpam3 , so library name becomes libdcpam3.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/dcpam3-ffc5 , library name becomes libdcpam3-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-gt4f90io=/usr/local/lib/gt4f90io/lib/libgt4f90io.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

Edit `Config.mk'

Edit unspecified item in `Config.mk' manually.

Followings are main items.

FC
Fortran compiler
SYSFFLAGS
Flags needed when compiled and linked
SYSLDFLAGS
Flags needed when linked
SYSLDLIBS
Libraries needed when linked
DCPAMDIR
Specify location where Config.mk is.
prefix
Directory where dcpam3 library, modules, executable files, and documentations are installed
MODEXT
Extensions of Module Files (".mod" or ".d" or ".f90")
MODS
Extensions of Module Files used when "make clean"
AR
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 this message.

Execute GNU make in the current directory, as follows.

  /usr/bin/make

Generate documentations

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

$ make doc

Execute test program

Firstly, how to execute a benchmark experiment suggested by Held and Suarez (1994) is explained.

Move "practice" directory.

$ mv practice

Edit "init.nml" if you nedd. This file is NAMELIST file for initial data. After editting, execute following command to generate initial data file "init.nc".

$ make init

Next, edit "dcpam.nml", and specify time step interval, output variable, output file, and so on. Finally execute following command.

$ make run

Error messages are printed in "dcpam.log", and normal messages are printed standard output. If you want to write normal messages to file, do as follow.

$ make run > dcpam.msg

Now, debug messages are printed in "dcpam.log" too. So this file become large.

Result data are located in "result" directory.

Secondly, how to execute a test run with simple physical prcesses.

Move "practice" directory:

$ cd practice

Copy init_ape_T21L16.nml to init.nml:

$ cd init_ape_T21L16.nml init.nml

Edit init.nml if you nedd. Execute following command to generate initial data file "init.nc".

$ make init

Next, edit dcpam_ape.nml, and specify time step interval, output variable, output file, and so on. Finally execute following command.

$ make ape-run

Installation to system

If you install dcpam3 libraries, modules, executable files to system, in current directory, execute following command. You need to be administrator.

# make install

If you want to install documentation files, execute following command.

# make install-doc

$Id: INSTALL,v 1.10 2007/06/08 02:23:43 morikawa Exp $