Hi Leigh,
I will try to answer some questions.
Questions:
1. Why H5Tcopy(H5T_IEEE_F32BE) and not H5Tcopy(H5T_IEEE_F32LE)? After
all, this is a little endian machine, and the example is for a little
endian memory layout?
Seems that only big-endian IEEE floating type is widely accepted. I may
be wrong.
2. When I apply the above code on a big-endian machine (IBM Power5) I
get screwed up data. It appears I somehow have to fiddle with spos,
epos, and offset for a big endian machine perhaps?
Yes, you have to figure out how to create your own n-bit datatype
following your own data.
3. Why H5Tset_size(datatype, 4) and not H5Tset_size(datatype, 2) -
after all, haven't we reduced the precision to 16 bits, i.e., 2 bytes?
N-bit type (16-bit ) by itself still occupies the unused bits by itself.
That's why you need to apply the n-bit filter to pack the used bits.
My ultimate goal here is to get the proper behavior on a big-endian
machine since that's what I'm running my model on. I want to have
fine-grained control over the lossiness of the final compressed data.
Perhaps if someone could re-do Example 11 for a big endian machine
things would become clearer to me. And I'm still puzzled about why a
pure n-bit filter doesn't reduce file size (previous email).
Correctly applying the n-bit filter with the n-bit datatype should
reduce the file size.
Kent
Leigh
--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric
Research in Boulder, CO
NCAR office phone: (303) 497-8200
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org