comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Error opening NetCDF - file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Error opening NetCDF - file [message #91440] Wed, 15 July 2015 08:51 Go to next message
Kai Heckel is currently offline  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 #91441 is a reply to message #91440] Wed, 15 July 2015 09:53 Go to previous messageGo to next message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
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
Re: Error opening NetCDF - file [message #91444 is a reply to message #91441] Thu, 16 July 2015 01:28 Go to previous messageGo to next message
Kai Heckel is currently offline  Kai Heckel
Messages: 51
Registered: April 2015
Member
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?
Re: Error opening NetCDF - file [message #91445 is a reply to message #91444] Thu, 16 July 2015 02:26 Go to previous messageGo to next message
Lajos Foldy is currently offline  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 #91483 is a reply to message #91440] Mon, 20 July 2015 06:11 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
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}
Re: Error opening NetCDF - file [message #91596 is a reply to message #91483] Tue, 04 August 2015 17:39 Go to previous message
benjaminforeback is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Data reading
Next Topic: cgscatter2d.pro 'keyword parameters not allowed to call' error

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:16:47 PDT 2025

Total time taken to generate the page: 0.00680 seconds