首先非常感谢您无私的分享!
我下载了您的帖子http://bbs.06climate.com/forum.php?mod=viewthread&tid=988&extra=&page=1中fortran读取nc数据的程序,放在Linux下和Windows下都进行了测试,可是在都有一些问题,问题如下:
1、在Linux中运行ifort nc.f90后出现如下错误:
netcdf.inc(4): remark #7916: OBJCOMMENT is not supported on this platform.
!DEC$OBJCOMMENT LIB:'netcdf.LIB'
-----^
/tmp/ifortJvJGUd.o: In function `MAIN__':
nc.f90:(.text+0x22e): undefined reference to `nf_open_'
nc.f90:(.text+0x266): undefined reference to `nf_inq_'
nc.f90:(.text+0x2d3): undefined reference to `nf_inq_dim_'
nc.f90:(.text+0x382): undefined reference to `nf_inq_var_'
nc.f90:(.text+0x4c9): undefined reference to `nf_inq_attname_'
nc.f90:(.text+0x518): undefined reference to `nf_inq_atttype_'
nc.f90:(.text+0x567): undefined reference to `nf_inq_atttype_'
nc.f90:(.text+0x31a7): undefined reference to `nf_strerror_'
nc.f90:(.text+0x3200): undefined reference to `nf_strerror_'
nc.f90:(.text+0x3259): undefined reference to `nf_strerror_'
nc.f90:(.text+0x32b2): undefined reference to `nf_strerror_'
nc.f90:(.text+0x3314): undefined reference to `nf_strerror_'
/tmp/ifortJvJGUd.o:nc.f90:(.text+0x3376): more undefined references to `nf_strerror_' follow
2、在Windows下运行出现如下错误:
error #5102: Cannot open include file 'netcdf.inc'