爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
楼主: shangbn305

[求助] fortran使用IOAPI读取.ncf文件

[复制链接]
 楼主| 发表于 2012-6-14 21:23:29 | 显示全部楼层
kshxia 发表于 2012-6-14 11:35
这是里面的变量。

netcdf.f90:(.text+0x300): undefined reference to `nf_open_'
netcdf.f90:(.text+0x352): undefined reference to `nf_strerror_'
netcdf.f90:(.text+0x3a2): undefined reference to `nf_inq_'
netcdf.f90:(.text+0x3f4): undefined reference to `nf_strerror_'
netcdf.f90:(.text+0x47a): undefined reference to `nf_inq_dim_'
netcdf.f90:(.text+0x4cc): undefined reference to `nf_strerror_'
netcdf.f90:(.text+0x595): undefined reference to `nf_inq_var_'
netcdf.f90:(.text+0x5eb): undefined reference to `nf_strerror_'
netcdf.f90:(.text+0x6f6): undefined reference to `nf_inq_attname_'
netcdf.f90:(.text+0x748): undefined reference to `nf_strerror_'
netcdf.f90:(.text+0x7b3): undefined reference to `nf_inq_atttype_'
netcdf.f90:(.text+0x805): undefined reference to `nf_strerror_'
netcdf.f90:(.text+0x870): undefined reference to `nf_inq_atttype_'
netcdf.f90:(.text+0x8c2): undefined reference to `nf_strerror_'
出现这样的错误了,不知道为啥,其实之前用IOAPI的时候也一直是这个问题,能帮我想想么?谢谢您O(∩_∩)O~
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

 楼主| 发表于 2012-6-14 21:38:29 | 显示全部楼层
shangbn305 发表于 2012-6-14 21:23
netcdf.f90:(.text+0x300): undefined reference to `nf_open_'
netcdf.f90:(.text+0x352): undefined r ...

我觉得是不是连接那里还得设置一下呢,将这些库函数设置一下啥的。。我也说不清楚
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2012-6-14 23:11:07 | 显示全部楼层
本帖最后由 kshxia 于 2012-6-14 23:11 编辑
shangbn305 发表于 2012-6-14 21:38
我觉得是不是连接那里还得设置一下呢,将这些库函数设置一下啥的。。我也说不清楚

请把这个文件下载下来认真看下,就知道怎么设置库文件了。
http://www.06climate.com/view/1047.html

不复杂。就几行。
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

 楼主| 发表于 2012-6-15 13:33:39 | 显示全部楼层
kshxia 发表于 2012-6-14 23:11
请把这个文件下载下来认真看下,就知道怎么设置库文件了。
http://www.06climate.com/view/1047.html

...

一:不改路径 f77 -i/user/netcdf/include -lib/user/netcdf/lib/netcdf.lib -o
出现问题 f77: argument to `-o' missing
二:换编译器打的这个命令  -i/user/netcdf/include -lib/user/netcdf/lib/netcdf.lib -o 出现问题
pgf90-Error-Unknown switch: -i/user/netcdf/include
pgf90-Error-Switch -o expects an argument
-o<outputfile>      Name the output file
三:路径改完 f77 -i/public/home/zhangsc/homework/SomeLibs/SomeLibs/include -lib/public/home/zhangsc/homework/SomeLibs/SomeLibs/lib/netcdf.lib -o
出现问题:f77: argument to `-o' missing
四:路径,编译器改完 pgf90 -i/public/home/zhangsc/homework/SomeLibs/SomeLibs/include -lib/public/home/zhangsc/homework/SomeLibs/SomeLibs/lib/netcdf.lib -o
出现问题:pgf90-Error-Unknown switch: -i/public/home/zhangsc/homework/SomeLibs/SomeLibs/include
pgf90-Error-Switch -o expects an argument
-o<outputfile>      Name the output file
主要是编译器连接这我不会改,在论坛里找到一个资料叫how_to_use_netcdf_in_fortran(in_Chinese).pdf ,按照里边的试了,f77 -c -I/usr/local/include myprogram.f 及
f77 -o myprogram myprogram.o -L/usr/local/lib -lnetcdf 命令,还是出错。。。
太麻烦了,但是如果不问您这个问题我就解决不了,帮我看看吧,谢谢您了!
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2012-6-15 14:00:24 | 显示全部楼层

你的四个问题貌似都是一个问题: expects an argument
就是-o后面应该有-o<outputfile>      Name the output file。
以上,个人浅见。
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2015-9-17 17:12:12 | 显示全部楼层
楼主,能给个联系方式吗
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2015-11-29 11:58:49 | 显示全部楼层
请问IOAPI是一个什么程序?怎样使用?新手求教
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2016-10-21 09:43:07 | 显示全部楼层
没解决方法/.......
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2016-10-21 09:43:10 | 显示全部楼层
.................
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

发表于 2016-12-16 23:34:22 | 显示全部楼层
楼主,你好。最近正在学污染模式,看到这个帖子,ncf用Matlab和python都能读取,用Matlab试了下,读取和显示是没有问题的,但是没有试过写ncf。估计应该差不多。你是用Fortran处理程序么?
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

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

本版积分规则

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

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

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