Introduction

HDF is a library for storing data in a platform-independent binary format. This extention to FlexIO allows it to read and write HDF-SDS (Scientific Data Set) format using the standard FlexIO API. This version of HDFIO is built on top of HDF4.1r2. An HDF5 extension to FlexIO called H5IO is now available as well. The programming interface allows complete interoperability with the HDF and NetCDF formats if those libraries are linked in. You can use HDF4, HDF5, and IEEEIO all intermixed together within the same application..

The API for writing HDF4 files is identical to that used by the IEEEIO interface except that the files are opened using a different subroutine/class in order to declare that the file is an HDF type. However, the same subroutine/destructor can be used to close the file regardless of what interface was used to open it. There are also some HDF4-specific methods in the FlexIO-HDFIO API which give you full access to HDF4/SDS-specific capabilities.

Opening Files using HDFIO

C++:
IObase *file = new HDFIO(char *filename, IObase::AccessMode mode);
C:
IOFile *file = HDFIOopen(char *filename,char *accessmode);
Fortran:
INTEGER*8 file = hdf_open(character filename(*),character accessmode(*))
The HDF/NetCDF interface to dimscales is also exposed using the methods isCoordVar() and getCoord(). This is only for situations where the dimscales must be manipulated directly rather than using the more generic method of storing this information as Attributes (C++| C| Fort). For the most part, you should stick with the methods defined in the Simple Unigrid Writer API in order to stay maximally compatable with visualization systems. It will do the correct thing with respect to dimscales without any special effort on the user's part.


API Information

The rest of the API is identical for IEEEIO, HDF4 and HDF5, so you can get documentation on the rest of the API from the following links.
  • Using the FlexIO API
    John Shalf
    Last modified: Tue Aug 31 16:23:03 CDT