Page tree

Keep the following in mind when looking at the example programs included in this tutorial:

APIs vary with different languages

  • C routines begin with the prefix “H5*” where * is a single letter indicating the object on which the operation is to be performed:
    File Interface:              H5Fopen
    Dataset Interface:       H5Dopen

  • FORTRAN routines begin with “h5*” and end with “_f”:
    File Interface:              h5fopen_f
    Dataset Interface:       h5dopen_f

  • APIS for languages like C++, Java, and Python use methods associated with specific objects.

HDF5 library has its own defined types

For portability, the HDF5 library has its own defined types.  Some common types that you will see in the example code are:

 hid_t is used for object handles

 hsize_t is used for dimensions

 herr_t is used for many return values

Language specific files must be included in applications

C:                     Add #include hdf5.h

FORTRAN:       Add USE HDF5 and  call h5open_f and h5close_f to initialize and close the HDF5 FORTRAN  interface

Python:            Add import h5py / import numpy

--- Last Modified: January 25, 2018 | 11:04 AM