Hi,

Does anyone know how I could define a floating point data type to

represent

A 32-bit float in IBM system/360 format? I would like to be able to

create an

HDF file with the actual data being contained in an external SEG-Y file

(file

format used for storing seismic data). This would hopefully allow me to

have a

nice interface to existing SEG-Y files. Unfortunately the floating-point

data

Contained in this type of file is usually in IBM-32 bit format.

I have had a look at the HDF documentation and my first attempt looked

like this:

hid_t IBM_type;

IBM_type = H5Tcopy(H5T_IEEE_F32BE);

H5Tset_precision(IBM_type, 32);

H5Tset_fields(IBM_type, 31, 24, 7, 0, 24);

H5Tset_ebias(IBM_type, 64);

H5Tset_norm(IBM_type, H5T_NORM_NONE);

H5Tset_order(IBM_type, H5T_ORDER_BE);

This sets the mantissa, exponent bit sizes/positions etc.

Of course, this doesn't work correctly because the IBM floating point

format uses base 16 rather than base 2 for the exponent power ie.

Float = sign * mantissa * 16^exponent rather than the usual

Float = sign * mantissa * 2^exponent

Anybody have an idea of how this could be achieved using HDF?

Thanks

Paul