- 积分
- 4182
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-6-27
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本人原创,2010年发表于动力论坛,现转载至此。
在看论坛时认识了AREM,lasg上有2.3.1版本下载,看介绍文档很兴奋,想尝试下运行,可看了论坛后有点失望,论坛里面介绍使用AREM的很少哦,相关的讨论也不多,帖子都是2009年之前的,除去AREM中的Readme文件,再无其他可参考的,所以考虑写一些我安装的过程和遇到的问题,希望能对初次使用AREM的同学有所帮助。
模式下载地址:http://www.lasg.ac.cn/AREM/
在调试期间,也感谢c4rui@mail.iap.ac.cn的帮助,他对我的问题从来都是不厌其烦的回答,谢谢。
一、准备工作
1、操作系统:RedHat 企业版4
2、Fortran编译器:PGI Workstation 7.0.7
3、netcdf
4、Grads
5、资料:地面高空报文资料。
二、安装
1、Fortran编译器
(1)将文件pgilinux86-64-707.tar.gz下载到/root/pgi707目录下解压
- [root@localhost pgi707]$ tar -zxf pgilinux86-64-707.tar.gz
- [root@localhost pgi707]$ ls
- common install INSTALL.txt linux86 linux86-64 pgilinux86-64-707.tar.gz postinstall
复制代码
(2)编译并安装
- [root@localhost pgi707]# ./install
- Do you accept these terms? [accept,decline]
- accept
- Install the ACML? [y/n]
- n
- Installation directory? [/usr/pgi]
- /opt/pgi
- Do you want the files in the install directory to be read-only? [y,n]
- n
复制代码
(3)用root用户把license.dat(在使用期范围的其他版本的license.dat也可以用)复制(cp)到/opt/pgi下
(4)把以下几行放到/root/.bash_profile的最后
- export PGI=/opt/pgi/linux86/7.0-7
- export PATH=$PGI/bin:$PATH
- export MANPATH=$PGI/man:$MANPATH
- export LM_LICENSE_FILE=/opt/pgi/license.dat
复制代码
并执行:
- [root@localhost pgi707]# source /root/.bash_profile
复制代码
(5)测试PGI:
- [root@localhost pgi707]# pgf90
- pgf90-Warning-No files to process
复制代码
以上说明PGI安装成功!
2、安装netcdf
(1)将文件netcdf-4.0.tar.gz下载到/root/netcdf下解压
[root@localhost netcdf-4.0]$ tar -zxf netcdf-4.0.tar.gz
(2)编译并安装,不管您的netcdf是什么版本,必须将netcdf安装在如下目录。因为AREM模式中默认配置的netcdf路径就是/usr/local/netcdf-3.5.0-linux,否则后续您可能需要修改模式中许多netcdf的路径。
- [root@localhost netcdf-4.0]# mkdir /usr/local/netcdf-3.5.0-linux
- [root@localhost netcdf-4.0]# mkdir /usr/local/netcdf-3.5.0-linux/lib
- [root@localhost netcdf-4.0]# ./configure --prefix=/usr/local/netcdf-3.5.0-linux/lib FC=pgf90
- [root@localhost netcdf-4.0]# make
- [root@localhost netcdf-4.0]# make install
复制代码
(3)把以下几行放到/root/.bash_profile的最后
- export NETCDF=/opt/netcdf
- export PATH=$NETCDF/bin:$PATH
复制代码
并执行:
- [root@localhost netcdf-4.0]# source /root/.bash_profile
- [root@localhost netcdf-4.0]# ncdump
- ncdump [-c|-h] [-v ...] [[-b|-f] [c|f]] [-l len] [-n name] [-p n[,n]] [-x] [-k] file
- [-c] Coordinate variable data and header information
- [-h] Header information only, no data
- [-v var1[,...]] Data for variable(s) <var1>,... only
复制代码 这样NetCDF安装成功!
3、Grads安装
(1)下载Grads,http://www.iges.org/grads/downloads.html
(2)解压缩,进入目录:
- [root@localhost ~]# cd grads
- [root@localhost grads]# ls
- acinclude.m4 config.log configure.in doc lib Makefile.in
- aclocal.m4 config.status COPYRIGHT etc Makefile src
- bootstrap configure data INSTALL Makefile.am
- [root@localhost grads]# ./configure
- [root@localhost grads]# make && make install
复制代码
(3)把以下几行放到/root/.bash_profile的最后
- PATH=$PATH:/root/grads/src
复制代码 并执行:
- [root@localhost netcdf-3.6.2]# source /root/.bash_profile
复制代码
(4)安装完成,输入grads验证安装成功:
- [root@localhost ~]# grads
- Grid Analysis and Display System (GrADS) Version 2.0.a2
- Copyright (c) 1988-2008 by Brian Doty and the
- Institute for Global Environment and Society (IGES)
- GrADS comes with ABSOLUTELY NO WARRANTY
- See file COPYRIGHT for more information
- Config: v2.0.a2 little-endian
- Issue 'q config' command for more information.
- Landscape mode? ('n' for portrait):
- GX Package Initialization: Size = 11 8.5
- ga>
复制代码
4、/root/.bash_profile文件完整版:
- PATH=$PATH:/root/AREM2.3.1.USER/Running/src
- PATH=$PATH:./
- PATH=$PATH:/root/grads/src
- export PATH
- unset USERNAME
- export PGI=/opt/pgi/linux86/7.0-7
- export PATH=$PGI/bin/PATH
- export MANPATH=$PGI/man/MANPATH
- export LM_LICENSE_FILE=/opt/pgi/license.dat
- export NETCDF=/opt/netcdf
- export PATH=$NETCDF/bin/PATH
复制代码
注:PATH=$PATH:./这一行必须要有!要不会出现mkdep命令无法找到的错误。
三、AREM解压缩和编译
以下是AREM2.3.1中自带的ReadME中所列的说明:我是按照如下步骤运行:
- * 1st,
- You must start by going to AREM root directory "AREM2.3.1". And
- then change to sub-directories "control" and "initial/control" respectively.
- The compilation and linking options are in the file named Macros.#Platform.
- #Platform can be SGI-Altix, SGI-O3K, and LINUX and should be modified
- in the "Makefile" according to the platform at which the model AREM is going
- to be run.
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- *2nd,
- Change to the upper sub-direcotry "EXEC" and edit the Shell Script file
- "AREM.CSH". The follwings need to be modified to run a case of your selection:
- [color=red]* set initialization time, e.g.
- set year = 2006 !Four digits
- set mon = 06 !Two digits
- set day = 27 !Two digits
- set hour = 00 !Two digits[/color]
- * set initial data type, e.g.
- [color=red] setenv INITYPE NCP_DAT[/color]
- * set running type, e.g.
- [color=red] setenv RUNTYPE -1[/color]
- * set model domain, e.g.
- setenv NWPLN 75.0 ! the longitude of fcst_domain west boundary
- setenv NWPLT 55.0 ! the latitude of fcst_domain north boundary
- setenv SWPLT 5.0 ! the latitude of fcst_domain south boundary
- * select physics packages, the default settings,
- setenv CLD_D CLD_BIAMW ! BIAMW,BIAMC,REM0
- setenv PBL_D PBL_CCM3 ! CCM3, REM0
- setenv FLX_D FLX_BIAM ! BIAM, CCM3, REM0, MM5
- setenv RAD_D RAD_MM5 ! CCM3, REM0, MM5
- * modify the model root path, e.g.
- setenv REMROOT /home/arem/AREM2.3.1
- * set the hisotry dumping path, e.g.
- setenv OUTDATA /sgidsk3/arem_res/AREM2.3.1/$DATEY$DATEM$DATED/
- * set the 3D model grid points in the file "def_und.h", e.g.
- #define XLON 351
- #define YLAT 501
- #define ZETA 32
- * set the 3D grid points of background fields, e.g.
- #define XNCP 360
- #define YNCP 181
- #define ZNCP 17
- #define NCPLEV 17
- * set the station observation path in the file "rem.inp", e.g.
- stn_path='/sgidsk3/lib4data/stn/dt$DATEY/='
-
- * set the starting point, resolution and data path of background fields, e.g.
- xwnc0 = 0.0 !initial latitude
- ynnc0 = 90.0 !initial longitude
- dlen_nc = 1.0 !horizontal resolution
- fintnc ='/sgidsk3/lib4data/ncep/dt$DATEY/ncp$DATEY$DATEM$DATED.$DATEH'
- * set the integral time in hour, e.g.
- mend = 24 ! 24h modeling
- * set history dumping frequency in hour, e.g.
- mout = 1 ! results saved per hour
- * if lateral boundary is time-dependent, "V_BOUNDARY" should be defined
- in the file "def_und.h",
- #define V_BOUNDARY
- and before that, the creation of time-dependent boundary as the followings,
- - change to the folder "BOUND/csh";
- - edit the file "LB4AREM.RUN";
- - modify the modeling date, root path,
- initialized data and its configuration,
- boundary update frequency,etc;
- - execute this file "LB4AREM.RUN";
- then, the lateral boundary files will be in the folder, "BOUND/vbdat"
- *Note, the above settings must have the same model domain and resolution
- as in the "EXEC/AREM.CSH"!
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- * 3rd,
- * Save your modification to "AREM.CSH" and quit, then run the file by typing,
- AREM.CSH
- * Ok, the computation will be being performed if your settings are correct.
- * note, all the source files, head files and input files will be copied into
- the temporary directory named by, "Running". Also, the complilation , linkage and
- the model integral will be performed in this directory.
- * So, you can check the model printed information in the file "Dumping" in the
- the path "Running".
复制代码
按照如上步骤:即可编译得到AREM2.3.1:
- [root@localhost ~]# cd AREM2.3.1.USER/
- [root@localhost AREM2.3.1.USER]# ls
- BOUND control EXEC initial pbl ReadmE TOOLS
- cld_pr dyn His lnd_flx rad Running wt4rem
- [root@localhost AREM2.3.1.USER]# cd Running
- [root@localhost Running]# ls
- AREM2.3.1 Dumping obj output.ext src
- def_und.h fort.55 ocean_1.dat rem.inp step_terr
复制代码
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- * 4th,
- * Go into the hisotry dumping sub-direcotry and check results by GrADS-Display,
- * type the command (the software "GrADS" should be installed),
- gradsnc
- and you can display the saved fields in the GrADS-Environment, e.g.
- d geoheight !geopotential height to be displayed;
- d tem !temperature to be displayed;
- d qq !mixing ratio of water vapor to be displayed;
- d uu !zonal velocity to be displayed;
- d vv !meridional velocity to be displayed;
- d surfprep !accumulated surface rainfall to be displayed.
复制代码
注意:
1 修改runv2的权限。
2 修改 cp /puser/lib4data/stn/b*$DATEY$DATEM$DATED.$DATEH obj/. 为
cp /home/blueet/stn/*$DATEY$DATEM$DATED.$DATEH obj/.
帖子结束。在运算得到结果后,0小时的预报部分变量是没有结果的。大家使用时需要注意下。 |
评分
-
查看全部评分
|