# # dcpam Installation Guide in RD (Ruby Document) format # # For instruction of installing dcpam, # see "INSTALL.htm.en" (English) or "INSTALL.htm" (Japanese) # included in "dcpam" tar.gz package # available from http://www.gfd-dennou.org/library/dcpam. # Otherwise, see this file directly, or generate # above mentioned html files with "make guide" # in current directory after installing rdtool # . =begin TOPLINK [(()) | (())] [(()) | (())] =end TOPLINK =begin JA = dcpam インストールガイド #* 森川 靖大 (morikawa), 石渡 正樹 (momoko) # * $Id: INSTALL,v 1.10 2007/06/08 02:23:43 morikawa Exp $ =end JA =begin EN = dcpam Installation Guide #* Yasuhiro MORIKAWA (morikawa), Masaki ISHIWARARI (momoko) # * $Id: INSTALL,v 1.10 2007/06/08 02:23:43 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.1 "|URL:http://www.debian.org/ >)) + (()) * ((<"Debian GNU/Linux 3.1 "|URL:http://www.debian.org/ >)) + (()) =end =begin JA == コンパイルに必要なライブラリ dcpam3 のインストール・実行するためには以下のソフトウエアを 事前にインストールしておく必要があります. : (()) (バージョン 3.5.0, 3.6.0) debian を使用していてインストールパッケージを利用する場合 * deb パッケージ [(()) | (())] 上記 deb パッケージの他に netCDF の Development kit もインストールする 必要があります (netcdfg-dev パッケージ). ソースからコンパイルする場合 * ((<3.6.0 版 ソースのTGZ|URL:http://www.gfd-dennou.org/library/netcdf/unidata-mirror/netcdf-3.6.0-p1.tar.gz>)) [(()) | ((<(日本語訳)|URL:http://www.gfd-dennou.org/library/gtool4/gt4f90io/gt4f90io_current/INSTALL_netcdf.htm>)) ] [(())] : (()) (バージョン 20070427) # debian を使用していてインストールパッケージを利用する場合 # * deb パッケージ [(()) | # (())] ソースからコンパイルする場合 * ((<バージョン 20060725 TGZ|URL:http://www.gfd-dennou.org/library/gtool4/gt4f90io/gt4f90io-20060725.tgz>)) ((<インストールガイド|URL:http://www.gfd-dennou.org/library/gtool4/gt4f90io/gt4f90io-20060725/INSTALL.htm>)) : (()) (バージョン 0.71) debian を使用していてインストールパッケージを利用する場合 * deb パッケージ [(()) | (())] ソースからコンパイルする場合 * ((<バージョン 0.71 TGZ|URL:http://www.gfd-dennou.org/library/ispack/ispack-0.71.tar.gz>)) インストールの際は, 上記 tar.gz を展開して README を参照してください. : (()) (バージョン 0.4.0-2) debian を使用していてインストールパッケージを利用する場合 * deb パッケージ [(()) | (())] ソースからコンパイルする場合 * ((<最新版 TGZ|URL:http://www.gfd-dennou.org/library/spmodel/spml.tar.gz>)) ((<インストールガイド|URL:http://www.gfd-dennou.org/library/spmodel/spml/INSTALL>)) CVS から最新版を取得して, ドキュメントを生成するためには以下の ソフトウェアを事前にインストールしておく必要があります. (tar.gz パッケージには既にドキュメントが同梱しています) * (()) * スタイルファイル: (()) * (()) * (()) * (()) * ((<"RDoc Fortran90/95 ソースコード解析機能強化版"|URL:http://www.gfd-dennou.org/library/dcmodel>)) #* (()) #* (()) =end JA =begin EN == Libraries needed for compile Following softwares should be installed for installing dcpam. : (()) (version 3.5.0 or 3.6.0) For using debian package. * deb package [(()) | (())] For compiling source code. * (()) Installation Guide [(())] [(())] : (()) (version 20070427) # For using debian package. # * deb package [(()) | # (())] For compiling source code. * (()) (()) : (()) (version 0.71) For using debian package. * deb package [(()) | (())] For compiling source code. * (()) See "README" file in above tar.gz file. (but that is wrote in JAPANESE) : (()) (version 0.4.0-2) For using debian package. * deb 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). * (()) * Style file: (()) * (()) * (()) * (()) * ((<"Enhanced version of RDoc Fortran90/95 parser"|URL:http://www.gfd-dennou.org/library/dcmodel>)) #* (()) #* (()) =end EN =begin JA == コンパイルの手引き =end JA =begin EN == Compile source code =end EN =begin JA === TGZ パッケージの展開 適当な作業ディレクトリで以下のようにソースアーカイブを展開します. ソースは dcpam3-((|バージョン|)) というディレクトリに展開されます. $ tar xvzf dcpam3-current.tgz または $ zcat dcpam3-current.tar.gz | tar -xvf - =end JA =begin EN === 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 - =end EN =begin JA === Fortran コンパイラの指定 環境変数 ((* FC *)) に使用する Fortran コンパイラを指定してください. 以下は, 利用するコンパイラが frt の場合です. * sh, bash の場合 $ FC=frt ; export FC * csh, tcsh の場合 $ setenv FC frt 最適化やデバッグのためのオプションは環境変数 ((* FFLAGS *)) に設定してください. 以下は frt の高速化と 並列化のためのオプションです. * sh, bash の場合 $ FFLAGS="-Kfast,parallel" ; export FFLAGS * 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 $ FC=frt ; export FC * 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 $ FFLAGS="-Kfast,parallel" ; export FFLAGS * 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 \ ビルドには GNU make が必要となるため, configure は PATH 内から 自動で GNU make を探査しようとしますが, もし見つからない場合, エラーを返します. その場合には環境変数 ((* MAKE *)) に GNU make コマンドを指定して再度 configure を実行してください. インストール先などを変更したい場合は, 以下のように (({ --help })) オプ ションをつけることで, 指定可能なオプションリストが表示されます. $ ./configure --help 主なオプションに関しての説明です. :(({--prefix=}))((|ARG|)) ((|ARG|)) にライブラリやモジュール, 実行ファイルのインストール先の ディレクトリのプレフィックスを指定します. デフォルトは (({ /usr/local/dcpam3 })) です. :(({--libdir=}))((|ARG|)) ((|ARG|)) にライブラリのインストール先のディレクトリを指定します. デフォルトは (({ /usr/local/dcpam3/lib })) です. :(({--includedir=}))((|ARG|)) ((|ARG|)) にモジュール情報ファイルのインストール先のディレクトリ を指定します. デフォルトは (({ /usr/local/dcpam3/include })) です. :(({--bindir=}))((|ARG|)) ((|ARG|)) に実行ファイルのインストール先のディレクトリを指定します. デフォルトは (({ /usr/local/dcpam3/bin })) です. :(({--with-docdir=}))((|ARG|)) ((|ARG|)) にドキュメントファイルのインストール先を指定します. デフォルトは (({ /usr/local/dcpam3/doc })) です. :(({--with-dcpam_lib_name=}))((|ARG|)) ((|ARG|)) に dcpam3 のライブラリ名を指定します. ライブラリ名は (({lib}))((||))(({.a})) となります. デフォルトは (({ dcpam3 })) であり, その際のライブラリ名は (({ libdcpam3.a })) となります. :(({--with-dcpam_suffix=}))((|ARG|)) ((|ARG|)) にはインストールディレクトリ, ライブラリ名, 実行ファイルの末尾につける接尾語を指定します. 例えば, 他が全てデフォルトの設定で (({ ffc5 })) と指定すると, インストール先のディレクトリのプレフィックスが (({ /usr/local/dcpam3-ffc5 })), ライブラリ名が (({ libdcpam3-ffc5.a }))等のようになります. :(({--with-lang_conform_check=}))((|ARG|)) ((|ARG|)) に言語規格を指定することで, コンパイル時に言語規格の チェックを行うよう, オプションを追加します. 現在 "(({95}))" のみ指定可能です. コンパイラによっては指定できません. :(({--enable-debug})) このオプションを指定することで, コンパイル時や実行時にデバッグメッセージ を出力するオプションを追加します. コンパイラによっては指定できません. :(({--config-cache})) または (({-C})) (({ Config.mk })) ファイルが生成されると同時に, (({config.cache})) ファイルが作成され, (({ ./configure })) の引数に指定された netCDF ライブラリの位置などの情報が保持されます. 再度 (({ ./configure })) を実行する際にもこのオプションを指定することで, (({config.cache})) が読み込まれ, 前回指定したオプション等が引き継がれます. 既に存在する (({config.cache})) を無視する場合はこのオプションを 指定せずに (({ ./configure })) を実行してください. 例えば下記のように (({ ./configure })) を実行するとします. $ ./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 \ すると次回以降, 下記のように (({ ./configure })) を実行することで netCDF ライブラリ等の位置や, デバッグオプションを付加する情報が 引き継がれます. $ ./configure -C Debian GNU/Linux で Fujitsu Fortran を利用している場合には, Config.cache.debian-ffc* を (({config.cache})) に移動して (({ ./configure })) コマンドを実行するだけで自動的に ライブラリの位置が設定されます. $ cp Config.cache.debian-ffc5 config.cache $ ./configure -C =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 \ 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}))((||))(({.a})) . Default value is (({ dcpam3 })), so library name becomes (({ libdcpam3.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/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 =end EN =begin JA === Config.mk の編集 上記の ./configure だけで設定できなかった部分に関しては, (({ Config.mk })) を手動で編集して設定して下さい. 以下に主要な設定項目を挙げます. 詳しくは (({ Config.mk })) を見てください. :FC Fortran コンパイラ :SYSFFLAGS コンパイル時・リンク時に必要なフラグ (Fortran コンパイラ実行時に必要なオプション) :SYSLDFLAGS リンク時に必要なフラグ :SYSLDLIBS リンク時に必要なライブラリ :DCPAMDIR (({Config.mk})) が置いてあるディレクトリ :prefix dcpam3 のライブラリ, モジュール, 実行ファイル, ドキュメントのインストールディレクトリ :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 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 =end EN =begin JA === ソースコードのコンパイル ビルドには必ず GNU make を使用してください. 他の "make" プログラムを使 用すると, 正しくビルドが行われません. 以降 GNU make のコマンド名を "make" と表記しますが, これらはシステムの GNU make コマンドの名前に置き換えてください. ./configure を実行すると, 以下のように GNU make のコマンド名が 表示されます. このメッセージに従って GNU make を実行してください. Execute GNU make in the current directory, as follows. /usr/bin/make =end JA =begin EN === 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 =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 == テストプログラム実行の手順 最初に, Held and Suarez (1994) のベンチマーク実験を 行う方法を説明します. practice ディレクトリに移動してください. $ cd practice そしてそのディレクトリに置いてある init.nml を編集してください. このファイルが初期値生成のための NAMELIST ファイルです. 編集が終わったら, 以下のコマンドで初期値データ init.nc を生成してください. $ make init 次に, dcpam.nml を編集してファイルの出力間隔や出力する 変数の指定を行ってください. 最後に以下のコマンドでプログラムが実行されます. $ make run なお, エラーは dcpam.log に出力され, 通常のメッセージは標準出力に 出力されます. 通常のメッセージをファイルに出力する場合には $ make run > dcpam.msg としてください. なお, 現在の設定ではデバッグ用メッセージも 全て dcpam.log に出力されるようになっています. (サイズが大きい ので注意してください). 結果は result ディレクトリ以下に出力されます. 次に, 簡単な物理過程を導入した場合のテスト実験の方法を 説明します. practice ディレクトリに移動してください. $ cd practice そしてそのディレクトリに置いてある init_ape_T21L16.nml を init.nml にコピーします. $ cd init_ape_T21L16.nml init.nml init.nml を必要に応じて編集します. その後, 以下のコマンドで 初期値データ init.nc を生成してください. $ make init 次に, dcpam_ape.nml を編集してファイルの出力間隔や出力する 変数の指定を行ってください. 最後に以下のコマンドでプログラムが実行されます. $ make ape-run =end JA =begin EN == 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 =end EN =begin JA == システムへインストールする場合 もしもシステムに dcpam3 のライブラリ, モジュール, 実行ファイルを インストールする場合は, カレントディレクトリで以下のコマンドを 実行してください. システム領域にインストールする場合には管理者権限が 必要です. # make install ドキュメントをインストールする場合には以下のコマンドを実行します. # make install-doc =end JA =begin EN == 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 =end EN =begin HTML
$Id: INSTALL,v 1.10 2007/06/08 02:23:43 morikawa Exp $ =end HTML #== Mode setting for Emacs #Local Variables: #mode: rd #End: #