NETCDF FORTRAN未能以NETCDF文件为单位hdf nf90_open
与风分析有关CCMP_WIND_ANALYSIS__YYYYMMDD_V02.0_L3.0_RSS.NC从FTP.SSMI.com下载。
NetCDF Fortran库成功地开放了气候学,但没有提供提供的示例代码的单个每日数据。
program open
USE netcdf
IMPLICIT NONE
INTEGER(KIND=4) :: ierr !Open netCDF file
ierr=nf90_open(path='infile', mode=nf90_nowrite, ncid=ncid)
ierr=nf90_close(ncid)
end program open
它返回了
error code -51, "NetCDF: Unknown file format "
失败的文件似乎是由Matlab创建的,它的版本是NetCDF-4经典模型
$ ncdump -k Data/CCMP/200408/CCMP_Wind_Analysis_20040801_V02.0_L3.0_RSS.nc
$ netCDF-4 classic model
,气候是由IDL创建的,它的版本是Clasic,
$ ncdump -k Data/CCMP/CCMP_Wind_Analysis_climatology_V02.0_L3.5_RSS.nc
$ classic
每天和气候数据都可以由NCDUMP或GRADS打开,但我想二进制dump。每日数据,如果我可以使用fortran,则会更快。
有人知道为什么以及如何解决它吗?
提前致谢。
I am having a problem dealing with wind analysis CCMP_Wind_Analysis_yyyymmdd_V02.0_L3.0_RSS.nc downloaded from ftp.ssmi.com.
NetCDF fortran library successfully opened the climatology but not the individual daily data with the provided sample code.
program open
USE netcdf
IMPLICIT NONE
INTEGER(KIND=4) :: ierr !Open netCDF file
ierr=nf90_open(path='infile', mode=nf90_nowrite, ncid=ncid)
ierr=nf90_close(ncid)
end program open
It returned
error code -51, "NetCDF: Unknown file format "
The failed file seems created by Matlab and it's version was netCDF-4 classic model
$ ncdump -k Data/CCMP/200408/CCMP_Wind_Analysis_20040801_V02.0_L3.0_RSS.nc
$ netCDF-4 classic model
and climatology was created by IDL and it's version was clasic
$ ncdump -k Data/CCMP/CCMP_Wind_Analysis_climatology_V02.0_L3.5_RSS.nc
$ classic
The both daily and climatology data can be opened by ncdump or by grads, but I want to binary dump the daily data and it's much faster if I can use fortran.
Does anyone know why and how it can be solved?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的Fortran代码似乎很可能链接到NetCDF经典库,而不是NetCDF4库。 NetCDF4库将产生以下对
nf-config
的响应:确保
- has-nc4 - >是
不是- >否
。It seems most likely that your Fortran code is linked to a netCDF classic library, not a netCDF4 library. A netCDF4 library will produce something like the following response to
nf-config
:Make sure that
--has-nc4 -> yes
not-> no
.