请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 2803|回复: 2

[求助] 关于汇编read_wrf_nc的问题。

[复制链接]

新浪微博达人勋

发表于 2017-10-18 07:05:05 | 显示全部楼层 |阅读模式

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

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

x
本人初学wrf模式,在用read_wrf_nc.f汇编read_wrf_nc是输入命令pgf90 read_wrf_nc.f -L/opt/netcdf/lib -lnetcdf -inetcdff -lm -I/opt/netcdf/include -Mfree -o read_wrf_nc
结果出现了下面的错误:
PGF90-S-0155-Source line too long  (read_wrf_nc.f: 3)
PGF90-S-0034-Syntax error at or near < (read_wrf_nc.f: 2)
PGF90-S-0034-Syntax error at or near < (read_wrf_nc.f: 3)
  0 inform,   0 warnings,   3 severes, 0 fatal for map_utils
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 369)
PGF90-S-0034-Syntax error at or near end of line (read_wrf_nc.f: 369)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 370)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 370)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 371)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 385)
PGF90-S-0034-Syntax error at or near end of line (read_wrf_nc.f: 385)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 386)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 386)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 387)
  0 inform,   0 warnings,  10 severes, 0 fatal for llij_lc
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 437)
PGF90-S-0034-Syntax error at or near end of line (read_wrf_nc.f: 437)
PGF90-S-0034-Syntax error at or near - (read_wrf_nc.f: 438)
  0 inform,   0 warnings,   3 severes, 0 fatal for llij_merc
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 469)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 469)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 470)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 476)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 476)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 477)
PGF90-S-0034-Syntax error at or near , (read_wrf_nc.f: 477)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 478)
  0 inform,   0 warnings,   8 severes, 0 fatal for read_wrf_nc
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 539)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 539)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 540)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 587)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 587)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 609)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 609)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 610)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 681)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 681)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 682)
PGF90-S-0302-Unmatched ENDSUBROUTINE statement (read_wrf_nc.f: 723)
  0 inform,   0 warnings,  12 severes, 0 fatal for MAIN
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 725)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 725)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 726)
PGF90-S-0034-Syntax error at or near , (read_wrf_nc.f: 726)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 727)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 828)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 828)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 829)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 921)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 921)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 928)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 928)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 929)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 929)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 935)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 935)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 936)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 936)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 937)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 937)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 938)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 959)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 959)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 960)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 960)
PGF90-F-0008-Error limit exceeded (read_wrf_nc.f: 960)
PGF90/x86-64 Linux 10.6-0: compilation aborted
[root@server2 lj]# pgf90 read_wrf_nc.f -L/opt/netcdf/lib -lnetcdf -lnetcdff -lm -I/opt/netcdf/include -Mfree -o read_wrf_nc
PGF90-S-0155-Source line too long  (read_wrf_nc.f: 3)
PGF90-S-0034-Syntax error at or near < (read_wrf_nc.f: 2)
PGF90-S-0034-Syntax error at or near < (read_wrf_nc.f: 3)
  0 inform,   0 warnings,   3 severes, 0 fatal for map_utils
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 369)
PGF90-S-0034-Syntax error at or near end of line (read_wrf_nc.f: 369)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 370)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 370)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 371)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 385)
PGF90-S-0034-Syntax error at or near end of line (read_wrf_nc.f: 385)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 386)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 386)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 387)
  0 inform,   0 warnings,  10 severes, 0 fatal for llij_lc
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 437)
PGF90-S-0034-Syntax error at or near end of line (read_wrf_nc.f: 437)
PGF90-S-0034-Syntax error at or near - (read_wrf_nc.f: 438)
  0 inform,   0 warnings,   3 severes, 0 fatal for llij_merc
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 469)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 469)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 470)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 476)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 476)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 477)
PGF90-S-0034-Syntax error at or near , (read_wrf_nc.f: 477)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 478)
  0 inform,   0 warnings,   8 severes, 0 fatal for read_wrf_nc
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 539)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 539)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 540)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 587)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 587)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 609)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 609)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 610)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 681)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 681)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 682)
PGF90-S-0302-Unmatched ENDSUBROUTINE statement (read_wrf_nc.f: 723)
  0 inform,   0 warnings,  12 severes, 0 fatal for MAIN
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 725)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 725)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 726)
PGF90-S-0034-Syntax error at or near , (read_wrf_nc.f: 726)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 727)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 828)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 828)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 829)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 921)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 921)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 928)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 928)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 929)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 929)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 935)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 935)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 936)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 936)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 937)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 937)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 938)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 959)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 959)
PGF90-S-0155-Non-comment character after '&'  (read_wrf_nc.f: 960)
PGF90-S-0023-Syntax error - unbalanced parentheses (read_wrf_nc.f: 960)
PGF90-F-0008-Error limit exceeded (read_wrf_nc.f: 960)
PGF90/x86-64 Linux 10.6-0: compilation aborted
请问是哪里出错了???望大神回复

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-18 07:37:55 | 显示全部楼层
看报错的话是说代码有些行太长了。
Fortran有两大种格式:老的格式(fixed format)要求所有行的长度在72字符之内,新的格式(free-format)允许行的长度任意长。
这个代码显然是free-format,有些行的长度超了。
为了区分这两种格式,习惯上人们会把fixed format的代码命名成*.f 之类;free-format的会命名成*.f90之类。编译器默认会按照文件名选择格式。
显然这个代码没按照命名方式的习惯。
但理论上编译的时候加上 -Mfree应该会强迫代码以free-format的方式编译。这样应该不会有问题的,所以我也有点诧异。
所以我的建议是:
改名成 read_wrf_nc.f90, 然后再重新编译试试。
如果不行, pgf90 --version,然后把显示的东西告诉我。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-10-19 12:02:49 | 显示全部楼层
packard 发表于 2017-10-18 07:37
看报错的话是说代码有些行太长了。
Fortran有两大种格式:老的格式(fixed format)要求所有行的长度在72字 ...

太感谢啦!!!我换了一个read_wrf_nc.f文件就好啦,谢谢您啦!
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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