NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] nc_inq_var_chunking segfault with hdf4 format file

  • To: Dennis Heimbigner <dmh@xxxxxxxxxxxxxxxx>
  • Subject: Re: [netcdfgroup] nc_inq_var_chunking segfault with hdf4 format file
  • From: "David W. Pierce" <dpierce@xxxxxxxx>
  • Date: Mon, 19 Aug 2013 10:46:54 -0700
It seems that nc_inq_var_deflate, nc_inq_var_fletcher32, and
nc_inq_var_endian all work with hdf4 files; i.e., they report no
compression, no checksum, and the correct endian (on my machine),
respectively. It's the nc_inq_var_chunking call that is the odd man out.

By the way -- not sure if I misinterpreted this:

> it will return an error because that is the only value
> that can be returned by netcdf API functions.

I just meant that it seems like it would be a clean solution if
nc_inq_var_chunking set *storagep to NC_CONTIGUOUS and returned without
generating an error if given a hdf4 format file, since, as far as I know,
no hdf4 format file can have chunked variables.

Regards,

--Dave



On Mon, Aug 19, 2013 at 10:23 AM, Dennis Heimbigner <dmh@xxxxxxxxxxxxxxxx>wrote:

> I think we can fix this; it will return
> an error because that is the only value
> that can be returned by netcdf API functions.
>
> Are there other netcdf operations not
> available on HDF4 files? Compression, for
> example?
>
> =Dennis Heimbigner
>  Unidata
>
>
> David W. Pierce wrote:
>
>> Hi all,
>>
>> Using netcdf version 4.3.0, the library segfaults if a hdf4 format file is
>> passed to the nc_inq_var_chunking routine.
>>
>> It would be nice to be able to avoid this. Two solutions spring to mind:
>>
>> 1) Could the nc_inq_var_chunking routine be changed so that it simply
>> reports that any variable in a hdf4 format file is not chunked? Or,
>> perhaps
>> not as good but still serviceable, return an error code in this event?
>>
>> 2) Barring that, is there any way for user code to find out if the library
>> is accessing a hdf4 format file, so that the user code can avoid the call
>> to nc_inq_var_chunking in the first place?
>>
>> Regards,
>>
>> --Dave
>>
>>
>>
>> ------------------------------**------------------------------**
>> ------------
>>
>> ______________________________**_________________
>> netcdfgroup mailing list
>> netcdfgroup@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe,  visit:
>> http://www.unidata.ucar.edu/**mailing_lists/<http://www.unidata.ucar.edu/mailing_lists/>
>>
>
> ______________________________**_________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/**mailing_lists/<http://www.unidata.ucar.edu/mailing_lists/>




-- 
David W. Pierce
Division of Climate, Atmospheric Science, and Physical Oceanography
Scripps Institution of Oceanography, La Jolla, California, USA
(858) 534-8276 (voice)  /  (858) 534-8561 (fax)    dpierce@xxxxxxxx
  • 2013 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: