爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 11486|回复: 4

解决旧版本pgi安装wrf3.9以后版本无法编译ungrib.exe-编译器版本过旧

[复制链接]
发表于 2020-12-2 14:07:10 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
解决旧版本pgi安装wrf3.9以后版本无法编译ungrib.exe-编译器版本过旧

参考网址:
https://www2.mmm.ucar.edu/wrf/users/wpsv3.9/known-prob-3.9.html
网址中针对gfortran编译器提出了解决办法,经测试对PGI-x86-10.6版本编译wrf3.9系列和4.0也适用

PGI报错如下:
PGF90-S-0155-new_plvlhas the ALLOCATABLE attribute and may not appear in a namelist group(read_namelist.f90: 70)
PGF90-S-0000-Internalcompiler error. sym_is_refd: bad sc
       6 (read_namelist.f90: 58)
  0 inform,  0 warnings,   2 severes, 0 fatalfor read_namelist
make[1]:[read_namelist.o] Error 2 (ignored)
/bin/rm -f cio.o
mpicc -D_UNDERSCORE-DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 -D_MPI -D_UNGRIB-O -c cio.c
/bin/rm -f libpgu.a
ar ru libpgu.abuild_hdate.o geth_newdate.o geth_idts.o swap.o table.o parse_table.ogbytesys.o gribcode.o read_namelist.o cio.o
ar: creating libpgu.a
ar: read_namelist.o: Nosuch file or directory
make[1]: [libpgu.a]Error 1 (ignored)

gfortran报错如下:
gfortran -c -ffree-form-O -fconvert=big-endian -frecord-marker=4 read_namelist.f90
read_namelist.f90:73.25:

       add_lvls, new_plvl, interp_type
                         1
Error: NAMELISTattribute conflicts with ALLOCATABLE attribute in 'new_plvl' at (1)
read_namelist.f90:239.20:

  read(10,NML=ungrib,END=100)
                    1
Error: Symbol 'ungrib'at (1) must be a NAMELIST group name
make[1]:[read_namelist.o] Error 1 (ignored)
/bin/rm -f cio.o
mpicc -cc=gcc  -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF-DBIT32 -DNO_SIGNAL -D_MPI -D_UNGRIB  -ccio.c
/bin/rm -f libpgu.a
ar ru libpgu.abuild_hdate.o geth_newdate.o geth_idts.o swap.o table.o parse_table.ogbytesys.o gribcode.o read_namelist.o cio.o
ar: creating libpgu.a
ar: read_namelist.o: Nosuch file or directory
make[1]: [libpgu.a]Error 1 (ignored)
ranlib  libpgu.a
ranlib: 'libpgu.a': Nosuch file
make[1]: [libpgu.a]Error 1 (ignored)
/bin/rm -f ungrib.exe

具体解决方法:二选一
1、换新版本编译器(太麻烦)
2、修改WPS/ungrib/src/中的read_namelist.F文件后,重新编译WPS(简单有效)
PGI编译器需要先下载WPSV3.9.0.1_pgi_fix.tar.gz,将其放在WPS/ungrib/src/ngl/g2/目录下,然后解压
tar -zxvf WPSV3.9.0.1_pgi_fix.tar.gz
修改方法:首先将程序中56行改为
real, dimension(250) :: new_plvl
删除或者把74行和297行注释掉(行首加!)
line 74: allocate(new_plvl(size(new_plvl_in)))
line 297: deallocate(new_plvl)
保存退出后在WPS目录下重新编译ungrib,即可成功生成ungrib.exe
./clean
./configure
./compile ungrib
利用旧版本wrf3.9及之前版本模拟19年之后的个例需要将旧版本的 ungrib.exe,Vtable.GFS和METGRID.TBL.ARW替换为wrf4.0之后的新版本
对于wrf3.9系列的用户:只需更新ungrib.exe到wrf4.0之后的新版本
对于wrf3.8及之前的用户:ungrib.exe,Vtable.GFS和METGRID.TBL.ARW都要更新到wrf4.0之后的新版本
因为Vtable.GFS和METGRID.TBL.ARW在3.9版本经过更新,与4.0版本相同,但3.8版本的这两个文件没有更新

经测试,3.9版本编译的ungrib.exe和3.8以前的版本一样,不能生成met文件,均报错如下:
ERROR:Error in ext_pkg_write_field
applicationcalled MPI_Abort(MPI_COMM_WORLD, 4273443) - process 0
metgrid.log报错部分如下:
2020-12-0213:41:35.843 --- INFORM: ST at level 10.000000 already exists; leaving italone.
2020-12-0213:41:35.843 --- INFORM: Couldn't find ST010035 at level 200100.000000 to filllevel 35.000000 of ST.
2020-12-0213:41:35.843 --- INFORM: ST at level 100.000000 already exists; leaving italone.
2020-12-0213:41:35.843 --- INFORM: Couldn't find ST100300 at level 200100.000000 to filllevel 300.000000 of ST.
2020-12-0213:41:35.843 --- INFORM: ST at level 10.000000 already exists; leaving italone.
2020-12-0213:41:35.843 --- INFORM: ST at level 200.000000 already exists; leaving italone.
2020-12-0213:41:35.843 --- INFORM: Couldn't find ST000007 at level 200100.000000 to filllevel 7.000000 of ST.
2020-12-0213:41:35.843 --- INFORM: Couldn't find ST007028 at level 200100.000000 to filllevel 28.000000 of ST.
2020-12-0213:41:35.843 --- INFORM: ST at level 100.000000 already exists; leaving italone.
2020-12-0213:41:35.843 --- INFORM: Couldn't find ST100289 at level 200100.000000 to filllevel 289.000000 of ST.
2020-12-0213:41:35.843 --- INFORM: Going to create the field SM
2020-12-0213:41:35.846 --- INFORM: SM at level 10.000000 already exists; leaving italone.
2020-12-0213:41:35.846 --- INFORM: Couldn't find SM010035 at level 200100.000000 to filllevel 35.000000 of SM.
2020-12-0213:41:35.846 --- INFORM: SM at level 100.000000 already exists; leaving italone.
2020-12-0213:41:35.846 --- INFORM: Couldn't find SM100300 at level 200100.000000 to filllevel 300.000000 of SM.
2020-12-0213:41:35.846 --- INFORM: SM at level 10.000000 already exists; leaving italone.
2020-12-0213:41:35.846 --- INFORM: SM at level 200.000000 already exists; leaving italone.
2020-12-0213:41:35.846 --- INFORM: Couldn't find SM000007 at level 200100.000000 to filllevel 7.000000 of SM.
2020-12-0213:41:35.846 --- INFORM: Couldn't find SM007028 at level 200100.000000 to filllevel 28.000000 of SM.
2020-12-0213:41:35.846 --- INFORM: SM at level 100.000000 already exists; leaving italone.
2020-12-0213:41:35.846 --- INFORM: Couldn't find SM100289 at level 200100.000000 to filllevel 289.000000 of SM.
2020-12-0213:41:35.846 --- INFORM: Going to create the field SW
2020-12-0213:41:35.847 --- INFORM: Couldn't find SW000010 at level 200100.000000 to filllevel 1.000000 of SW.
2020-12-0213:41:35.847 --- INFORM: Couldn't find SW010040 at level 200100.000000 to filllevel 2.000000 of SW.
2020-12-0213:41:35.847 --- INFORM: Couldn't find SW040100 at level 200100.000000 to filllevel 3.000000 of SW.
2020-12-0213:41:35.847 --- INFORM: Couldn't find SW100200 at level 200100.000000 to filllevel 4.000000 of SW.
2020-12-0213:41:35.847 --- INFORM: Couldn't find SW000010 at level 200100.000000 to filllevel 1.000000 of SW.
2020-12-0213:41:35.847 --- INFORM: Couldn't find SW010200 at level 200100.000000 to filllevel 2.000000 of SW.
2020-12-0213:41:35.847 --- INFORM: Going to create the field SOIL_LAYERS
2020-12-0213:41:35.848 --- INFORM: Going to create the field SOILM
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILM000 at level 200100.000000 to filllevel 0.000000 of SOILM.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILM005 at level 200100.000000 to filllevel 5.000000 of SOILM.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILM020 at level 200100.000000 to filllevel 20.000000 of SOILM.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILM040 at level 200100.000000 to filllevel 40.000000 of SOILM.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILM160 at level 200100.000000 to filllevel 160.000000 of SOILM.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILM300 at level 200100.000000 to filllevel 300.000000 of SOILM.
2020-12-0213:41:35.848 --- INFORM: Going to create the field SOILT
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILT000 at level 200100.000000 to filllevel 0.000000 of SOILT.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILT005 at level 200100.000000 to filllevel 5.000000 of SOILT.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILT020 at level 200100.000000 to filllevel 20.000000 of SOILT.
2020-12-0213:41:35.848 --- INFORM: Couldn't find SOILT040 at level 200100.000000 to filllevel 40.000000 of SOILT.
2020-12-0213:41:35.849 --- INFORM: Couldn't find SOILT160 at level 200100.000000 to filllevel 160.000000 of SOILT.
2020-12-0213:41:35.849 --- INFORM: Couldn't find SOILT300 at level 200100.000000 to filllevel 300.000000 of SOILT.
2020-12-0213:41:35.849 --- INFORM: Couldn't find SOILT050 at level 200100.000000 to filllevel 49.000000 of SOILT.
2020-12-0213:41:35.849 --- INFORM: Couldn't find SOILT050 at level 200100.000000 to filllevel 51.000000 of SOILT.
2020-12-0213:41:35.849 --- INFORM: Going to create the field SOIL_LEVELS
2020-12-0213:41:35.849 --- INFORM: Going to create the field PRES
2020-12-0213:41:35.863 --- INFORM: PRES at level 200100.000000 already exists; leaving italone.
2020-12-0213:41:35.938 --- INFORM: Field LANDSEA.mask does not have a valid mask and willnot be checked for missing values
2020-12-0213:41:36.019 --- Initializing output module.
2020-12-0213:41:36.039 --- ERROR: Error in ext_pkg_write_field

WPSV3.9.0.1_pgi_fix.tar.gz

4.58 KB, 下载次数: 13, 下载积分: 金钱 -5

密码修改失败请联系微信:mofangbao
 楼主| 发表于 2020-12-2 14:14:59 | 显示全部楼层
还要记得更新最新的geog数据
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-12-3 10:48:03 | 显示全部楼层
楼主真是及时雨!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-12-3 10:52:09 | 显示全部楼层
想问楼主,pgi10.6版本安装wrf4.0的时候,./configure的时候warning,说不支持一些Fortran2008 standard,然后编译完成后,run目录没有生成四个exe,是不是编译器版本的问题?
楼主用pgi10.6可以成功compile wrf4.0是吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2021-9-10 00:09:29 | 显示全部楼层
有破解lic吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表