#
# DCPAM Installation Guide in RD (Ruby Document) format
#
# For instruction of installing dcpam,
# see "INSTALL.htm.en" (written in English) or
# "INSTALL.htm" (written in Japanese)
# included in "DCPAM" tar.gz package
# available from http://www.gfd-dennou.org/arch/dcpam.
# Otherwise, see this file directly, or generate
# above mentioned html files with "make doc-INSTALL"
# in current directory after installing rdtool
# .
=begin TOPLINK
[(()) |
(())]
[(()) |
(())]
=end TOPLINK
=begin JA
= DCPAM インストールガイド
* 森川 靖大 (morikawa), 石渡 正樹 (momoko)
* $Id: INSTALL,v 1.9 2005/06/22 09:01:28 morikawa Exp $
=end JA
=begin EN
= DCPAM Installation Guide
* Yasuhiro MORIKAWA (morikawa), Masaki ISHIWARARI (momoko)
* $Id: INSTALL,v 1.9 2005/06/22 09:01:28 morikawa Exp $
=end EN
=begin JA
== 動作環境
このプログラムは以下のコンパイラでの動作を確認しています。
=end JA
=begin EN
== Operation Environment
This program is operated by following compilers.
=end EN
=begin
* ((<"Debian GNU/Linux 3.0, 3.1 "|URL:http://www.debian.org/ >)) +
(())
=end
=begin JA
== コンパイルに必要なライブラリ
DCPAM2 のインストール・実行するためには以下のソフトウエアを
事前にインストールしておく必要があります.
* (())
(バージョン 3.5.0, 3.6.0)
* ((<3.6.0 版 TGZ|URL:http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-3.6.0-p1.tar.gz>)),
deb パッケージ [(()) |
(())]
* インストールガイド
* [(())
|
((<(日本語訳)|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current/INSTALL_netcdf.htm>)) ]
* [(())]
* (())
(バージョン 20050207 以上)
* ((<最新版 TGZ|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current.tgz>)),
deb パッケージ [(()) |
(())]
* ((<インストールガイド|URL:http://www.gfd-dennou.org/arch/gtool4/gt4f90io/gt4f90io_current/INSTALL.htm>))
* (())
(バージョン 0.61)
* ((<最新版 TGZ|URL:http://www.gfd-dennou.org/arch/ispack/ispack-0.61.tar.gz>)),
deb パッケージ [(()) |
(())]
* インストールガイド
* 上記 tar.gz を展開した際にできる README を参照してください.
* (())
(バージョン 0.3.0-9 以上)
* ((<最新版 TGZ|URL:http://www.gfd-dennou.org/arch/spmodel/spml.tar.gz>)),
deb パッケージ [(()) |
(())]
* ((<インストールガイド|URL:http://www.gfd-dennou.org/arch/spmodel/spml/INSTALL>))
CVS から最新版を取得して, ドキュメントを生成するためには以下の
ソフトウェアを事前にインストールしておく必要があります.
(tar.gz パッケージには既にドキュメントが同梱しています)
* (())
* スタイルファイル: (())
* (())
* (())
* (())
#* (())
* (())
=end JA
=begin EN
== Libraries needed for compile
Following softwares should be installed for installin DCPAM.
* (())
(version 3.5.0 or 3.6.0)
* (()),
deb package [(()) |
(())]
* Installation Guide
* [(())]
* [(())]
* (())
(version 20050207 or more)
* (()),
deb package [(()) |
(())]
* (())
* (())
(version 0.61)
* (()),
deb package [(()) |
(())]
* Installation Guide
* See "README" file in above tar.gz file. (but that is wrote in JAPANESE)
* (())
(version 0.3.0-9 or more)
* (()),
deb package [(()) |
(())]
* (())
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).
* (())
* Style file: (())
* (())
* (())
* (())
#* (())
* (())
=end EN
=begin JA
== コンパイルの手引き
=end JA
=begin EN
== Compile source code
=end EN
=begin JA
=== TGZ パッケージの展開
適当な作業ディレクトリでソースアーカイブを展開します.
ソースは dcpam2-((|バージョン|)) というディレクトリに展開されます.
$ tar xvzf dcpam2-current.tgz
=end JA
=begin EN
=== 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
=end EN
=begin JA
=== Fortran コンパイラの指定
環境変数 ((* FC *)) に使用する Fortran コンパイラを指定してください.
以下は, 利用するコンパイラが frt の場合です.
* sh, bash の場合
$ export FC=frt
* csh, tcsh の場合
$ setenv FC frt
最適化やデバッグのためのオプションは環境変数 ((* FFLAGS *))
に設定してください. 以下は frt の高速化と
並列化のためのオプションです.
* sh, bash の場合
$ export FFLAGS="-Kfast,parallel"
* csh, tcsh の場合
$ setenv FFLAGS "-Kfast,parallel"
=end JA
=begin EN
=== Specify Fortran Compiler
Specify Fortran compiler to environmental variable ((* FC *)).
For example, if you use "frt",
* sh, bash
$ export FC=frt
* csh, tcsh
$ setenv FC 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",
* sh, bash
$ export FFLAGS="-Kfast,parallel"
* csh, tcsh
$ setenv FFLAGS "-Kfast,parallel"
=end EN
=begin JA
=== Config.mk の作成
展開されたディレクトリに移動し, (({ ./configure }))を実行します.
((<コンパイルに必要なライブラリ>))でインストールした各ライブラリを
以下のオプションに指定する必要があります.
:(({--with-ispack=}))((|ARG|))
ispack ライブラリ (*.a) のファイル名
:(({--with-netcdf=}))((|ARG|))
netcdf ライブラリ (*.a) のファイル名
:(({--with-gt4f90io=}))((|ARG|))
gt4f90io ライブラリ (*.a) のファイル名
:(({--with-spml=}))((|ARG|))
spmodel ライブラリ (*.a) のファイル名
例えば以下のように指定します.
このコマンドによって (({ 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.mk })) ファイルが生成されると同時に, (({config.cache}))
ファイルが作成され, オプションの情報が保持されます.
自動的に (({config.cache})) が読み込まれるため, 再度 (({ ./configure }))
する際は前回のオプションが引き継がれます. もしも前回以前のオプション設定を
破棄したい場合には以下のコマンドを用いてください.
$ make distclean
Debian GNU/Linux で Fujitsu Fortran を利用している場合には,
Config.cache.debian-ffc* を (({config.cache})) に移動して
(({ ./configure })) コマンドを実行するだけで自動的に
ライブラリの位置が設定されます.
$ cp Config.cache.debian-ffc5 config.cache
$ ./configure
なお, インストール先やコンパイルのオプションを変更したい場合は,
以下のように (({ --help })) オプションをつけることで,
指定可能なオプションリストが表示されます.
$ ./configure --help
主なオプションに関しての説明です.
:(({--prefix=}))((|ARG|))
((|ARG|)) にライブラリやモジュール, 実行ファイルのインストール先の
ディレクトリのプレフィックスを指定します.
デフォルトは (({ /usr/local/dcpam2 })) です.
:(({--libdir=}))((|ARG|))
((|ARG|)) にライブラリのインストール先のディレクトリを指定します.
デフォルトは (({ /usr/local/dcpam2/lib })) です.
:(({--includedir=}))((|ARG|))
((|ARG|)) にモジュール情報ファイルのインストール先のディレクトリ
を指定します. デフォルトは (({ /usr/local/dcpam2/include })) です.
:(({--bindir=}))((|ARG|))
((|ARG|)) に実行ファイルのインストール先のディレクトリを指定します.
デフォルトは (({ /usr/local/dcpam2/bin })) です.
:(({--with-docdir=}))((|ARG|))
((|ARG|)) にドキュメントファイルのインストール先を指定します.
デフォルトは (({ /usr/local/dcpam2/doc })) です.
:(({--with-fc=}))((|ARG|))
Fortran コンパイラを指定します. 環境変数 $FC よりも優先されます.
(({config.cache})) に設定されたものを上書きする際に利用してください.
(一度 (({config.cache})) に Fortran コンパイラが指定されると,
環境変数 $FC は無視されます).
:(({--with-fflags=}))((|ARG|))
Fortran のデバッグや最適化のオプションを指定します.
環境変数 $FFLAGS が指定される場合, このオプションで
与えられるものも含め, 全てコンパイル時のオプションとして指定されます.
(重複に注意してください).
:(({--with-dcpam_lib_name=}))((|ARG|))
((|ARG|)) に dcpam2 のライブラリ名を指定します.
ライブラリ名は (({lib}))((||))(({.a})) となります.
デフォルトは (({ dcpam2 })) であり, その際のライブラリ名は
(({ libdcpam2.a })) となります.
:(({--with-dcpam_suffix=}))((|ARG|))
((|ARG|)) にはインストールディレクトリ, ライブラリ名,
実行ファイルの末尾につける接尾語を指定します.
例えば, 他が全てデフォルトの設定で (({ ffc5 })) と指定すると,
インストール先のディレクトリのプレフィックスが
(({ /usr/local/dcpam2-ffc5 })), ライブラリ名が
(({ libdcpam2-ffc5.a }))等のようになります.
:(({--with-lang_conform_check=}))((|ARG|))
((|ARG|)) に言語規格を指定することで, コンパイル時に言語規格の
チェックを行うよう, オプションを追加します. 現在 "(({95}))"
のみ指定可能です. コンパイラによっては指定できません.
:(({--enable-debug}))
このオプションを指定することで, コンパイル時や実行時にデバッグメッセージ
を出力するオプションを追加します.
コンパイラによっては指定できません.
=end JA
=begin EN
=== Create `Config.mk'
Move created directroy, and excute `(({ ./configure }))'.
Specify library files in (()) 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 \
(({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.
:(({--prefix=}))((|ARG|))
Specify prefix to ((|ARG|)).
Default value is (({ /usr/local/dcpam2 })).
:(({--libdir=}))((|ARG|))
Specify directory to which the library is installed to ((|ARG|)).
Default value is (({ /usr/local/dcpam2/lib })).
:(({--includedir=}))((|ARG|))
Specify directory to which the module is installed to ((|ARG|)).
Default value is (({ /usr/local/dcpam2/include })).
:(({--bindir=}))((|ARG|))
Specify directory to which the executable file is installed to ((|ARG|)).
Default value is (({ /usr/local/dcpam2/bin })).
:(({--with-docdir=}))((|ARG|))
Specify directory to which the documentation file is installed to ((|ARG|)).
Default value is (({ /usr/local/dcpam2/doc })).
:(({--with-fc=}))((|ARG|))
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).
:(({--with-fflags=}))((|ARG|))
Specify options for debug and optimization.
Shell variables "$FFLAGS" are used too when
compiled and linked.
:(({--with-dcpam_lib_name=}))((|ARG|))
Specify dcpam2 library name to ((|ARG|)).
Library name becomes (({lib}))((||))(({.a})) .
Default value is (({ dcpam2 })), so library name becomes
(({ libdcpam2.a })) .
:(({--with-dcpam_suffix=}))((|ARG|))
Specify suffix of installdir, library name, executable files to((|ARG|)).
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 })).
:(({--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.
=end EN
=begin JA
=== Config.mk の編集
上記の ./configure だけで設定できなかった部分に関しては,
(({ Config.mk })) を手動で編集して設定して下さい.
以下に主要な設定項目を挙げます. 詳しくは (({ Config.mk }))
を見てください.
:FC
Fortran コンパイラ
:SYSFFLAGS
コンパイル時・リンク時に必要なフラグ
(Fortran コンパイラ実行時に必要なオプション)
:SYSLDFLAGS
リンク時に必要なフラグ
:SYSLDLIBS
リンク時に必要なライブラリ
:DCPAMDIR
(({Config.mk})) が置いてあるディレクトリ
:prefix
dcpam2 のライブラリ, モジュール, 実行ファイル,
ドキュメントのインストールディレクトリ
:MODEXT
モジュール情報ファイルの拡張子
:MODS
make clean 時に使用するモジューリ情報ファイル指定
:AR
アーカイブコマンド
=end JA
=begin EN
=== 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 dcpam2 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
=end EN
=begin JA
=== ソースコードのコンパイル
カレントディレクトリで以下のコマンドを実行してください.
$ make
=end JA
=begin EN
=== Compile source code
In current directory, execute following command.
$ make
=end EN
=begin JA
=== ドキュメントの生成
マニュアルとコードリファレンスのコンパイルはカレントディレクトリ
において, 以下のコマンドを実行してください.
(())
から入手する場合には既に生成済みです.
$ make doc
=end JA
=begin EN
=== Generate documentations
To generate documentations, execute following command in current directory.
If you get from
(()),
documentations are already generated.
$ make doc
=end EN
=begin JA
== テストプログラム実行の手順
practice ディレクトリに移動してください.
$ cd practice
そしてそのディレクトリに置いてある init.nml を編集してください.
このファイルが初期値生成のための NAMELIST ファイルです.
編集が終わったら, 以下のコマンドで初期値データ init.nc
を生成してください.
$ make init
次に, dycore.nml を編集してファイルの出力間隔や出力する
変数の指定を行ってください.
最後に以下のコマンドでプログラムが実行されます.
$ make run
なお, エラーは dycore.log に出力され, 通常のメッセージは標準出力に
出力されます. 通常のメッセージをファイルに出力する場合には
$ make run > dycore.msg
としてください. なお, 現在の設定ではデバッグ用メッセージも
全て dycore.log に出力されるようになっています. (サイズが大きい
ので注意してください).
結果は result ディレクトリ以下に出力されます.
=end JA
=begin EN
== 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.
=end EN
=begin JA
== システムへインストールする場合
もしもシステムに dcpam2 のライブラリ, モジュール, 実行ファイルを
インストールする場合は, カレントディレクトリで以下のコマンドを
実行してください.
システム領域にインストールする場合には管理者権限が
必要です.
# make install
ドキュメントをインストールする場合には以下のコマンドを実行します.
# make install-doc
=end JA
=begin EN
== 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
=end EN
=begin HTML
=end HTML