Installing WRF/Chem on CentOS 7 (update to ver 3.9.1.1)

本文介绍在Think Station上更新WRF到新版本,经检查选择WRF - ARW 3.9.1.1、WPS 3.9.1和WRF - Chem 3.9.1。按照之前步骤在CentOS上更新,详细说明了构建WRF和WPS的过程,包括配置和编译等操作。

Update the WRF on the Think Station to new version.

After checking the updates and Known Problems of the WRF versions, WRF-ARW 3.9.1.1, WPS 3.9.1 and WRF-Chem 3.9.1 are finally chosen.
http://www2.mmm.ucar.edu/wrf/users/download/get_sources.html

Folloiwng the steps as before
(Installing WRF/Chem on CentOS 7(转载修正) https://blog.youkuaiyun.com/maplematics/article/details/50481324), the updates are carried out as below.

Note:

  1. The ifort and icc have been updated to 2019 update ver2.
  2. Note to use the fixed files to replace the original files in WRF-ARW.

1. Build WRF

  1. Configure
    go with icc+ifort
export EM_CORE=1
export NMM_CORE=0
export WRF_CHEM=1
export WRF_KPP=0
export WRFIO_NCD_LARGE_FILE_SUPPORT=1

Then configure (wrf-arw ver 3.9.1.1 and chem 3.9.1),
./configure
choose option 13, which is ((serial) INTEL (ifort/icc)).configure (wrf-arw ver 3.9.1.1 and chem 3.9.1), choose option 13, which is ((serial) INTEL (ifort/icc)).

  1. Compile
    Compile the WRF code using the standard WRF compile command
    nohup ./compile em_real &> compile.log &

  2. Examine the compile log file to confirm that there are no compilation errors, and check executables successfully built

$ ls main/*.exe
main/ndown.exe  main/real.exe  main/tc.exe  main/wrf.exe
  1. Finally compile the WRF-Chem external emissions conversion code using the compile command
    nohup ./compile emi_conv >& emcompile.log &

2. Build WPS

  1. Configure
    Go to the WPS directory and configure the WPS code using the configure command
$ cd WPS351/
$ ./configure
// select the  Intel compiler, here choose 17
$ nohup ./compile &> compile.log &

The exe files are generated successfully.

你遇到的错误: ``` HTTP request sent, awaiting response... 404 Not Found ``` 说明: > `facter-1.6.18-1.el7.noarch.rpm` 在 `vault.centos.org/centos/7/os/x86_64/Packages/` 路径下 **不存在** 这是正常的,因为: ### ❌ 错误原因分析 - `facter` 并不属于 CentOS 7 的 **基础 OS 包**(Base OS) - 它来自 **EPEL 源**(Extra Packages for Enterprise Linux) - 所以你在 `/centos/7/os/...` 目录找不到它 - 正确路径应在:`epel/7/` 或归档中的 `epel-archive` --- ## ✅ 正确解决方案:从 EPEL 归档中下载 `facter-1.6.18` 我们需要从 **EPEL 的历史版本归档** 中获取这个包。 --- ### ✅ 步骤 1:确认 facter 来自 EPEL ```bash # 查看 RPM 包信息(可选) rpm -qi facter ``` 如果已安装但损坏,先清除: ```bash sudo rpm -e --nodeps facter ruby-facter ``` --- ### ✅ 步骤 2:从 EPEL Archive 下载 `facter-1.6.18` EPEL 团队将旧版本归档到了: 👉 https://archives.fedoraproject.org/pub/archive/epel/ 我们使用以下 URL 获取: ```bash cd /tmp wget https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/f/facter-1.6.18-1.el7.noarch.rpm ``` ✅ 这是目前最稳定、可访问的官方归档地址。 > 💡 提示:该链接长期有效,被 Fedora 官方维护用于历史系统恢复。 --- ### ✅ 步骤 3:验证是否下载成功 ```bash ls -l facter-1.6.18-1.el7.noarch.rpm ``` 你应该看到类似输出: ``` -rw-r--r-- 1 root root 1058820 Jan 29 2013 facter-1.6.18-1.el7.noarch.rpm ``` --- ### ✅ 步骤 4:手动安装 facter ```bash sudo rpm -ivh facter-1.6.18-1.el7.noarch.rpm ``` 输出应为: ``` Preparing... ################################# [100%] Updating / installing... 1:facter-1:1.6.18-1.el7 ################################# [100%] ``` --- ### ✅ 步骤 5:验证 facter 是否正常工作 ```bash facter os.name ``` ✅ 正确输出: ``` CentOS ``` 再试: ```bash facter operatingsystemrelease ``` 输出类似: ``` 7.9 ``` 检查依赖(关键!): ```bash ldd $(which facter) 2>&1 | grep leatherman ``` ✅ 正确结果:**无任何输出** 查看文件类型: ```bash file /usr/bin/facter ``` 输出应为: ``` /usr/bin/facter: Bourne-Again shell script, ASCII text executable ``` 这表明它是纯脚本包装器,不是二进制程序,不会依赖 `.so` 库。 --- ### ✅ 步骤 6:安装 packstack(自动跳过新版 facter) 现在你可以安全地安装 OpenStack Packstack: ```bash sudo yum install -y openstack-packstack ``` Yum 会检测到已有 `facter`,并尝试解决其他依赖(如 `puppet`, `hiera`),请选择安装。 > ⚠️ 如果提示冲突,请运行: > > ```bash > sudo yum install -y openstack-packstack --skip-broken > ``` 或强制忽略依赖(不推荐): ```bash sudo yum localinstall --nodeps openstack-packstack*.rpm ``` 但最好让 Yum 自动处理。 --- ### ✅ 步骤 7:防止 future breakage(重要!) 编辑 `/etc/yum.conf`,添加排除规则,避免系统更新时误装新版: ```bash echo "exclude=facter* ruby-facter* puppet* hiera*" | sudo tee -a /etc/yum.conf ``` 或者创建专用配置文件: ```bash cat <<EOF | sudo tee /etc/yum.conf.d/99-exclude-puppet.conf [main] exclude=facter* ruby-facter* puppet* hiera* EOF ``` 这样 `yum update` 就不会再引入 `facter-3.x` 导致 `.so` 依赖问题。 --- ### ✅ 备用镜像源(国内加速) 如果你无法访问 `archives.fedoraproject.org`,可以使用 **清华 TUNA 的 EPEL 归档镜像**: ```bash cd /tmp wget https://mirrors.tuna.tsinghua.edu.cn/epel-archive/7/x86_64/Packages/f/facter-1.6.18-1.el7.noarch.rpm sudo rpm -ivh facter-1.6.18-1.el7.noarch.rpm ``` ✅ 清华大学镜像站完整同步了 `epel-archive`,速度更快。 --- ### 🧩 补充知识:为什么是 `facter-1.6.18`? | 版本 | 来源 | 是否依赖 `.so` | 兼容性 | |------|------|----------------|--------| | `facter-1.6.18` | EPEL 7 (Puppet 3 era) | ❌ 否(Ruby 脚本) | ✅ 与 packstack 完全兼容 | | `facter-3.9.3` | Puppet Labs / RDO Queens | ✅ 是(C++ 编译) | ❌ 需要 `leatherman.so` | ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值