Getting error 10001 when I try to load netCDF data
steeve88
I am trying to load a netCDF file with IGOR. In the past, I did that couple of time successfully. However, I am getting this error now.
Load_NetCDF error : Not a netCDF file
Error (10001), while loading "\\home$\Downloads\wind.nc"
I tried the same file with GrADS (graphics software) and it was loaded with no problems. So, the file is not damaged.
Any ideas?
Stavros
The longer answer is . . .
There are various versions of NetCDF files. I have pasted a discussion of this below.
If your file is a netcdf4 file, you can load it using Igor's HDF5 loader. For information on activating the HDF5 loader, execute:
============
Here is a summary of the pertinent facts gleaned from http://www.unidata.ucar.edu/software/netcdf/docs/faq.html:
The original netCDF format, which was the only format created between 1989 and 2004, is called the "classic format" or "netCDF-3". It can be loaded by the user-contributed nc_load XOP available via http://www.wavemetrics.com/users/tools.htm.
netCDF-4 was introduced in 2004. It is based on HDF5 and therefore can be loaded by Igor's HDF5 browser.
netCDF-3 "is still the default format for new netCDF files and the form in which most netCDF data is stored." This means that most netCDF files can be read by the nc_load XOP but not by Igor's HDF5 browser.
netCDF-3 files start with these four bytes: 'C', 'D', 'F', 0x01.
netCDF-3 "64-bit offset" files start with these four bytes: 'C', 'D', 'F', 0x02.
netCDF-4 files start with these four bytes: 0x89 (octal 211), 'H', 'D', 'F'.
netCDF-3 files can be converted to netCDF-4 using the nccopy utilty from netCDF version 4.1 and later. As far as I can tell the nccopy utility is not available in binary form - you have to download from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp and compile the source code.
netCDF-4 files come in two flavors: classic model and enhanced model. Both are based on HDF5.
December 3, 2015 at 09:05 am - Permalink
I've attached the nc file. What I tried was Load_netCDF command and I got that error. I tried hdf5 loader as well but it didn't work.
December 4, 2015 at 01:57 am - Permalink
Do you have any piece of advice?
December 4, 2015 at 02:39 am - Permalink
I examined your NetCDF file using GBLoadWave, like this:
Edit wave0
From this, I can see that the first four bytes are 67, 68, 70, 2. This is 'C', 'D', 'F', 0x02 which means that it is a NetCDF 3 "64-bit offset file". The NetCDF XOP referenced from https://www.wavemetrics.com/users/tools.htm does not support the 64-bit offset format because it was compiled with a version of the NetCDF library that predates it.
I created an experimental version for another user using a newer library. It does support the 64-bit offset format. It is available only for Windows and only for Igor32 (32-bit version of Igor).
You can download the experimental version here: http://www.wavemetrics.net/Downloads/Customers/nc_load-Win32-2014-10-30…
Drag your nc_load.xop file out of the way, such as to the desktop, and then install the contents of that zip file in Igor Extensions.
December 4, 2015 at 10:57 am - Permalink
I have windows 8.1 on my laptop (64-bit) and Igor (32-bit). However, it worked correctly.
I will use it tomorrow on my office's desktop and I leave a feedback.
Thanks again,
Stavros
December 7, 2015 at 10:06 am - Permalink