Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5 1.14.6.08405a5
API Reference
Loading...
Searching...
No Matches
Programming Issues

Navigate back: Main / Getting Started with HDF5 / Learning the Basics


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
  • Java routine names begin with “H5*” and are prefixed with “H5.” as the class. Constants are in the HDF5Constants class and are prefixed with "HDF5Constants.".:
    File Interface: H5.H5Fopen
    Dataset Interface: H5.H5Dopen
  • APIS for languages like C++, Java, and Python use methods associated with specific objects.

HDF5 library has its own defined types

  • 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

  • Python:
    import h5py
    import numpy
  • C:
    "#include hdf5.h"
  • FORTRAN:
    USE HDF5
    and call h5open_f and h5close_f to initialize and close the HDF5 FORTRAN interface
  • Java:
    import hdf.hdf5lib.H5;
    import hdf.hdf5lib.HDF5Constants;
See also
Examples by API for examples of using the HDF5 API.

Previous Chapter The HDF5 API - Next Chapter Creating an HDF5 File

Navigate back: Main / Getting Started with HDF5 / Learning the Basics