Error:Not a NetCDF id


一、问题描述:之前在写代码时,测试一直用的一个NC文件,最近换了数据源再读取文件时打印信息一直提示“Error:Not a NetCDF id ”。

二、解决过程:经过一般搜索发现是和NetCDF的库使用有关系,我安装的C语言版本是NetCDF4.4.1的,C++接口库使用的是4.4.2的,所以出现了这个问题,自己感觉差别应该不大,但是C++接口库(.lib,.dll)换成4.4.1的之后确实解决问题了。由于网上资料少自己研究的也不是特别清楚。使用的是4.4有人已经给NetCDF支持者发送了问题,当然写的全是英文,由于自己的英语不好没法翻译,请自己参考:https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg09964.html

文章主要内容(linux下遇到此问题,我的环境是win7+vs13):
I am using a tool called NCO to play with my WRF output file (in .nc
format). I am using netcdf 3.6.2 version and the .nc file is 64 bit
offset. However, when I run the NCO, error occurs – Not a netCDF. Is it
possible to solve this problem?

This could occur if your version of NCO is statically linked to an old
version of netCDF, before 3.6.0. Otherwise, NCO should recognize a 64-bit
offset netCDF file. You might determine whether NCO is linking to an old
shared library by runing the unix command

ldd ncks

and checking the output for an old netcdf.so shared library.

Does ncdump recognize the file?

说明:根据自己的实际情况请参考,更多问题请参考博客中的其他文章。

转载自:https://blog.csdn.net/toby54king/article/details/78750288

You may also like...