WRF (Weather Research and Forecast) is a powerful numerical simulation tool in atmospheric science. It is maintained by UCAR, and in continuous development. There has been a lot of official (ARW user guide)/ unofficial installation guide, but not so much information for CentOS 7 system. There are some minor differences in CentOS 7 that we have to configure manually. This, however, is pretty straightforward if you are familiar with Linux. Here I will show how to set up the basic dependencies, and how to compile WRF, as well as the related WPS and RIP4. Here I will give out the steps for Intel compiler installation.
0.My system
It is running CentOS 7, and basically it is after a fresh install.
CentOS 安装及 intel 编译安装参考 “用CentOS 7打造合适的科研环境”.
Intel version
1. Install Intel compiler
There are already a lot of tutorials out there, and I found it good to accept the Intel’s default setting. By default, the software will be in /opt/intel directory. To make icc and ifort available, we need to have our shell read several environment variables setting scripts. I added the following lines to my ~/.bashrc file. Note if you are using csh or tcsh, the files will be a little bit different, and you can find them in these directories.
source /opt/intel/vtune_amplifier_xe_2015/amplxe-vars.sh quiet
source /opt/intel/inspector_xe_2015/inspxe-vars.sh quiet
source /opt/intel/advisor_xe_2015/advixe-vars.sh quiet
source /opt/intel/bin/compilervars.sh intel64
source /opt/intel/bin/ifortvars.sh intel64
source /opt/intel/bin/iccvars.sh intel64
(Here, it is better to create a sh file in /etc/profile.d/, and add the lines above in the sh file.) The last two lines are for the installation of NETCDF.
- Solve dependencies
2.1 NetCDF
NetCDF is available from package manager (which is yum in CentOS). However, if we install it through yum then it is compiled by GNU compiler, which is not what we want. So let’s install from source code. The source codes have been seperated as NetCDF-C and NetCDF-Fortran version now. WRF requires Fortran version, but Fortran version depends on C version, so we will install both. Download the codes at Unidata.
2.1.0 Solve dependencies of netcdf
http://www.unidata.ucar.edu/sof