wrf安装摘要

更新时间:2023-10-12 03:21:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

摘要:本文档简要介绍在曙光HPC集群上部署WRF/ARPS气象模式时软件环境的准备及模式安装的方法步骤。

曙光集群基础软件环境

1.1 操作系统

所有节点统一安装Red Hat Enterprise Linux Server release 6.2 64位操作系统

1.2 编译器

要求安装GNU、Intel、PGI三套编译器。默认情况下,推荐使用Intel编译器,运行效率较高。

1.2.1 GNU编译器

编译器类型 C编译器 C++编译器 Fortran 77编译器 Fortran 90编译器 编译器命令 gcc g++ gfortran gfortran 版本 4.4.6 4.4.6 4.4.6 4.4.6 安装路径 /usr/bin/gcc /usr/bin/g++ /usr/bin/gfortran /usr/bin/gfortran 备注:GNU编译器为Red Hat Linux系统自带。

1.2.2 Intel编译器

编译器类型 C编译器 C++编译器 Fortran 77编译器 Fortran 90编译器 编译器命令 icc icpc ifort ifort 版本 安装路径 12.1.0 /public/software/intel/composer_xe_2011_sp1.7.256/bin/intel64/icc 12.1.0 /public/software/intel/composer_xe_2011_sp1.7.256/bin/intel64/icpc 12.1.0 /public/software/intel/composer_xe_2011_sp1.7.256/bin/intel64/ifort 12.1.0 /public/software/intel/composer_xe_2011_sp1.7.256/bin/intel64/ifort Intel编译器环境变量脚本:/public/software/profile.d/intel-env.sh

1.2.3 PGI编译器

编译器类型 C编译器 C++编译器 Fortran 77编译器 Fortran 90编译器 编译器命令 pgcc pgCC pgf77 pgf90 版本 10.2 10.2 10.2 10.2 安装路径 /public/software/pgi/linux86-64/10.2/bin/pgcc /public/software/pgi/linux86-64/10.2/bin/pgCC /public/software/pgi/linux86-64/10.2/bin/pgf77 /public/software/pgi/linux86-64/10.2/bin/pgf90 PGI编译器环境变量脚本:/public/software/profile.d/pgi-env.sh

1.3 MPI并行环境

1.3.1 mvapich2

MVAPICH2是基于MPICH2的一个MPI拓展实现,提供了对IB,iWARP,RcCE,PSM,uDAPL等新型高性能通信设备和协议的支持,同时也支持TCP/IP协议和共享内存,还支持Nvidia GPU并行任务。MVAPICH2支持的通信接口(10种)如下图所示:

MVAPICH2由美国俄亥俄大学开发,最新版本已到MVAPICH2 1.9+,基于MPICH2-1.5+开发,支持MPI-1和MPI2.2标准,并已初步支持MPI-3标准。官方网站为:http://mvapich.cse.ohio-state.edu/overview/mvapich2/。

1.3.1.1 Intel编译器版本(默认MPI)

? 版本:mvapich2-1.8

? 安装路径:/public/software/mpi/mvapich2-18-intel

? 环境变量脚本:/public/software/profile.d/mvapich2-intel-env.sh ? MPI编译器:

编译器类型 C编译器 C++编译器 Fortran 77编译器 Fortran 90编译器 编译器命令 mpicc mpicxx mpif77 mpif90 安装路径 /public/software/mpi/mvapich2-18-intel/bin/mpicc /public/software/mpi/mvapich2-18-intel/bin/mpicxx /public/software/mpi/mvapich2-18-intel/bin/mpif77 /public/software/mpi/mvapich2-18-intel/bin/mpif90 ? MPI运行方式:

#mpirun –f hostfile –n 32 ./mpi_exec

其中hostfile格式如下:

node1:16 node2:16

? 从源码安装mvapich2方法:

#tar zxvf mvapich2-1.8.tar.gz #cd mvapich2-1.8

#./configure --prefix=/public/software/mpi/mvapich2-18-intel

--with-device=ch3:nemesis:ib,tcp CC=icc CXX=icpc FC=ifort F77=ifort #make

#make install

1.3.1.2 GNU编译器版本

? 版本:mvapich2-1.8

? 安装路径:/public/software/mpi/mvapich2-18-gnu

? 环境变量脚本:/public/software/profile.d/mvapich2-gnu-env.sh ? MPI编译器:

编译器类型 C编译器 C++编译器 Fortran 77编译器 Fortran 90编译器 编译器命令 mpicc mpicxx mpif77 mpif90 安装路径 /public/software/mpi/mvapich2-18-gnu/bin/mpicc /public/software/mpi/mvapich2-18-gnu/bin/mpicxx /public/software/mpi/mvapich2-18-gnu/bin/mpif77 /public/software/mpi/mvapich2-18-gnu/bin/mpif90 ? MPI运行方式:

#mpirun –f hostfile –n 32 ./mpi_exec

其中hostfile格式如下:

node1:16 node2:16

? 从源码安装mvapich2方法:

#tar zxvf mvapich2-1.8.tar.gz #cd mvapich2-1.8

#./configure --prefix=/public/software/mpi/mvapich2-18-gnu --with-device=ch3:nemesis:ib,tcp CC=gcc CXX=g++ FC=gfortran F77=gfortran #make

#make install

1.3.2 OpenMPI

OpenMPI是一个免费的、开源的MPI实现,兼容MPI-1和MPI-2标准。OpenMPI由开源社区开发维护,支持大多数类型的HPC平台,并具有很高的性能。

OpenMPI目前最新版本为openmpi-1.6+,官方网站:http://www.open-mpi.org/,可从官网免费下载Openmpi源码安装包。

1.3.2.1 Intel编译器版本

? 版本:OpenMPI 1.6

? 安装路径:/public/software/mpi/openmpi-16-intel

? 环境变量脚本:/public/software/profile.d/openmpi-intel-env.sh ? MPI编译器:

编译器类型 C编译器 C++编译器 Fortran 77编译器 编译器命令 mpicc mpicxx mpif77 安装路径 /public/software/mpi/openmpi-16-intel/bin/mpicc /public/software/mpi/openmpi-16-intel/bin/mpicxx /public/software/mpi/openmpi-16-intel/bin/mpif77 Fortran 90编译器 mpif90 /public/software/mpi/openmpi-16-intel/bin/mpif90 ? MPI运行方式:

#mpirun –np 32 -hostfilehostfile ./mpi_exec

其中hostfile格式如下:

node1 slots=16 node2 slots=16

? 从源码安装Openmpi方法:

#tar zxvf openmpi-1.6.tar.gz #cd openmpi-1.6

#./configure --prefix=/public/software/mpi/openmpi-16-intel --enable-mpirun-prefix-by-default CC=icc CXX=icpc FC=ifort F77=ifort #make

#make install

1.3.2.2 GNU编译器版本

? 版本:OpenMPI 1.6

? 安装路径:/public/software/mpi/openmpi-16-gnu

? 环境变量脚本:/public/software/profile.d/openmpi-gnu-env.sh ? MPI编译器:

编译器类型 C编译器 C++编译器 Fortran 77编译器 Fortran 90编译器 编译器命令 mpicc mpicxx mpif77 mpif90 安装路径 /public/software/mpi/openmpi-16-gnu/bin/mpicc /public/software/mpi/openmpi-16-gnu/bin/mpicxx /public/software/mpi/openmpi-16-gnu/bin/mpif77 /public/software/mpi/openmpi-16-gnu/bin/mpif90 ? MPI运行方式:

#mpirun –np 32 -hostfilehostfile ./mpi_exec

其中hostfile格式如下:

node1 slots=16 node2 slots=16

? 从源码安装Openmpi方法:

#tar zxvf openmpi-1.6.tar.gz #cd openmpi-1.6

#./configure --prefix=/public/software/mpi/openmpi-16-gnu --enable-mpirun-prefix-by-default CC=gcc CXX=g++ FC=gfortran F77=gfortran #make

#make install

常用气象函数库安装

2.1 系统自带函数库

2.1.1 zlib

zlib是一个用于数据压缩的通用函数库,红帽Linux默认已经安装zlib。

? 版本:1.2.3 ? 安装路径:/usr

? 库文件路径:/usr/lib64/libz.so

2.1.2 libpng

libpng是一个处理PNG格式图像的库,可调用zlib函数库对图像进行无损压缩,红帽Linux默认已经安装libpng。

? 版本:1.2.46 ? 安装路径:/usr

? 库文件路径:/usr/lib64/libpng.so

2.1.3 libjpeg

jpeg是一个通用的数字图像有损压缩程序,红帽Linux默认已经安装libjpeg。

? 版本:6b ? 安装路径:/usr

? 库文件路径:/usr/lib64/libjpeg.so

2.1.4 ImageMagick

ImageMagick是一套功能强大、稳定而且免费的工具集和开发包,可以用来读、写和处理超过89种基本格式的图片文件,包括流行的TIFF、JPEG、GIF、 PNG、PDF以及PhotoCD等格式。ImageMagick是一个用来创建、编辑、合成图片的软件。它可以读取、转换、写入多种格式的图片。

? 版本:6.5.4 ? 安装路径:/usr

? 可执行文件路径:/usr/bin,如/usr/bin/convert

2.2 hdf4

HDF是一个用于科学数据存储和管理的函数库和文件格式,有两个版本:HDF-4和HDF-5。两个版本不兼容,需分别安装。本小节说明hdf-4.2.9的安装配置方法。 # cd /public/sourcecode/

# tar jxvf hdf-4.2.9.tar.bz2 # cdhdf-4.2.9

# ./configure --prefix=/public/software/hdf4

--includedir=/public/software/hdf4/include/hdf CC=icc CXX=icpc FC=ifort F77=ifort # make

# make install

设置环境变量:

# cat /public/software/profile.d/hdf4-env.sh export HDFPATH=/public/software/hdf4

export LD_LIBRARY_PATH=${HDFPATH}/lib:${LD_LIBRARY_PATH} export INCLUDE=${HDFPATH}/include/hdf:${INCLUDE} export PATH=${HDFPATH}/bin:$PATH

2.3 hdf5

本小节说明hdf5-1.8.9的安装配置方法。安装HDF5之前需要先确认系统安装zlib库,由于本集群Linux自带zlib库,所以无需单独再安装。如果系统无zlib库,需要首先从源码编译zlib。

# cd /public/sourcecode/

# tar zxvf hdf5-1.8.9.tar.gz # cdhdf5-1.8.9

# ./configure --prefix=/public/software/hdf5 --enable-cxx

--enable-fortran --enable-fortran2003 --disable-dap CC=icc CXX=icpc FC=ifort F77=ifort # make

# make install

设置环境变量:

# cat /public/software/profile.d/hdf5-env.sh export HDF5=/public/software/hdf5

export LD_LIBRARY_PATH=${HDF5}/lib:${LD_LIBRARY_PATH} export INCLUDE=${HDF5}/include:${INCLUDE} export PATH=${HDF5}/bin:$PATH

2.4 netcdf3

netCDF(network Common Data Format)即“网络通用数据格式”,跟PNG、JPEG、BMP一样,是一种文件格式标准,最初的目的是用于存储气象科学中的数据,现在已经成为许多数据采集软件的生成文件的格式。

NETCDF分为classicnetcdf和netcdf-4两种格式,而且两种格式互不兼容。推荐单独安装。本小节说明netcdf 3.6.3(即classicnetcdf格式)的安装配置方法。

安装步骤:

# cd /public/sourcecode/

# tar zxvf netcdf-3.6.3.tar.gz # cdnetcdf-3.6.3

# ./configure –prefix=/public/software/netcdfCC=icc CXX=icpc FC=ifort F77=ifort # make

# make install

设置环境变量:

# cat /public/software/profile.d/netcdf-env.sh export NETCDF=/public/software/netcdf

export NETCDF_LIB=${NETCDF}/lib

export NETCDF_INC=${NETCDF}/include export PATH=${NETCDF}/bin:$PATH

2.5 netcdf4

本小节说明netcdf 4.2.1.1(即netcdf-4格式)的安装配置方法。注意,NETCDF自从4.1.3版本后,C版本和Fortran版本不再合成在一个tar包里面,所以需要单独安装。

需要先安装HDF5,参考2.3。

# cd /public/sourcecode/

# tar zxvf netcdf-4.2.1.1.tar.gz # tar zxvfnetcdf-fortran-4.2.tar.gz # cdnetcdf-4.2.1.1

#./configure --prefix=/public/software/netcdf4 --enable-netcdf4 --disable-dap CPPFLAGS=-I/public/software/hdf5/include

LDFLAGS=-L/public/software/hdf5/lib CC=icc CXX=icpc FC=ifort F77=ifort # make

# make install

# cd ../netcdf-fortran-4.2

#./configure --prefix=/public/software/netcdf4 CPPFLAGS=-I/public/software/netcdf4/include

LDFLAGS=-L/public/software/netcdf4/lib CC=icc CXX=icpc FC=ifort F77=ifort # make

# make install

设置环境变量:

# cat /public/software/profile.d/netcdf4-env.sh export NETCDF4=1

export NETCDF=/public/software/netcdf4

export LD_LIBRARY_PATH=${NETCDF}/lib:${LD_LIBRARY_PATH} export INCLUDE=${NETCDF}/include:${INCLUDE} export PATH=${NETCDF}/bin:$PATH

如果需要安装classic netcdf格式,在C语言版本netcdf的configure步骤加入--disable-netcdf-4选项即可。

2.6 jasper

JasPer是处理JPEG-2000图像格式的函数库,JPEG-2000是基于小波变换的新一代图像压缩标准,支持无损和有损压缩,由于比JPEG有更优的压缩性能,在医学影像、数字遥感、

气象科学等领域得到了应用。

安装步骤:

# cd /public/sourcecode/

# tar zxvf jasper-1.701.0.tar.gz # cd jasper-1.701.0

./configure –prefix=/public/software/jasper CC=icc CXX=icpc F77=ifort # make

# make install

设置环境变量:

# cat /public/software/profile.d/jasper-env.sh export JASPER=/public/software/jasper export JASPERLIB=${JASPER}/lib

export JASPERINC=${JASPER}/include export PATH=${JASPER}/bin:$PATH

2.7 ncl/ncarg

NCL(The NCAR Command Language)是一种专门为科学数据处理以及数据可视化设计的高级语言,很适合用在气象数据的处理和可视化上。NCL包含了现代编程语言的许多常见功能:条件语句、循环、数组运算等。此外,NCL还包括许多有用的内置函数和过程用来进行处理和操作数据,其中包括统计函数、插值、EOF分析、波谱分析等。NCL包含NCAR Graphic画图函数库,可以用来绘制精美的气象产品图像。

ncl推荐使用官方提供的二进制版本。

# mkdir –p /public/software/ncl # cd /public/sourcecode/

# tar zxvf ncl_ncarg-6.1.2.Linux_RHEL6.2_x86_64_gcc446.tar.gz -C /public/software/ncl

设置环境变量:

# cat /public/software/profile.d/ncl-env.sh export NCARG_ROOT=/public/software/ncl export NCARG_LIB=/public/software/ncl/lib

export NCARG_INC=/public/software/ncl/include export PATH=/public/software/ncl/bin:$PATH

气象模式安装

3.1 WRF3.4.1

3.1.1 安装前要求

源码包目录:/public/sourcecode/wrf341

WPSV3.4.1.TAR.gz:WPS 3.4.1源码包 WRFV3.4.1.TAR.gz:WRF 3.4.1源码包

ARWpost_V3.tar.gz:ARWpost后处理程序源码包 RIP4.tar.gz:RIP4后处理程序源码包 WRFDA_V3.4.1.tar.gz:WRFDA 3.4.1源码包

安装WRF前,除了要求Intel编译器、MPI(如mvapich2,openmpi)外,还需要先安装好netcdf 3.6.3、jasper-1.701.0、NCL等函数库,安装方法请参考2.4,2.6,2.7等章节。

设置环境变量:

# source /public/software/profile.d/intel-env.sh

# source /public/software/profile.d/mvapich2-intel-env.sh # source /public/software/profile.d/jasper-env.sh # source /public/software/profile.d/netcdf-env.sh # source /public/software/profile.d/ncl-env.sh

# export WRFIO_NCD_LARGE_FILE_SUPPORT=1(支持超过2GB的NETCDF文件) # exportWRF_HOME=/public/software/WRF341

3.1.2 安装WRF

解压WRFV3.4.1.tar.gz ? ? ? ?

mkdir–p ${WRF_HOME} cd ${WRF_HOME}

tar zxvf /public/sourcecode/wrf341/WRFV3.4.1.TAR.gz cd WRFV3

修改arch/Config_new.pl,将第188行FALSE改为TRUE,如下: 188 $I_really_want_to_output_grib2_from_WRF = \

执行configure自动检测和设置编译环境,编译选项选择第15项(即采用Intel Ifort+MPI,不同WRF版本此序号不一致,请注意): ? ./configure

checking for perl5... no

checking for perl... found /usr/bin//perl (perl) Will use NETCDF in dir: /public/software/netcdf

PHDF5 not set in environment. Will configure WRF for use without. which: no timex in

(/public/soft/mpi/openmpi-164-intel/bin:/usr/bin/:/usr/lib64/qt-3.3/bin:/public/soft/mpi/openmpi-164-intel/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/public/soft/intel/composer_xe_2013.1.117/bin/intel64:/public/soft/intel/composer_xe_2013.1.117/mpirt/bin/intel64:/public/soft/intel/composer_xe_2013.1.117/bin/intel64:/public/soft/intel/composer_xe_2013.1.117/bin/intel64_mic:/public/soft/intel/composer_xe_2013.1.117/debugger/gui/intel64:/opt/gridview//pbs//dispatcher-sched//bin:/opt/gridview//pbs//dispatcher-sched//sbin:/opt/gridview//pbs//dispatcher//bin:/opt/gridview//pbs//dispatcher//sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

Configuring to use jasper library to build Grib2 I/O... $JASPERLIB = /public/software/jasper/lib

$JASPERINC = /public/software/jasper/include

------------------------------------------------------------------------

Please select from among the following supported platforms.

1. Linux x86_64, PGI compiler with gcc (serial) 2. Linux x86_64, PGI compiler with gcc (smpar) 3. Linux x86_64, PGI compiler with gcc (dmpar) 4. Linux x86_64, PGI compiler with gcc (dm+sm)

5. Linux x86_64, PGI compiler with pgcc, SGI MPT (serial) 6. Linux x86_64, PGI compiler with pgcc, SGI MPT (smpar) 7. Linux x86_64, PGI compiler with pgcc, SGI MPT (dmpar) 8. Linux x86_64, PGI compiler with pgcc, SGI MPT (dm+sm) 9. Linux x86_64, PGI accelerator compiler with gcc (serial) 10. Linux x86_64, PGI accelerator compiler with gcc (smpar) 11. Linux x86_64, PGI accelerator compiler with gcc (dmpar) 12. Linux x86_64, PGI accelerator compiler with gcc (dm+sm)

13. Linux x86_64 i486 i586 i686, ifort compiler with icc (serial) 14. Linux x86_64 i486 i586 i686, ifort compiler with icc (smpar) 15. Linux x86_64 i486 i586 i686, ifort compiler with icc (dmpar) 16. Linux x86_64 i486 i586 i686, ifort compiler with icc (dm+sm) 17. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (serial)

18. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (smpar)

19. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (dmpar)

20. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (dm+sm)

21. Linux i486 i586 i686 x86_64, PathScale compiler with pathcc (serial)

22. Linux i486 i586 i686 x86_64, PathScale compiler with pathcc (dmpar)

23. x86_64 Linux, gfortran compiler with gcc (serial) 24. x86_64 Linux, gfortran compiler with gcc (smpar) 25. x86_64 Linux, gfortran compiler with gcc (dmpar) 26. x86_64 Linux, gfortran compiler with gcc (dm+sm)

27. Cray XT CLE/Linux x86_64, PGI compiler with gcc (serial) 28. Cray XT CLE/Linux x86_64, PGI compiler with gcc (smpar) 29. Cray XT CLE/Linux x86_64, PGI compiler with gcc (dmpar) 30. Cray XT CLE/Linux x86_64, PGI compiler with gcc (dm+sm)

31. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (serial) 32. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (smpar) 33. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (dmpar) 34. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (dm+sm)

Enter selection [1-34] :15

------------------------------------------------------------------------

Compile for nesting? (1=basic, 2=preset moves, 3=vortex following) [default 1]: 1

Configuration successful. To build the model type compile .

编译WRF: ? ?

./compile em_real 2>&1|tee c.log ./compile em_real 2>&1|tee –a c.log (执行两遍,第一遍无法生成real.exe) 编译成功后,会在main/目录下有real.exe和wrf.exe等可执行文件,如果没有生成,请检查c.log日志文件排错。

? ls main/*.exe

main/ndown.exe main/nup.exe main/real.exe main/tc.exe main/wrf.exe

注意的问题(史小康添加):

>OpenMPI'smpicc doesn't support the -cc flag so it just passes it to >pgcc, which doesn't support it either. The easy way to fix it is > recompiling OpenMPI with gcc and pgf >

> ./configure CC=gcc CXX=g++ F77=pgf... FC=pgf... ... >

> After that, edit the WRF configure.wrf and remove every instance of > -cc=${SOMEVAR} I think there should be two, but I don't have access to >mine at the moment to tell you the exact names.

3.1.3 安装WPS

确保NETCDF、JASPERINC、JASPERLIB、NCARG_ROOT等环境变量设置正确,见上述WRF安装步骤。

解压WPS压缩源码包: ? ? ?

cd ${WRF_HOME}

tar zxvf/public/sourcecode/wrf341/WPSV3.4.1.TAR.gz cd WPS

执行configure设置编译环境,选择第19项ifort/icc/dmpar

Will use NETCDF in dir: /public/software/netcdf

Found Jasper environment variables for GRIB2 support... $JASPERLIB = /public/software/jasper/lib

$JASPERINC = /public/software/jasper/include

------------------------------------------------------------------------

Please select from among the following supported platforms.

1. Linux x86_64, gfortran (serial)

2. Linux x86_64, gfortran (serial_NO_GRIB2) 3. Linux x86_64, gfortran (dmpar)

4. Linux x86_64, gfortran (dmpar_NO_GRIB2) 5. Linux x86_64, PGI compiler (serial)

6. Linux x86_64, PGI compiler (serial_NO_GRIB2) 7. Linux x86_64, PGI compiler (dmpar)

8. Linux x86_64, PGI compiler (dmpar_NO_GRIB2) 9. Linux x86_64, PGI compiler, SGI MPT (serial)

10. Linux x86_64, PGI compiler, SGI MPT (serial_NO_GRIB2) 11. Linux x86_64, PGI compiler, SGI MPT (dmpar)

12. Linux x86_64, PGI compiler, SGI MPT (dmpar_NO_GRIB2) 13. Linux x86_64, IA64 and Opteron (serial)

14. Linux x86_64, IA64 and Opteron (serial_NO_GRIB2) 15. Linux x86_64, IA64 and Opteron (dmpar)

16. Linux x86_64, IA64 and Opteron (dmpar_NO_GRIB2) 17. Linux x86_64, Intel compiler (serial)

18. Linux x86_64, Intel compiler (serial_NO_GRIB2) 19. Linux x86_64, Intel compiler (dmpar)

20. Linux x86_64, Intel compiler (dmpar_NO_GRIB2) 21. Linux x86_64 g95 compiler (serial)

22. Linux x86_64 g95 compiler (serial_NO_GRIB2) 23. Linux x86_64 g95 compiler (dmpar)

24. Linux x86_64 g95 compiler (dmpar_NO_GRIB2)

25. Cray XT/XE Linux x86_64 (Opteron), PGI compiler 5.2 or higher (serial)

26. Cray XT/XE Linux x86_64 (Opteron), PGI compiler 5.2 or higher (serial_NO_GRIB2)

27. Cray XT/XE Linux x86_64 (Opteron), PGI compiler 5.2 or higher (dmpar)

28. Cray XT/XE Linux x86_64 (Opteron), PGI compiler 5.2 or higher (dmpar_NO_GRIB2)

29. Cray XT/XE Linux x86_64 (Opteron), Cray CCE compiler 7.0 or higher (dmpar)

30. Cray XT/XE Linux x86_64 (Opteron), Cray CCE compiler 7.0 or higher (dmpar_NO_GRIB2)

Enter selection [1-30] :19

------------------------------------------------------------------------

Configuration successful. To build the WPS, type: compile

修改configure.wps第18行,添加-lgfortran –lcairo,如下所示:

18 NCARG_LIBS = -L$(NCARG_ROOT)/lib -lncarg -lncarg_gks -lncarg_c-lgfortran -lcairo \\

编译WPS: ?

./compile 2>&1|tee c.log

编译成功后,在WPS目录下会生成geogrid.exe、ungrib.exe或metgrid.exe三个可执行文件,如果没有生成,请检查c.log日志文件排错。

3.1.4 安装ARWpost

解压ARWpost压缩源码包: ? ? ?

cd ${WRF_HOME}

tar zxvf /public/sourcecode/wrf341/ARWpost_V3.tar.gz cd ARWpost

确保NETCDF路径设置正确,然后执行configure选择编译环境:

? ./configure

Will use NETCDF in dir: /public/software/netcdf

------------------------------------------------------------------------

Please select from among the following supported platforms.

1. PC Linux i486 i586 i686 x86_64, PGI compiler 2. PC Linux i486 i586 i686 x86_64, Intel compiler 3. PC Linux i486 i586 i686 x86_64, gfortran compiler

Enter selection [1-3] :2

------------------------------------------------------------------------

Configuration successful. To build the ARWpost, type: compile

执行compile编译ARWpost: ?

./compile

编译成功后在当前目录生成ARWpost.exe可执行程序。

3.1.5 安装RIP4

解压RIP4压缩源码包: ? ? ?

cd ${WRF_HOME}

tar zxvf /public/sourcecode/wrf341/RIP4.tar.gz cd RIP4

确保NETCDF路径设置正确,然后执行configure选择编译环境:

? ./configure

Will use NETCDF in dir: /public/software/netcdf

------------------------------------------------------------------------

Please select from among the following supported platforms.

1. PC Linux i486 i586 i686 x86_64, PGI compiler 2. PC Linux i486 i586 i686 x86_64, g95 compiler

3. PC Linux i486 i586 i686 x86_64, gfortran compiler

4. PC Linux i486 i586 i686 x86_64, Intel compiler

Enter selection [1-4] :4

------------------------------------------------------------------------

Configuration successful. To build the RIP4, type: compile

修改configure.rip文件,修改第31行,添加-lgfortran -lcairo,如下:

31 NCARGLIBS = -L${NCARG_ROOT}/lib -lncarg -lcgm -lncarg_gks -lncarg_c -lX11 -lm -lgfortran –lcairo

执行compile,编译RIP4: ?

./compile

编译成功后在当前目录生成rip等可执行程序。

3.1.6 安装WRFDA

确保NETCDF、JASPERINC、JASPERLIB、NCARG_ROOT等环境变量设置正确,见上述WRF安装步骤。添加如下新环境变量: ? ?

export BUFR=1 export CRTM=1 解压WRFDA压缩源码包: ? ? ?

cd ${WRF_HOME}

tar zxvf /public/sourcecode/wrf341/WRFDA_V3.4.1.tar.gz cd WRFDA

修改arch/Config_new.pl,将第188行FALSE改为TRUE,如下: 188 $I_really_want_to_output_grib2_from_WRF = \

执行configure设置编译环境,选择第15项ifort/icc/dmpar:

? ./configurewrfda

checking for perl5... no

checking for perl... found /usr/bin//perl (perl) Will use NETCDF in dir: /public/software/netcdf

PHDF5 not set in environment. Will configure WRF for use without. which: no timex in

(/public/soft/mpi/openmpi-164-intel/bin:/usr/bin/:/usr/lib64/qt-3.3/bin:/public/soft/mpi/openmpi-164-intel/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/public/soft/intel/composer_xe_2013.1.117/bin/intel64:/public/soft/intel/composer_xe_2013.1.117/mpirt/bin/intel64:/public/soft/intel/composer_xe_2013.1.117/bin/intel64:/public/soft/intel/composer_xe_2013.1.117/bin/intel64_mic:/public/soft/intel/composer_xe_2013.1.117/debugger/gui/intel64:/opt/gridview//pbs//dispatcher-sched//bin:/opt/gridview//pbs//dispatcher-sched//sbi

n:/opt/gridview//pbs//dispatcher//bin:/opt/gridview//pbs//dispatcher//sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

Configuring to use jasper library to build Grib2 I/O... $JASPERLIB = /public/software/jasper/lib

$JASPERINC = /public/software/jasper/include

------------------------------------------------------------------------

Please select from among the following supported platforms.

1. Linux x86_64, PGI compiler with gcc (serial) 2. Linux x86_64, PGI compiler with gcc (smpar) 3. Linux x86_64, PGI compiler with gcc (dmpar) 4. Linux x86_64, PGI compiler with gcc (dm+sm)

5. Linux x86_64, PGI compiler with pgcc, SGI MPT (serial) 6. Linux x86_64, PGI compiler with pgcc, SGI MPT (smpar) 7. Linux x86_64, PGI compiler with pgcc, SGI MPT (dmpar) 8. Linux x86_64, PGI compiler with pgcc, SGI MPT (dm+sm) 9. Linux x86_64, PGI accelerator compiler with gcc (serial) 10. Linux x86_64, PGI accelerator compiler with gcc (smpar) 11. Linux x86_64, PGI accelerator compiler with gcc (dmpar) 12. Linux x86_64, PGI accelerator compiler with gcc (dm+sm)

13. Linux x86_64 i486 i586 i686, ifort compiler with icc (serial) 14. Linux x86_64 i486 i586 i686, ifort compiler with icc (smpar) 15. Linux x86_64 i486 i586 i686, ifort compiler with icc (dmpar) 16. Linux x86_64 i486 i586 i686, ifort compiler with icc (dm+sm) 17. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (serial)

18. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (smpar)

19. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (dmpar)

20. Linux x86_64 i486 i586 i686, ifort compiler with icc, SGI MPT (dm+sm)

21. Linux i486 i586 i686 x86_64, PathScale compiler with pathcc (serial)

22. Linux i486 i586 i686 x86_64, PathScale compiler with pathcc (dmpar)

23. x86_64 Linux, gfortran compiler with gcc (serial) 24. x86_64 Linux, gfortran compiler with gcc (smpar) 25. x86_64 Linux, gfortran compiler with gcc (dmpar) 26. x86_64 Linux, gfortran compiler with gcc (dm+sm)

27. Cray XT CLE/Linux x86_64, PGI compiler with gcc (serial) 28. Cray XT CLE/Linux x86_64, PGI compiler with gcc (smpar)

29. Cray XT CLE/Linux x86_64, PGI compiler with gcc (dmpar) 30. Cray XT CLE/Linux x86_64, PGI compiler with gcc (dm+sm)

31. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (serial) 32. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (smpar) 33. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (dmpar) 34. Cray XT CLE/Linux x86_64, Cray CCE compiler with gcc (dm+sm)

Enter selection [1-34] :15

------------------------------------------------------------------------

Compile for nesting? (1=basic, 2=preset moves, 3=vortex following) [default 1]:1

Configuration successful. To build the model type compile .

编译WRFDA: ?

./compile all_wrfvar 2>&1|tee c.log

编译成功后,在var/build和var/obsproc下生成共43个子程序: ? lsvar/build/*.exe var/obsproc/*.exe var/build/da_advance_time.exe var/build/da_bias_airmass.exe var/build/da_bias_scan.exe var/build/da_bias_sele.exe var/build/da_bias_verif.exe var/build/da_rad_diags.exe

var/build/da_tune_obs_desroziers.exe

var/build/da_tune_obs_hollingsworth1.exe var/build/da_tune_obs_hollingsworth2.exe var/build/da_update_bc_ad.exe var/build/da_update_bc.exe var/build/da_verif_grid.exe var/build/da_verif_obs.exe var/build/da_wrfvar.exe

var/build/gen_be_cov2d3d_contrib.exe var/build/gen_be_cov2d.exe

var/build/gen_be_cov3d2d_contrib.exe

var/build/gen_be_cov3d3d_bin3d_contrib.exe var/build/gen_be_cov3d3d_contrib.exe var/build/gen_be_cov3d.exe var/build/gen_be_diags.exe

var/build/gen_be_diags_read.exe var/build/gen_be_ensmean.exe var/build/gen_be_ensrf.exe var/build/gen_be_ep1.exe var/build/gen_be_ep2.exe

var/build/gen_be_etkf.exe var/build/gen_be_hist.exe

var/build/gen_be_stage0_gsi.exe var/build/gen_be_stage0_wrf.exe var/build/gen_be_stage1_1dvar.exe var/build/gen_be_stage1.exe

var/build/gen_be_stage1_gsi.exe var/build/gen_be_stage2_1dvar.exe var/build/gen_be_stage2a.exe var/build/gen_be_stage2.exe

var/build/gen_be_stage2_gsi.exe var/build/gen_be_stage3.exe

var/build/gen_be_stage4_global.exe var/build/gen_be_stage4_regional.exe var/build/gen_be_vertloc.exe var/build/gen_mbe_stage2.exe var/obsproc/obsproc.exe

本文来源:https://www.bwwdw.com/article/9ilf.html

Top