- 追加された行はこの色です。
- 削除された行はこの色です。
#topicpath
* 領域気象モデル [#t92faff1]
** WRF [#f8e57fc0]
*** WRFについての情報 [#g61fc9ab]
-- WRFとは
-- WRFとは~
~
The &color(red){W};eather &color(red){R};esearch & &color(red){F};orecasting Model のこと。~
現在も開発が進む領域気象モデル。~
ホームページ : http://www.wrf-model.org/index.php ~
(更新 : 2013-03-25 (月) 13:56:23 )~
マニュアル : [[ARWの User's Guide>http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/ARWUsersGuideV3.pdf]](PDFファイル)~
(更新 : 2013-04-17 (水) 10:32:47 )~
~
*** WRF 導入準備 [#e1642ebc]
+ 導入の前に
++ ハードウエア環境~
--- CPU~
AMD Phenom(tm) II X6 1065T Processor : 6コア, 2.90 GHz~
*** [[WRFの導入(WRFのインストール)>./WRFの導入]] [#accd5976]
-- WRF の導入について、その準備から、テストとしての実行までの流れを[[まとめた>./WRFの導入]]。~
--- WRF-ARW Ver. 3.5 (リリース:2013-04-18) 対応
--- WRF-ARW Ver. 3.4.1 (リリース:2012-08-16) 対応
*** [[WRFの物理パラメタ・初期条件・境界条件>./WRFの諸条件の設定]] [#s2fddc8a]
-- [[新しいケースの作成>./WRFの諸条件の設定#qe2528b4]]
-- [[変数やサブルーチンを調べる手掛かり>./WRFの諸条件の設定#x1b3f2ee]]
-- [[諸条件の設定>./WRFの諸条件の設定#r214bb0e]]
~
--- GPGPU~
Nvidia "Geforce GTX 660" with compute capability 3.0~
*** [[WRFの継続計算と出力時間間隔>./WRFの継続計算と出力時間間隔]] [#s5e1f2b7]
*** [[WRFの出力結果を描画>./WRFの出力結果を描画]] [#qafa7936]
*** [[実行時間についてのメモ>./実行時間についてのメモ]] [#m8a2105c]
計算時間の検討をつけるために、様々なケースでどれくらいの計算時間がかかったか、[[メモ>./実行時間についてのメモ]]していく。
** ASUCA [#i7e143ef]
力学コアを GPGPU で計算するようにしているため、GPGPU の性能を引き出すことができる。
+ 関連情報
-- [[東工大青木先生>http://www.sim.gsic.titech.ac.jp/Japanese/Research/weather.html]]
-- [[「ながれ」の記事(2011)>http://www.nagare.or.jp/assets/files/download/noauth/nagare/30-2/30-2tokushu4.pdf]](PDF)
-- [[室井ちあし氏によるレポート(2010-07-14)>http://wtk.gfd-dennou.org/arch.htm#label-121]]
-- [[ITmedia のレポート(2010-03-24)>http://www.itmedia.co.jp/enterprise/articles/1003/24/news078.html]]
** CReSS [#i66e80d9]
「雲解像モデル」である。
+ 関連情報
-- [[CReSSホームページ>http://www.rain.hyarc.nagoya-u.ac.jp/~tsuboki/cress_html/index_cress_jpn.html]]
** NHM [#d17fe3d3]
気象庁の非静力学モデル。開発は終了している?後継のモデルの名称は「気象庁 非静力学モデル(メソ数値予報モデル)」?
+ 関連情報
-- [[数値予報研究開発プラットホーム(気象庁)>http://pfi.kishou.go.jp/]]
** deepconv [#a6511283]
地球電脳倶楽部の2次元積雲対流モデル
+ 関連情報
-- [[地球電脳倶楽部 deepconv プロジェクト>http://www.gfd-dennou.org/arch/deepconv/]]
+ インストール
-- 環境 (2016-11-11 (金) 11:15:38 更新)
--- 環境の準備~
あらかじめ、電脳クラブのパッケージを導入できるように、次のレポジトリを /etc/apt/sources.list に加える。詳細は、[[地球流体電脳倶楽部謹製品 Debian パッケージ集>http://www.gfd-dennou.org/library/cc-env/debian-dennou/]]を参照のこと。~
# for jessie
deb http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou jessie main
deb-src http://www.gfd-dennou.org/library/cc-env/Linux/debian-dennou jessie main
これを利用できるように次の作業をしておく。~
sudo apt-get install debian-keyring
gpg --keyring /usr/share/keyrings/debian-maintainers.gpg --export -a 891D7E07 | sudo apt-key add -
~
※ なお、GPGPU を WRF に使うことについての[[ここ>http://www.nvidia.co.jp/object/weather_jp.html]]の記述を見ると、一見、圧倒的なパフォーマンスを示しているように見える。~
しかし、よく見ると、Micro Physics のプログラムについてであり、全体のパフォーマンスは 1.25倍であるときちんと書いてある。~
現時点では、WRF 全体で速くなることはほとんどなさそうである。~
--- Debian (jessie) ~
パッケージの準備:~
標準的にコンパイルできる環境~
gfortran~
ruby-numru-misc~
など~
電脳クラブが提供するパッケージ~
gtool5~
gphys~
など。多分、上記のパッケージを導入すれば、必要なものは全部入るのでは?~
~
※ ただし、[[Smiling Life の記事>http://blog.livedoor.jp/rootan2007/archives/51411320.html]]は期待を持たせる。
-- 手順~
※ 実行できないところ(インストール)は root になって作業する。
+++ ファイルのダウンロード~
・上記プロジェクトのページから、最新リリース版の TAR+GZIP 版をダウンロードする。~
・[[インストールの手引>http://www.gfd-dennou.org/arch/deepconv/arare5/arare5_current/INSTALL.htm]] をたどって、netcdf-3.6.3.tar.gz をダウンロードする。~
~
++ ソフトウエア環境~
Debian GNU/Linux (squeeze) で、主な導入済みパッケージは次のとおり。~
| パッケージ名 | バージョン | 説明 |h
| gfortran |4:4.4.5-1| The GNU Fortran 95 compiler|
| gcc |4:4.4.5-1| The GNU C compiler|
| libnetcdf-dev |1:4.1.1-5| Development kit for NetCDF|
| libnetcdf6 |1:4.1.1-5| An interface for scientific data access to large binary data|
| csh |20070713-2| Shell with C-like syntax, standard login shell on BSD systems|
|libopenmpi-dev |1.4.2-4| high performance message passing library -- header files|
|libopenmpi1.3 |1.4.2-4| high performance message passing library -- shared library|
|openmpi-bin |1.4.2-4| high performance message passing library -- binaries|
|openmpi-checkpoint |1.4.2-4| high performance message passing library -- checkpoint support|
|openmpi-common |1.4.2-4| high performance message passing library -- common files|
+++ 展開
// tar xvzf gtool5_current.tgz
tar xvzf netcdf-3.6.3.tar.gz
~
+++ netcdf-3.6.3 のコンパイル~
Debian 本家の netcdf とのバッティングは、きっと無いようにできているのだろうけど、念の為に自家製にする。
cd netcdf-3.6.3
./configure
make
※ 以降、lib〜.a (スタティックリンク) を用いるため、場所が特定できればインストールしなくてよい。多分。~
~
++ コンパイラの選択~
// +++ gtool5 のコンパイルとインストール
// cd gtool5-20101228-1
// ./configure --with-netcdf=../netcdf-3.6.3/fortran/.libs/libnetcdff.a --with-netcdf-include=../netcdf-3.6.3/libsrc
// make
// make install
// ※ こちらはインストールした。~
//~
+++ arare のコンパイル
cd arare5-20160127-3
// ※ この段階で Mkinclude.in を編集し、インストール先のディレクトリを設定しておく。
./configure --with-netcdf=../netcdf-3.6.3/lib/libnetcdff.a
make
// make install
~
WRF を Linux 上で動作させるとき、標準でサポートされているコンパイラは、PGI, Intel, Pathscale, gfortran である。~
このうち、無料で利用できるのは Intel と gfortran であり、さらに、「何の対価もなくプログラム開発するときだけ無償」~
とする Intel のコンパイラは使えない。そこで gfortran を使うことになる。(※ ベンチマークで比較することは、いつかやってみよう。)~
+ サンプルの実行
// ++ 設定ファイルのコピー~
// 適当なディレクトリに移動し、src/sample_nml 以下の設定ファイル 〜.conf と 〜_init-data.conf をコピーする。
// cp -p ../../arare5-20130130-2/src/sample_nml/arare-thermal-dry_init-data.conf .
// cp -p ../../arare5-20130130-2/src/sample_nml/arare-thermal-dry.conf .
// ~
// ++ 実行
コンパイルしたディレクトリの下の exp_setup_files 以下にサンプルがある。ここに入って、ディレクトリ内の ruby スクリプトを実行する。
cd exp_setup_files/03_gravity-wave
./testrun.rb
~
Open64 というコンパイラの選択肢もある。しかし、情報が極端に少ない。~
※ 出力は netcdf 形式のファイルになる。~
※ ファイルは一つの変数につき一つのファイルになる。~
~
なお、コンパイラを変更すると、OpenMPI も同じコンパイラでコンパイルしなおす必要があるようだ。このことからしても、~
gfortran を選ぶのはそれほど悪い選択肢ではない。~
+ メモ
++ CPU の稼働率と並列化
CPU の稼働率が 20〜30 % しかない。データの書き込みに時間がかかっているのなら、並列処理にしても速度は見込めない。~
並列化すると、出力ファイルが複数に分かれるらしい。とりあえず、並列しない。~
簡単な実行ならば、ファイル出力に時間がかかるので、メリットも少ない。~
~
ここでは、gfortran と Open64 について、可能な範囲で試してみる。~
× %%gprof で検討?%%~
○ データ出力との兼ね合い?~
~
// 現在、Fortran は過去の言語となりつつあり、高性能なコンパイラの選択肢は限られる。まして、~
// 入手価格が低廉であるか、またはゼロであるようなコンパイラは極めて限られてくる。~
+ ソースプログラムの取得
++ ユーザー登録~
WRF は無償で手に入れることができる。しかし、ユーザー登録は必要である。~
http://www.mmm.ucar.edu/wrf/users/download/get_source.html にアクセスしてユーザー登録をする。~
二度目からは、Returning User をクリックすれば、メールアドレスを入力するだけでダウンロードページへつながる。~
(更新 : 2013-03-25 (月) 14:11:54)~
++ モデルに与えるパラメタ
+++ 重み関数のパラメタ~
[[ここ>http://www.gfd-dennou.org/arch/deepconv/arare4/arare4_current/doc-mmc/dai1bu/pub/teishiki.pdf#page=30]]を参照のこと。~
~
++ プログラムの種類~
WRF を利用するために、ソースプログラムをダウンロードしようとすると、いくつかの種類のファイルに分かれている~
ことに気づいて戸惑う。これらのソースプログラムはそれぞれ役割がある。(更新 : 2013-03-25 (月) 14:41:27)~
--- ARW : Advanced Research WRF~
力学計算や放射計算などが組み込まれたソースプログラム。WRF の中核的なプログラム。~
++ 計算例~
[[ここ>http://www.gfd-dennou.org/arch/deepconv/sample/SIGEN.htm]]にたくさん!~
~
--- WPS : WRF Preprocessor System~
現実のデータを ARW に与えるための前処理プログラム。
理想的な地形、簡単な初期条件を用いて計算する場合には不必要である。~
++ 変数名~
+++ 数理モデルでの変数~
[[deepconv/arare リファレンスマニュアル>http://www.gfd-dennou.org/library/deepconv/arare5/arare5_current/doc/]]の中にある[[数理モデル解説>http://www.gfd-dennou.org/library/deepconv/arare5/arare5_current/doc/dai1bu/pub/teishiki.pdf]]に、数理モデル中に現れる[[変数一覧>http://www.gfd-dennou.org/library/deepconv/arare5/arare5_current/doc/dai1bu/pub/teishiki.pdf#page=43]]がある。
+++ プログラムの解説から抜き出した変数一覧~
・history ファイル用?
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'CDens' | 'x','y','z','t' | 'CDens' | 'm2.s-1' | 'double', history=rstat |
| 'DensBZ' | 'x','y','z' | 'density' | 'Kg.m-3' | 'double', history=rstat |
| 'EffMolWtBZ' | 'x','y','z' | 'Effect of Mole Weight' | '1' | 'double', history=rstat |
| 'Exner' | 'x','y','z','t' | 'nondimensional pressure' | '1' | 'double', history=rstat |
| 'ExnerBZ' | 'x','y','z' | 'nondimensional pressure' | '1' | 'double', history=rstat |
| 'HumBZ' | 'x','y','z','s' | 'Humidity' | '1' | 'double', history=rstat |
| 'Kh' | 'x','y','z','t' | 'Kh' | 'm2.s-1' | 'double', history=rstat |
| 'Km' | 'x','y','z','t' | 'Km' | 'm2.s-1' | 'double', history=rstat |
| 'PTemp' | 'x','y','z','t' | 'virtual potential temperature' | 'K' | 'double', history=rstat |
| 'PTempBZ' | 'x','y','z' | 'potential temperature' | 'K' | 'double', history=rstat |
| 'PressBZ' | 'x','y','z' | 'Pressure of basic state' | 'Pa' | 'double', history=rstat |
| 'QMix' | 'x','y','z','s','t' | 'Mixing Ratio' | 'kg.kg-1' | 'double', history=rstat |
| 'QMixBZ' | 'x','y','z','s' | 'Mixing ratio of Condensible volatiles' | 'kg.kg-1' | 'double', history=rstat |
| 'TempBZ' | 'x','y','z' | 'Temperature of basic state' | 'K' | 'double', history=rstat |
| 'VPTempBZ' | 'x','y','z' | 'virtual potential temperature' | 'K' | 'double', history=rstat |
| 'VelSoundBZ' | 'x','y','z' | 'sound velocity' | 'm.s-2' | 'double', history=rstat |
| 'VelX' | 'x','y','z','t' | 'zonal velocity' | 'm.s-1' | 'double', history=rstat |
| 'VelY' | 'x','y','z','t' | 'meridional velocity' | 'm.s-1' | 'double', history=rstat |
| 'VelZ' | 'x','y','z','t' | 'vertical velocity' | 'm.s-1' | 'double', history=rstat |
~
--- WRF-DA : WRF Data Assimilation~
データ同化システムのようである。詳しくはわからない。~
・速度(y,z成分で、x成分と同じものは省略)
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'VelX' | 'x','y','z','t' | 'zonal velocity' | 'm.s-1' | float |
| 'VelXAdv' | 'x','y','z','t' | 'Advection term of velocity (x)' | 'm.s-2' | float |
| 'VelXNDiff' | 'x','y','z','t' | 'Numerical diffusion term of velocity (x)' | 'm.s-2' | float |
| 'VelXNDiff2' | 'x','y','z','t' | 'Numerical diffusion term of velocity (x) (2 order)' | 'm.s-2' | float |
| 'VelXPGrad' | 'x','y','z','t' | 'Pressure gradient term of velocity (x)' | 'm.s-2' | float |
| 'VelXSWF' | 'x','y','z','t' | 'Filter for acoustic mode (x)' | 'm.s-2' | float |
| 'VelXSfc' | 'x','y','z','t' | 'x-component velocity tendency by surface flux' | 'm.s-2' | float |
| 'VelXSfcFlux'* | 'x','y','t' | 'surface flux of x-component of velocity (momentum flux divided by density)' | 'm2.s-2' | float |
| 'VelXSpng' | 'x','y','z','t' | 'Damping term of VelX' | 'm.s-1' | float |
| 'VelXTurb' | 'x','y','z','t' | 'Turbulence term of velocity (x)' | 'K.s-1' | float |
| 'VelY' | 'x','y','z','t' | 'zonal velocity' | 'm.s-1' | float |
| 'VelZ' | 'x','y','z','t' | 'vertical velocity' | 'm.s-1' | float |
| 'VelZBuoyD' | 'x','y','z','t' | 'Buoyancy (Drag)' | 'm.s-2' | float |
| 'VelZBuoyM' | 'x','y','z','t' | 'Buoyancy (MolWt)' | 'm.s-2' | float |
| 'VelZBuoyT' | 'x','y','z','t' | 'Buoyancy (Temperature)' | 'm.s-2' | float |
| 'SfcXMomFlux'* | 'x','y','t' | 'surface x-component momentum flux' | 'kg.m-2.s-1' | float |
| 'SfcYMomFlux'* | 'x','y','t' | 'surface y-component momentum flux' | 'kg.m-2.s-1' | float |
~
--- WRF-Chem : ~
大気中の化学物質の輸送を計算するプログラムのようである。詳しくはわからないが、現在は ARW に組み込んで使うようだ。~
・圧力
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'Exner' | 'x','y','z','t' | 'disturbunce of nondimensional pressure' | ' ' | float |
| 'ExnerAdv' | 'x','y','z','t' | 'Advection term of exner function' | 's-1' | float |
| 'ExnerAll' | 'x','y','z','t' | 'nondimensional pressure' | ' ' | float |
| 'ExnerCond' | 'x','y','z','t' | 'Latent heat term of exner function' | 's-1' | float |
| 'ExnerCondQMix' | 'x','y','z','t' | 'Latent heat term of exner function (QMix)' | 'K.s-1' | float |
| 'ExnerCondTemp' | 'x','y','z','t' | 'Latent heat term of exner function (Temp)' | 'K.s-1' | float |
| 'ExnerDisp' | 'x','y','z','t' | 'Dissipation term of exner function' | 'K.s-1' | float |
| 'ExnerFall' | 'x','y','z','t' | 'Fall term of Exner function' | 'kg.kg-1.s-1' | float |
| 'ExnerFlux' | 'x','y','z','t' | 'surface flux of Exner function' | 'kg.kg-1.s-1' | float |
| 'ExnerNDiff' | 'x','y','z','t' | 'Numerical diffusion term of exner function' | 's-1' | float |
| 'ExnerNDiff2' | 'x','y','z','t' | 'Numerical diffusion term of exner function (2 order)' | 's-1' | float |
| 'ExnerRad' | 'x','y','z','t' | 'Radiation term of Exner function' | 'K.s-1' | float |
| 'ExnerRad' | 'x','y','z','t' | 'Radiation term of exner function' | 's-1"' | float |
| 'ExnerSfc' | 'x','y','z','t' | 'exner function tendency by surface flux' | 'K.s-1' | float |
| 'ExnerSfcFlux'* | 'x','y','t' | 'surface exner function flux (heat flux divided by density and specific heat)' | 's-1' | float |
~
--- Post-Processing Software : ~
WRF から出力されたものを図にするためのソフトウエア~
・温度・熱
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'PTemp' | 'x','y','z','t' | 'disturbunce of potential temperature' | 'K' | float |
| 'PTempAdv' | 'x','y','z','t' | 'Advection term of potential temperature' | 'K.s-1' | float |
| 'PTempAll' | 'x','y','z','t' | 'potential temperature' | 'K' | float |
| 'PTempCond' | 'x','y','z','t' | 'Latent heat term of potential temperature' | 'K.s-1' | float |
| 'PTempDisp' | 'x','y','z','t' | 'Dissipation term of potential temperature' | 'K.s-1' | float |
| 'PTempFlux' | 'x','y','z','t' | 'surface flux of potential temperature' | 'kg.kg-1.s-1' | float |
| 'PTempNDiff' | 'x','y','z','t' | 'Numerical diffusion term of potential temperature' | 'K.s-1' | float |
| 'PTempNDiff2' | 'x','y','z','t' | 'Numerical diffusion term of potential temperature (2 order)' | 'K.s-1' | float |
| 'PTempRad' | 'x','y','z','t' | 'Radiation term of potential temperature' | 'K.s-1' | float |
| 'PTempSfc' | 'x','y','z','t' | 'potential temperature tendency by surface flux' | 'K.s-1' | float |
| 'PTempSfcFlux'* | 'x','y','t' | 'surface potential temperature flux (heat flux divided by density and specific heat)' | 'K.m.s-1' | float |
| 'PTempSpng' | 'x','y','z','t' | 'Damping term of potential temperature' | 'K.s-1' | float |
| 'PTempTurb' | 'x','y','z','t' | 'Turbulence term of potential temperature' | 'K.s-1' | float |
| 'SfcHeatFlux'* | 'x','y','t' | 'surface heat flux' | 'W.m-2' | float |
~
--- Utilities : ~
その他の補助的なソフトウエア~
・化学種
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 化学種 | 'x','y','z','t' | 化学種' Mixing Ratio' | 'kg.kg-1' | float |
| 化学種'All' | 'x','y','z','t' | 化学種' Mixing Ratio' | 'kg.kg-1' | float |
| 化学種'_Adv' | 'x','y','z','t' | 'Advection term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
| 化学種'_Cond' | 'x','y','z','t' | 'Condensation term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
| 化学種'_Fall' | 'x','y','z','t' | 'Fall Rain term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
| 化学種'_FallFluxAtLB' | 'x','y','t' | 'Falling Rain Flux '化学種 | 'kg.m-2.s-1' | float |
| 化学種'_Fill' | 'x','y','z','t' | 'Filling Negative term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
| 化学種'_Flux' | 'x','y','z','t' | 'Surface Flux term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
| 化学種'_Hum' | 'x','y','z','t' | 'Humidity of '化学種 | '1' | float |
| 化学種'_NDiff' | 'x','y','z','t' | 'Diffusion term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
| 化学種'_NDiff2' | 'x','y','z','t' | 'Diffusion term of '化学種' mixing ratio (2 order)' | 'kg.kg-1.s-1' | float |
| 化学種'_Sfc' | 'x','y','z','t' | 化学種' mixing ratio tendency by surface flux' | 's-1' | float |
| 化学種'_SfcFlux'* | 'x','y','t' | 'surface flux of '化学種' mixing ratio (mass flux divided by density)' | 'm.s-1' | float |
| 化学種'_SfcMassFlux'* | 'x','y','t' | 化学種' surface mass flux' | 'kg.m-2.s-1' | float |
| 化学種'_Turb' | 'x','y','z','t' | 'Turbulence term of '化学種' mixing ratio' | 'kg.kg-1.s-1' | float |
~
++ ダウンロード~
--- 本体~
ソフトウエアの種類は上述のとおりなので、とりあえず必要なのは、ARW と Post-Processing Software である。~
とりあえずコンパイルできること、実行できることを確かめるためには、ARW だけでよい。~
http://www.mmm.ucar.edu/wrf/users/download/get_sources.html#V341 から ARW をダウンロードする。~
現時点で、Ver 3.4.1 が最新である。30MB 弱の大きさである。~
(更新 : 2013-03-25 (月) 14:41:27)~
・乱流混合
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'Km' | 'x','y','z','t' | 'turbulet diffusion coefficient' | 'm2.s-1' | float |
| 'KmAdv' | 'x','y','z','t' | 'Advection of Km' | 's-1' | float |
| 'KmBuoyM' | 'x','y','z','t' | 'Buoyancy term of Km (composition)' | 's-1' | float |
| 'KmBuoyT' | 'x','y','z','t' | 'Buoyancy term of Km (temperature)' | 's-1' | float |
| 'KmDiff' | 'x','y','z','t' | 'Diffusion term of Km' | 's-1' | float |
| 'KmDisp' | 'x','y','z','t' | 'Dissipation term of Km' | 's-1' | float |
| 'KmNDiff' | 'x','y','z','t' | 'Diffusion term of Km' | 's-1' | float |
| 'KmNDiff2' | 'x','y','z','t' | 'Diffusion term of Km' | 's-1' | float |
| 'KmShear' | 'x','y','z','t' | 'Shear term of Km' | 's-1' | float |
| 'Kh' | 'x','y','z','t' | 'turbulet diffusion coefficient for heat' | 'm2.s-1' | float |
~
--- 更新ファイル~
いくつかの必要な更新ファイルが出ている(cf. [[Known Problems>http://www.mmm.ucar.edu/wrf/users/wrfv3.4/known-prob-3.4.1.html]])。~
対策のとられた日付けが、Ver 3.4.1 のリリースの日(2012年8月16日)よりも前であっても安心してはいけない。~
それほど親切ではないので、確認しながら自分で対策をとる。具体的にはファイルをダウンロードして入れ換える。~
今回の場合( module_mp_radar.F と input_wrf.F )は、全体にあまり影響を与えないように思われるが、気持ちよくするために入れ換える。~
・雲
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'CDens' | 'x','y','z','t' | 'Cloud density' | 'kg.m-3' | float |
| 'CDensAdv' | 'x','y','z','t' | 'Advection term of cloud density' | 'kg.m-3.s-1' | float |
| 'CDensCond' | 'x','y','z','t' | 'Latent heat term of cloud density' | 'K.m-3.s-1' | float |
| 'CDensFill' | 'x','y','z','t' | 'Filling Negative term of cloud density ' | 'kg.m-3.s-1' | float |
| 'CDensNDiff' | 'x','y','z','t' | 'Numerical diffusion term of cloud density' | 'kg.m-3.s-1' | float |
| 'CDensNDiff2' | 'x','y','z','t' | 'Numerical diffusion term of cloud density (2 order)' | 'kg.m-3.s-1' | float |
| 'CDensTurb' | 'x','y','z','t' | 'Turbulence term of cloud density' | 'kg.m-3.s-1' | float |
~
また、WRF では実行する度にソースツリーが変更される。そこで、入れ換えた状態のソースツリーを別途保存しておく。~
(更新 : 2013-03-25 (月) 14:58:36)~
~
~
*** WRF 試しの実行まで( gfortran serial で ) [#g20817e2]
++ configure~
コンパイラとして gfortran を選ぶ。また、CPU は一つのコアだけを用いるとして、serial を選択する。~
実際の入力と出力結果は次の通り。&color(red){->};は入力に関係した行であることを意味する。~
-> [localhost] ~/WRFV3 15:34:15 $ ./configure
checking for perl5... no
checking for perl... found /usr/bin/perl (perl)
** WARNING: No path to NETCDF and environment variable NETCDF not set.
** would you like me to try to fix? [y]
-> y
Enter full path to NetCDF include directory on your system
-> /usr/include
Enter full path to NetCDF library directory on your system
-> /usr/lib
...(中略)
------------------------------------------------------------------------
Please select from among the following supported platforms.
1. Linux x86_64, PGI compiler with gcc (serial)
...(中略)
23. x86_64 Linux, gfortran compiler with gcc (serial)
...(中略)
-> Enter selection [1-34] : 23
------------------------------------------------------------------------
-> Compile for nesting? (0=no nesting, 1=basic, 2=preset moves, 3=vortex following) [default 0]: 0
Configuration successful. To build the model type compile .
...(以下省略)
(更新 : 2013-03-25 (月) 15:48:29)~
~
++ compile~
具体的に実行可能プログラムを作るには、compile コマンドを実行する。
-> ./compile
すると、こんな理想化条件が実行できます、というメッセージが出てくるので、2次元の海陸風モデルを選んで実行する。
-> ./compile em_seabreeze2d_x
結構な時間をかけてコンパイルすることになる。一番最後に、コンパイルの所要時間が表示された。
build started: 2013年 3月 25日 月曜日 15:46:02 JST
build completed: 2013年 3月 25日 月曜日 15:57:42 JST
~
なお、選べるサンプルプログラムは次の通り。~
| 次元 | ケースの名称 | 設定 |h
| 1 | em_scm_xy | single column model, 4 km, full physics |
| | | |
| 2 | em_grav2d_x | gravity current, 100 m |
| 2 | em_hill2d_x | flow over a hill, 2 km |
| 2 | em_seabreeze2d_x | water and land, 2 km, 20km top, full physics |
| 2 | em_squall2d_x | squall line, 250 m |
| 2 | em_squall2d_y | transpose of above problemINITIALIZATION |
| | | |
| 3 | em_b_wave | baroclinic wave, 100 km |
| 3 | em_fire | surface fire, 50 m |
| 3 | em_heldsuarez | global case with polar filtering, 625 km |
| 3 | em_les | large eddy simulation, 100 m |
| 3 | em_quarter_ss | super cell, 2 km |
| 3 | em_tropical_cyclone | hurricane, 15 km |
~
~
++ 実行
-> cd test/em_seabreeze2d_x
-> csh ./run_me_first.csh
-> ./ideal.exe
-> time ./wrf.exe
最後に
d01 2007-06-01_17:00:00 wrf: SUCCESS COMPLETE WRF
と表示されて実行も終了。time で測った所要時間は次のとおり。
real 4m59.360s
user 4m50.266s
(更新 : 2013-03-25 (月) 16:15:02)~
~
*** WRF 試しの実行まで( gfortran dmpar で ) [#g20817e2]
++ configure~
コンパイラとして gfortran を選ぶ。また、CPU の複数コアを用いる MPI を利用するとして、dampr を選択する。~
実際の入力と出力結果(ほとんど省略)~
-> [localhost] ~/WRFV3 15:34:15 $ ./configure
...(中略)
------------------------------------------------------------------------
Please select from among the following supported platforms.
1. Linux x86_64, PGI compiler with gcc (serial)
...(中略)
25. x86_64 Linux, gfortran compiler with gcc (dmpar)
...(中略)
-> Enter selection [1-34] : 25
------------------------------------------------------------------------
...(以下省略)
~
++ compile~
2次元の海陸風モデルは、MPIに対応していない。そこで、3次元の傾圧不安定波を選んで実行する。
-> ./compile em_b_wave
結構な時間をかけてコンパイルすることになる。一番最後に、コンパイルの所要時間が表示された。
build started: 2013年 3月 25日 月曜日 17:19:28 JST
build completed: 2013年 3月 25日 月曜日 17:31:53 JST
~
++ 実行
-> cd test/em_b_wave
-> csh ./run_me_first.csh
-> mpirun -n 5 ./ideal.exe
-> time mpirun -n 5 ./wrf.exe
ログは表示されない。mpirun を使って実行するところがミソ。この場合、5個のコアを使っている。time で測った所要時間は次のとおり。
real 3m21.428s
user 16m32.850s
sys 0m2.952s
同じプログラムを serial で実行すると、dmpar では2〜3倍の速さで動いていることがわかる。
real 9m19.641s
user 9m2.306s
sys 0m14.033s
(更新 : 2013-03-25 (月) 18:37:30)~
~
・その他
#style(class=table_left)
|変数名|次元|説明|単位|型|h
| 'DensDev' | 't' | 'Total density deviation' | 'kg' | float |
| 'ElstEnrgy' | 't' | 'Total elastic energy' | 'J' | float |
| 'KinEnrgy' | 't' | 'Total kinetic energy' | 'J' | float |
| 'PotEnrgy' | 't' | 'Total potential energy' | 'J' | float |