[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #HZY-708311]: ncdump/netCDF4 segfaults probing HDF4 file
- Subject: [netCDF #HZY-708311]: ncdump/netCDF4 segfaults probing HDF4 file
- Date: Mon, 07 Oct 2013 09:25:40 -0600
Hi Charlie,
> This is an HDF4 file containing NASA MODIS snow cover data:
> http://dust.ess.uci.edu/hdf/MOD10CM.A2007001.005.2007108111758.hdf
>
> ncdump, compiled with --enable-hdf4, and the netCDF git snapshot from
> today, correctly dumps the metadata of the variable
> Snow_Cover_Monthly_CMG _unless_ the -s option is given:
>
> ncdump -s -v Snow_Cover_Monthly_CMG MOD10CM.A2007001.005.2007108111758.hdf
> (segfault)
>
> ncks also dies while trying to dump this metadata.
> ncks dies while calling nc_inq_var_chunking().
> I think ncdump dies in that or a similar function, i.e., a function
> trying to obtain netCDF4-style information from the variable.
>
> Is this something that can/should/will be fixed upstream from NCO
> such as in the netCDF library or the HDF4 or HDF5 library?
Yes, it's a bug in netCDF-4 that we should fix.
> Or should NCO develop a workaround, e.g., not attempting "certain
> functions" on HDF4 files? If so, which netCDF functions do not
> work on HDF4 files? Or, alternatively, which functions does netCDF4
> with --enable-hdf4 support on HDF4 files? And is there any detailed
> documentation on what does/doesn't from netCDF on HDF4 files?
You shouldn't have to develop a workaround. NetCDF functions that don't
work on HDF4 files should return the same way as for netCDF classic format
files, either with an error or a sensible value, such as 0 for the number
of subgroups or user-defined types.
There's not much documentation on how netCDF functions behave with HDF4
files, so we'll have to write some as we fix this problem. I'm opening
2 new issue tickets you can follow if you want to see progress on this
or make suggestions on what behaviour you want for specific functions:
https://bugtracking.unidata.ucar.edu/browse/NCF-272
https://bugtracking.unidata.ucar.edu/browse/NCF-273
--Russ
> Thanks!
> c
> --
> Charlie Zender, Earth System Sci. & Computer Sci.
> University of California, Irvine 949-891-2429 )'(
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: HZY-708311
Department: Support netCDF
Priority: Normal
Status: Closed