[Hdf-forum] Adding header attributes to an hdf5 file

Pat Tresslar pat.tresslar at gmail.com
Fri Aug 8 09:52:48 CDT 2014


I'm trying to add an attribute to a group of my hdf5 file for a citation so
that when I call the header of the file (h5dump -H example.h5) it shows the
attribute name 'Citation' as well as the text of the citation in my script.
A comparison would be using netcdf files you can call (ncdump -h example.nc)
to show such a description. I am programming in python, so far the only
result I have been able to get from calling the header is the following:

ATTRIBUTE "Citation" {
DATATYPE H5T_STRING {
STRSIZE 126;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SCALAR
}

So it shows that I'm trying to use a string, but instead of showing the
contents of that string it just shows the variable's metadata.

Thanks in advance for the help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lists.hdfgroup.org/pipermail/hdf-forum_lists.hdfgroup.org/attachments/20140808/cef2eb82/attachment.html>


More information about the Hdf-forum mailing list