在Fedora 9下用IFC安装MM5
Apr 29th
本文由杨亚钦提供,敝人略作修改。希望对新手有帮助。另一篇较旧但仍有参考意义的中文入门指南参见http://zhang20031320025.blog.163.com/blog/static/59805856200891233858965/。
本篇文章包括以下内容
---------------------------------------------------------------------
1.安装Fedora 9
2.安装INTEL Fortran Complier
3.安装NCAR Graphics
4.测试INTEL Fortran complier 和 NCAR Graphics
5.运行TERRAIN
6.运行REGRID
7.运行INTERPF
8.运行MM5
9.后处理
---------------------------------------------------------------------
1.安装Fedora 9
下载Fedora 9 (http://mirrors.fedoraproject.org/publiclist/Fedora/9/i386/),用grldr硬盘安装Fedora 9,安装方法可以在网上搜索找到。记得安装软件开发库包括X窗口的开发库(若非命令行形式运行),以及开发工具。
2.安装INTEL Fortran Complier
到INTEL网站下载INTEL Fortran Complier
按照里面的介绍安装,默认安装目录为:
/opt/intel/fc/10.1.022
/opt/intel/idb/10.1.022
安装过程中可能提示:需要libstdc++so.5,这时可以运行
# yum install libstdc++.so.5
然后重装安装INTEL Fortran Complier。安装完成后,进入安装目录下/bin,
# source ifortvars.sh
3.安装NCAR Graphics (可选)
下载NCARG,不同的版本安装方法不尽相同,以ncarg-4.4.0.REDHAT9_GNU3_PC.tar.gz为例,下载并解压后进入INSTALL目录,输入命令
# ./INSTALL
然后按照提示安装即可,默认安装目录:/usr/local/ncarg ,安装完成后还需要设置环境变量。
4.测试INTEL Fortran complier 和 NCAR Graphics
测试INTEL Complier:
输入which ifort,如果能看到/opt/intel/fce/10.0.015/bin/ifort ,那么就安装设置成功了
测试NCAR Graphics:
# ncargex cpex08
# ctrans -d X11 cpex08.ncgm
能看到图形表示安装成功,如果提示“g77: command not found.”,则运行
# yum install compat-gcc-34-g77.i386
或许自己下载安装compat-gcc-34-g77.i386,然后重新再试一次
5.编译运行TERRAIN
下载MM5的所有模块: ftp://ftp.ucar.edu/mesouser/MM5V3
下载TERRAIN DATA: ftp://ftp.ucar.edu/mesouser/MM5V3/TERRAIN_DATA
5.1 下载libg2c.a 放到 /usr/lib/ , 如果 /usr/lib/gcc-lib/i386-redhat-linux/*.*.*/ 中有该文件则不用下载
5.2 编辑 Makefile
# gedit Makefile
找到以下段,修改为libg2c.a的目录,如/usr/lib/
intel:
echo "Compiling for Linux using INTEL complier"
....
"LOCAL_LIBRARIES = -L$(NCARG_ROOT)/lib -L/usr/X11R6/lib –lncarg -lncarg_gks -lncarg_c -lX11 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/ -lg2c " ) ;
.....
5.3 编译
# make intel
# make terrain.deck
若成功,会出现:
90 Lines Compiled
/bin/rm -f rdnml.f
ifc rdnml.o -i_dynamic -o rdnml
make[1]: Exiting directory `$home/mm5v3/TERRAIN/src'
5.4 编辑 terrain.deck.intel
# gedit terrain.deck.intel
根据需要修改里面的参数,然后输入命令
# mv terrain.deck.intel terrain.deck
5.5 运行
# ./terrain.deck
若成功,会出现:
mon dec 29 14:18:43 CET 2003
./terrain.exe
rm fort.15 fort.16 fort.18
若成功,输出日志文件最后会出现:
== NORMAL TERMINATION OF TERRAIN PROGRAM ==
FORTRAN STOP 9999
并产生TERRAIN_DOMAIN1、TERRAIN.DOMAIN2..等文件
5.6 画图
# idt TER.PLT
如果对输出结果不满意则回到5.4再编辑terrain.deck,然后重新运行
6.运行REGRID
进入REGRID的目录,输入
# make intel
# cd pregrid
# gedit pregrid.csh
根据输入的数据编辑 pregrid.csh ,具体见MM5说明书
# ./pregrid.csh
如果成功,最后会显示
Normal termination of program PREGRID_****
# cd ../regridder
根据输入数据编辑 namelist.input
# ./regridder
如果成功,regridder目录下会出现
-rw-r--r-- 1 mesouser users 2177888 Mar 17 18:26 REGRID_DOMAIN1
7.运行INTERPF
进入INTERPF的目录,输入命令
# ./make intel
根据REGRID的输出结果,修改namelist.input ,然后执行
# ./interpf
若成功,最后讲话显示
-------------------------------------------------
FINISHED INTERPF FOR DOMAIN ID #1
-------------------------------------------------
STOP 99999
在INTERPF目录下也会产生三个文件
-rw-r--r-- 1 mesouser users 1825164 Jan 7 08:13 BDYOUT_DOMAIN1
-rw-r--r-- 1 mesouser users 170936 Jan 7 08:13 LOWBDY_DOMAIN1
-rw-r--r-- 1 mesouser users 2889044 Jan 7 08:13 MMINPUT_DOMAIN1
8.运行MM5
8.1 MM5 输入数据
要运行MM5你需要以下数据,并要把数据复制或者链接到 MM5/Run/中:
INTERPF的输出数据MMINPUT_DOMAIN1、BDYOUT_DOMAIN1、LOWBDY_DOMAIN1
TERRAIN的输出数据TERRAIN_DOMAIN*
注:其中“*”为 2、3、4……
8.2 编辑 configure.user
# gedit configure.user
找到下面这段,把"#"去掉
#--------------------------------------------------------------------------
# 3i2. PC_INTEL (LINUX/INTEL)
#--------------------------------------------------------------------------
#RUNTIME_SYSTEM = "linux"
#FC = ifort
#FCFLAGS = -I$(LIBINCLUDE) -O2 -tp p6 -pc 32 -convert big_endian
#CPP = /lib/cpp
#CFLAGS = -O
#CPPFLAGS = -I$(LIBINCLUDE)
#LDOPTIONS = -O2 -tp p6 -pc 32 -convert big_endian
#LOCAL_LIBRARIES =
#MAKE = make -i -r
找到以下段,一般需要根据TERRAIN的设置修改。MAXNES 为区域的数量,MIX和MJX 为最大网格数
#--------------------------------------------------------------------------
# 5. Options for making ./include/parame.incl
#-----------------------------------------------------------------------------
#
# FDDAGD (integer) - "1" -> FDDA gridded run
FDDAGD = 0
#
# FDDAOBS (integer) - "1" -> FDDA obs run
FDDAOBS = 0
#
# MAXNES (integer) - Max Number of Domains in simulation
MAXNES = 2
#
# MIX,MJX (integer) - Maximum Dimensions of any Domain
MIX = 49
MJX = 52
# MKX (integer) - Number of half sigma levels in model
MKX = 23
8.3 编译
# make
若成功,将出现:
# make mm5.deck
若成功,将出现:
Including file ./Templates/oparam
Including file ./Templates/lparam
Including file ./Templates/nparam
Including file ./Templates/pparam
Including file ./Templates/fparam
8.4 运行
根据需要编辑 mm5.deck ,然后运行
# ./mm5.deck
# cd Run
# ./mm5.exe
如果成功则会出现:
--- MODEL OUTPUT IS WRITTEN AT TIME = 720.00 MINUTES FOR DOMAIN 1
--- MODEL OUTPUT IS WRITTEN AT TIME = 720.00 MINUTES FOR DOMAIN 2
+++ REWINDING SAVE FILE FOR DOMAIN 1
+++ RESTART FILE IS WRITTEN AT TIME = 720.00 MINUTES FOR DOMAIN1. IXTIMR = 720
+++ REWINDING SAVE FILE FOR DOMAIN 2
+++ RESTART FILE IS WRITTEN AT TIME = 720.00 MINUTES FOR DOMAIN2. IXTIMR = 720
FORTRAN STOP 99999
并且可以在 MM5/Run下面看到 MMOUT_DOMAIN*文件 ,其中“*”为1,2,3……
9.后处理
完成MM5以后还需要将MM5的输出文件转化为GrADS 等画图软件可以使用的格式。在这里只介绍MM5toGrADS。进入MM5toGrADS目录,用make进行编译
# make
编辑 mm5_to_grads.csh
# gedit mm5_to_grads.csh
找到一下字段,根据自己需要修改,输入输出文件
set infilename = "/home/MM5_v35/MM5/Run/MMOUT_DOMAIN1"
set outfilename = "test"
编辑 namelist.input
# gedit namelist.input
根据自己需要修改一些输出的参数,然后运行mm5_to_grads.csh
# ./mm5_to_grads.csh
如果你设置outfilename = "test",则你将得到以下连个文件
test.ctl
test.dat
如果你已经安装GrADS,你将可以看到MM5的预报结果。
游江南三名楼记
Apr 13th
初稿 二零零九年四月十三日
已丑年初,叶子将漫游中华,览图,见南昌、武昌与岳阳。此三地者,素有诗词连篇,文赋累牍,皆古时文人骚客所爱之地。究其所以,乃因有名阁高楼建置,得聚八方之妙笔,而留千古之绝句也。故凡识诗词文赋者,未尝不知滕阁、黄鹤、岳阳三楼,思今天时地利,更应朝访。遂行。于正月廿五抵南昌,登滕王阁。
滕阁之赋也浩瀚矣,而翘楚者当属王子安之序。惟念子安作序时,阁正兴盛;而千载之后,屡经兴废,英姿何觅。立高阁之上,难觅青雀黄龙之影,而叹盈虚。又见有游人,电梯而上,见无以为乐者,遂与子安雕合影,漠然而去。曾经俊采星驰之地,物换星移;而今江自空流,阁中帝子知何。
即日,别赣江,抵长江,而临黄鹤楼。黄鹤楼亦毁已久,现楼系近年重建,大增其制,投民所好。仰高十七丈,行绕百余步,熙熙攘攘,门庭若市。登楼而观武汉三镇,亦宏亦伟,较之腾阁似有所胜。然却同不得古韵。夫欲喧嚣至此者,不必临黄鹤楼;读黄鹤诗词,不见多少喧嚣,亦不必临黄鹤楼。至于此,则亦言亦欢;而使心中之黄鹤独立。
越明日,辞武昌,至岳阳,而眺岳阳楼。夫三名楼,惟岳阳楼原貌不改。漫行而望,不似腾阁之空大,亦不似黄鹤楼之大空。璃瓦飞檐,碧而不腻,扬而不张。楼不高傲,不必喘而登之,却能揽洞庭之胜;阁不奢华,是故不招流连之客,得品其韵。然虽胜前二者,却惟旧时之韵而已。何觅范文正公之忧乐乎?何觅少陵野老之轩涕乎?无矣。在岳阳仅留一时辰,乃怅然而去。
夫古迹者,悲凉之物也,非虚则墟。然却无以至三名楼之甚。夫叶子游诸名山而得古人之山,游诸名水而得古人之水,游诸雄关而得古人之关,拜诸皇陵而得古人之名,尝坐阳关墟以品匈奴血,攀乾陵冢以观大唐盛,虽此不多得先人笔着,皆有所感,以作骚词。今思名楼文墨最甚,乘兴而来,以拜求迹,却皆随斯夫而去,无存一毫。今日楼阁,旧瓶新酒,明日黄花,不如退居书祠,遥想当年。悲夫!无怪世间事也柔弱,人也狡诈。以为而无功,桴浮于海者彰。
时已丑年三月十八。
100 Hours of Astronomy Concert Series: of Apr. 6
Apr 7th
The VIIth China Astronomy Olympaid were held on Apr. 2-6 at Guangzhou and I was busying giving hands when in need, meeting old friends and guided them walk around the city, although I was not in staff group. I participated the Ist and IInd ChAO in 2003 and 2004 (and being a member of Chinese team for VIIIth International Astronomy Olympaid that held at Stockholm in 2003) and met lots of participants that are similar to my age at that time, many of them are now my best friends and still being very active in astronomy. I am very happy to see that ChAO is more and more successful. It is also a great pleasure to meet old friends at hometown and share their happiness for being together for the sake of universe!
For this reason, the title of the closure to 100 Hours of Astronomy Concert Series is chosen as "One Sky, One Dream".
Philharmonic Orchestra '92 | Ye Quanzhi
2009 Apr. 6, 19:30 CST at The Blue Hall
Richard Wagner (1813-1883)
1. Overture of "Die Meistersinger von Nürnberg", WWV 96
Joseph Haydn (1732-1809)
2. Symphony No. 45 in F-sharp minor, "Farewell", Hob.I:45
[INTERMISSION]
Franz Schubert (1797-1828)
3. Symphony No. 9 in C Major, "Great C Major", D. 944
Ye Quanzhi
4. "Farewell! Beijing", Q. 95
Paul Lincke (1866-1946)
5. Berliner Luft; Berlin Air
100 Hours of Astronomy Concert Series: of Apr. 3
Apr 4th
Not surprisingly, we had all overcast thorough the 4-hour party, which held at the North Gate of Sun Yat-sen University on behalf of the 100 Hours of Astronomy. However it's still successful, with hundreds of citizens visited and observed the scenery of Guangzhou by telescopes. The teachers and team leaders came for '09 China Astronomy Olympaid also attend the party.
The private concert held on Apr. 3 for 100 Hours of Astronomy is under the title of "Sky gazers". A total of six privately-composed sky-related compositions are chosen, including "Meteor Storm Overture" (Q. 133), Leonids Suite (Q. 116), Twilight (Q. 132) and "Night of the South Sea" (Q. 82) that to be played for the first time.
Philharmonic Orchestra '92 | Ye Quanzhi
2009 Apr. 3, 22:30 CST at Nanchuan Observatory
Ye Quanzhi
1. Meteor Storm Overture, Q. 133
2. Suite of "Leonids 2001", Q. 116
3. Twilight, Q. 132
4. Mountains in Afterglow, Q. 144
5. Night of the South Sea, Q. 82
6. Coriolis, Q. 119
100 Hours of Astronomy Concert Series: of Apr. 2
Apr 2nd
The climax of IYA 2009 -- 100 Hours of Astronomy -- finally arrives, unfortunately the weather is not favourable for star gazing now, as an old Chinese poem goes, "Qingming time lots of drizzle" (Qingming: a traditional day occured on Apr. 4 or 5 each year, it's the time for Chinese to visit the tombs of their ancestors and passed relatives). I don't know the reason to schedule the 100 Hours of Astronomy around the Qingming days -- maybe the weather condition is favourable for star gazing in North America or mainland Europe, but not China. Last week, a serve thunderstorm hitted Guangzhou and meteorological observations at the observatory of our campus showed it is the worst thunderstorm we had since at least 2006, thus, very few students would like to join the Earth Hour activity by turn off their lights. For me, I had wish to show my support to the EH by holding a "dark sky" concert at the center park of our campus, but it had to be cancelled due to heavy rainfall.
So the situation may well possible to be similar this time, a cold front is expected to arrive around Apr. 4 and bring another server weather to us -- although unlikely to be as bad as the Mar. 28's -- but enough to rule out possibilities for an excellent 100-hour activity. Anyway, I'll be the North Entrance Plaza of the old campus of our university for the Guangzhou 100 Hours of Astronomy, although I'm not very opmistic for its outcome.
On the other hand, I will celebrate the 100-hour privately by a unique (but "ordinary" for me) way: holding concerts. This time, a series of concerts will be held thorough-out the 100-hour, and everyday there will be a concert with a specific theme, with some of my works written over the past ten years to be played. As usual, I will "conduct" the Philharmonic Orchestra '92 (well, actually, the orchestra is a combination of me, my CDs and MIDIs on hand...) for the concerts.
The opening concert on Apr. 2 is under the theme title of "The universe we observe and the planet we live".
Philharmonic Orchestra '92 | Ye Quanzhi
2009 Apr. 2, 19:30 CST at Kissland Music Ground
Dmitri Shostakovich (1906-1975)
1. Festive Overture, op. 96
Joseph Haydn (1732-1809)
2. Symphony No. 104 in D Major, "London", Hob.I:104
Ye Quanzhi
3. Prelude of Our Solar System, Q. 151
4. Little Star Variation, Q. 173
Arnold Schoenberg (1874-1951)
5. Verklärte Nacht, op. 4; Transfigured night
Josef Strauss (1827-1870)
6. Sphären-Klänge, op. 235; Music of the Spheres
Ye Quanzhi
7. 24-hour, Q. 45
8. Coriolis, Q. 119
最新评论 Recent Comments