Error opening NetCDF - file [message #91440] |
Wed, 15 July 2015 08:51  |
Kai Heckel
Messages: 51 Registered: April 2015
|
Member |
|
|
Hello!
I am currently working on a time series including multiple NetCDF's. My procedure includes a call to a "read_netcdf"-script. The first line there is "ncdf_open".
This is usually no problem but very few files are causing an error here saying 'Unable to open the file "..." (NC_ERROR=-101)'.
When I try to open these NetCDF's in the BEAM software I get the message 'No appropriate reader found'.
So I guess somethings wrong with the header of these NetCDF's? I have no clue and would be glad if you could help me out here.
|
|
|
|
|
Re: Error opening NetCDF - file [message #91445 is a reply to message #91444] |
Thu, 16 July 2015 02:26   |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
On Thursday, July 16, 2015 at 10:28:31 AM UTC+2, Kai Heckel wrote:
> Am Mittwoch, 15. Juli 2015 18:53:43 UTC+2 schrieb fawltyl...@gmail.com:
>> On Wednesday, July 15, 2015 at 5:51:39 PM UTC+2, Kai Heckel wrote:
>>> Hello!
>>>
>>> I am currently working on a time series including multiple NetCDF's. My procedure includes a call to a "read_netcdf"-script. The first line there is "ncdf_open".
>>> This is usually no problem but very few files are causing an error here saying 'Unable to open the file "..." (NC_ERROR=-101)'.
>>> When I try to open these NetCDF's in the BEAM software I get the message 'No appropriate reader found'.
>>>
>>>
>>> So I guess somethings wrong with the header of these NetCDF's? I have no clue and would be glad if you could help me out here.
>>
>> The NetCDF error codes are in netcdf.h:
>>
>> ...
>> /** Error at HDF5 layer. */
>> #define NC_EHDFERR (-101)
>> ...
>>
>> So it is an error reported by the HDF5 layer. Your file is a HDF5 file in disguise. Try to check it with a HDF5 reader.
>>
>> regards,
>> Lajos
>
> Hello Lajos,
>
> thanks for the reply.
>
> I'm sorry but how can I access a HDF5 file if I only have a NetCDF?
You have IDL :-) Check your file eg. with x=H5_BROWSER('your_file').
regards,
Lajos
|
|
|
|
Re: Error opening NetCDF - file [message #91596 is a reply to message #91483] |
Tue, 04 August 2015 17:39  |
benjaminforeback
Messages: 2 Registered: August 2015
|
Junior Member |
|
|
On Monday, July 20, 2015 at 6:11:07 AM UTC-7, Paul van Delst wrote:
> On 07/15/15 11:51, Kai Heckel wrote:
>> Hello!
>>
>> I am currently working on a time series including multiple NetCDF's.
>> My procedure includes a call to a "read_netcdf"-script. The first
>> line there is "ncdf_open". This is usually no problem but very few
>> files are causing an error here saying 'Unable to open the file "..."
>> (NC_ERROR=-101)'. When I try to open these NetCDF's in the BEAM
>> software I get the message 'No appropriate reader found'.
>>
>>
>> So I guess somethings wrong with the header of these NetCDF's? I have
>> no clue and would be glad if you could help me out here.
>
> What version of IDL do you have?
>
> From Lajos's reply it would appear you have a netCDF4 file - which uses
> HDF5 to handle the hard stuff that classic netCDF couldn't.
>
> Newer versions of IDL "understand" netCDF4. So, if you have an old(er)
> version of IDL, that may be your problem. (If, indeed, it isn't what
> Lajos indicated - you are trying to read a regular HDF5 file)
>
> I use the IDL netCDF browser to read netCDF3-and-4 datafiles with no
> problems.
>
> cheers,
>
> paulv
>
>
> p.s.
>
> IDL> print, !version
> { x86_64 linux unix linux 8.3 Nov 15 2013 64 64}
In general, HDF5 and NetCDF-4 are the same. IDL's HDF5 library can be used for accessing and reading NetCDF-4, so you could try using IDL's H5_* routines and using the file as if it was NetCDF4.
|
|
|