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

DCPAM Installation Guide

Operation Environment

This program is operated by following compilers.

Libraries needed for compile

Following softwares should be installed for installin DCPAM.

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. A directory `dcpam2-version' created at the current working directory.

$ tar xvzf dcpam2-current.tgz

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.

ispack library filename (*.a)
netcdf library filename (*.a)
gt4f90io library filename (*.a)
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 \

config.cache is also created with Config.mk . This file stores arguments of options. When you execute ./configure again, config.cache is loaded automatically. If you nullify previous settings, do following command.

$ make distclean

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

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.

Specify prefix to ARG. Default value is /usr/local/dcpam2 .
Specify directory to which the library is installed to ARG. Default value is /usr/local/dcpam2/lib .
Specify directory to which the module is installed to ARG. Default value is /usr/local/dcpam2/include .
Specify directory to which the executable file is installed to ARG. Default value is /usr/local/dcpam2/bin .
Specify directory to which the documentation file is installed to ARG. Default value is /usr/local/dcpam2/doc .
Specify Fortran compiler. This option have priority over shell variable "$FC". Use when you want to override config.cache. (Once config.cache is created, shell variable "$FC" is ignored).
Specify options for debug and optimization. Shell variables "$FFLAGS" are used too when compiled and linked.
Specify dcpam2 library name to ARG. Library name becomes lib<ARG>.a . Default value is dcpam2 , so library name becomes libdcpam2.a .
Specify suffix of installdir, library name, executable files toARG. For example, you specify ffc5 when others are default, prefix of installdir becomes /usr/local/dcpam2-ffc5 , library name becomes libdcpam2-ffc5.a , executable files become gt4frt.ffc5 , gt4config.ffc5 .
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.
When you compile source code and execute binary file, output debug messages. The compiler that can be used is limited.

Edit `Config.mk'

Edit unspecified item in `Config.mk' manually.

Followings are main items.

Fortran compiler
Flags needed when compiled and linked
Flags needed when linked
Libraries needed when linked
Specify location where Config.mk is.
Directory where dcpam2 library, modules, executable files, and documentations are installed
Extensions of Module Files (".mod" or ".d" or ".f90")
Extensions of Module Files used when "make clean"
Archive command

Compile source code

In current directory, execute following command.

$ make

Generate documentations

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

$ make doc

Execute test program

Move "practice" directory.

$ mv practice

And edit "init.nml". This file is NAMELIST file for initial data. After edit, do following command. Then initial data "init.nc" will be generated.

$ make init

Next, edit "dycore.nml", and specify step interval and output variable, output file, and so on. Finally do following command.

$ make run

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

$ make run > dycore.msg

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

Result data are located in "result" directory.

Installation to system

If you install dcpam2 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