Installing WRF on CentOS 7

本文详细介绍了如何在CentOS 7系统上安装WRF(Weather Research and Forecast)及其依赖,包括Intel编译器、NetCDF-C和NetCDF-Fortran。首先,安装Intel编译器,然后从源码编译安装NetCDF,解决其对HDF5、zlib和curl库的依赖。文章提供了每一步的具体操作步骤和可能遇到的问题解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

  1. 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

### CentOS 7 Minimal Install ISO Download and Guide For obtaining the CentOS 7 minimal installation, one can visit the official CentOS website to find the latest version of the minimal ISO image available for download. The minimal install option provides a smaller set of packages that are essential for getting started with the operating system without additional graphical environments or application servers[^1]. To proceed with downloading: - Navigate to the CentOS vault if seeking older versions or specific point releases. - Choose the appropriate architecture (e.g., x86_64). - Select `minimal` under theisos directory. After acquiring the ISO file, preparation involves verifying its integrity using checksums provided on the site before proceeding with burning it onto a USB drive or DVD depending upon hardware setup preferences. Once prepared, booting from this media allows users to begin installing CentOS 7 in a streamlined manner focused solely on core functionalities necessary for server deployments or learning purposes as mentioned when considering environments like Hyper-V where such installations might take place[^2]. ```bash # Example command line instructions after accessing internet post-installation yum update -y ``` Installation steps generally include selecting language settings, configuring network interfaces along with setting up storage partitions according to personal requirements which may vary between different use cases including but not limited to educational setups within virtual machines.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值