CDF file opens in HDFView but not libhdf5

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CDF file opens in HDFView but not libhdf5

Martijn Jasperse
Hi All,
I've been sent a CDF file from a user which was generated by some vendor application, which appears to open correctly in HDFView but does not open at all in libhdf5 or associated tools (h5ls, h5dump, etc). My understanding is that this version of CDF is an H5 with particular structure so this "should" be possible.

It seems to me the file is corrupted somehow, but I'm curious as to how HDFView can extract some data from the file when libhdf5-based programs can't even open it. Corruption is evident if you attempt to open a char dataset, but the user wants to be able to extract particular datasets which are viewable correctly in HDFView.

I'm using HDFView 3.0.0 and h5ls/h5dump from the v1.10.1 distro (Windows 10), which both return "unable to open file". The example file is at https://drive.google.com/open?id=1_ABK-XnVU2Tw7fuOhNmPqc9ZoY7xqdEy

The logic out there seems to be that "if HDFView can open it, it's a valid HDF file" and therefore any HDF application should be able to process it - or at least that there must be some way to extract the data.

Thanks for any assistance.

Cheers,
Martijn


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: CDF file opens in HDFView but not libhdf5

Martijn Jasperse
Hi again,
My mistake - this is not an HDF file at all, but rather netCDF rev 2.3.2 (?) which is before the change to using HDF5 structure. I'm assuming HDFView includes a library that opens netCDF files in the old format which is why it can be opened there and not by libhdf5/tools.

Makes total sense, the mistake was assuming that the file was in netCDF4 without checking.

Cheers,
Martijn

On 9 November 2017 at 14:54, Martijn Jasperse <[hidden email]> wrote:
Hi All,
I've been sent a CDF file from a user which was generated by some vendor application, which appears to open correctly in HDFView but does not open at all in libhdf5 or associated tools (h5ls, h5dump, etc). My understanding is that this version of CDF is an H5 with particular structure so this "should" be possible.

It seems to me the file is corrupted somehow, but I'm curious as to how HDFView can extract some data from the file when libhdf5-based programs can't even open it. Corruption is evident if you attempt to open a char dataset, but the user wants to be able to extract particular datasets which are viewable correctly in HDFView.

I'm using HDFView 3.0.0 and h5ls/h5dump from the v1.10.1 distro (Windows 10), which both return "unable to open file". The example file is at https://drive.google.com/open?id=1_ABK-XnVU2Tw7fuOhNmPqc9ZoY7xqdEy

The logic out there seems to be that "if HDFView can open it, it's a valid HDF file" and therefore any HDF application should be able to process it - or at least that there must be some way to extract the data.

Thanks for any assistance.

Cheers,
Martijn



_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5