问题描述
在网上搜索了很多教程,大多是32为系统或者是Fedora、Rocks安装wrf。。。苦恼了很久,最后在师兄的帮助下终于成功在我的Ububtu13.04上安装了WRF3.5.1.废话不多说,开始安装:用户跟目录下建立文件夹wrf1、安装编译环境:m4gccgfortrang++cshsudoapt-getinstallm4gccgfortrang++csh2、安装库:zliblibpngjaspersudoapt-getinstalllibjasper-devlibpng12-devzlib1g-dev可能会提示某个库安装不了,这个不影响3、设置环境变量(~/.bashrc):exportJASPER=/usr/local/exportJASPERLIB=/usr/local/libexportJASPERINC=/usr/local/include4、安装库:libf2c2libf2c2-devlibcloog-ppl0xorg-devsudoapt-getinstalllibf2c2libf2c2-devlibcloog-ppl0xorg-dev5、安装NetCDF(4.1.3)PGI我没有安装,使用的是gfortran。./configure--prefix=/home/用户名/wrf/netcdf--disable-netcdf-4makecheckmakeinstallmakedistclean(清空)6、加入环境变量(~/.bashrc)exportNETCDF=/home/用户名/wrf/netcdfexportNETCDF_LIB=$NETCDF/libexportNETCDF_INC=$NETCDF/includeexportPATH=$NETCDF/bin:$PATHexportLD_LIBRARY_PATH=/home/用户名/wrf/netcdf/lib:$LD_LIBRARY_PATH7、安装ncarg(5.2.1x86_64nodapgcc432)下载编译好的压缩包解压到/usr/localexportNCARG_ROOT=/usr/localexportPATH=$NCARG_ROOT/bin:$PATHexportNCARG_LIB=/usr/local/libexportNCARG_INC=/usr/local/include8、编译WRF导入环境变量避免提示:exportWRFIO_NCD_LARGE_FILE_SUPPORT=1查看wrfv3.5known-prob网页(http://www.mmm.ucar.edu/wrf/users/)解压并进入wrf目录:./configure选择40(x86_64Linuxgfortrancompilerwithgcc,serial)选择1(basic)编译:./compileem_real>&error.log查看error.log查找(错误)并重新编译ll*/*.exe看到有五个exe文件表明wrf安装成功重新编译清除上次文件:./clean–a此为WRF-CHEM的步骤./compileemi_conv在em_real中生成convert_emiss.exe执行文件9、编译WPS查看wpsv3.5known-prob网页(http://www.mmm.ucar.edu/wrf/users/)解压并进入wps目录:./configure选择:1(不能识别openmp宏定义的问题)configure.wps(单机编译选项)中SFC=ifortSCC=icc改为SFC=ifort-openmpSCC=icc-openmp编译:./compile>&error.log查看error.log,发现错误重新编译安装ncview:sudoapt-getinstallncview运行WPS至此,WRF安装成功