The HDF5 Tutorial was created to help users quickly learn the basics of using HDF5.
HDF5 is a file format and library for storing scientific data. See the What is HDF5? page for information on what it is and why it was created.
The HDF5 Tutorial is written for use with C and Fortran 90. Example programs are included, but the HDF5 libraries are not. To compile and use the examples with this tutorial, you can:
- Obtain the source code and build it or use the pre-compiled binaries
that we provide. The HDF5 software can be obtained from the following
page:
http://www.hdfgroup.org/HDF5/release/obtain5.html - Compile the examples using the compile scripts that we provide in
the
bin/directory of the binaries. The following scripts are provided:h5cc(C),h5c++(C++), andh5fc(F90)
Information on using these scripts can be found on the following page:http://www.hdfgroup.org/training/compile5/
HDF5 also includes a C++ and Java interface, but these interfaces are not discussed in this tutorial. For examples of using C++, please refer to the HDF5 source code and binaries. For examples of using the Java APIs see the HDF Java tutorial at:
http://www.hdfgroup.org/hdf-java-html/hdf-object/use.html
The HDF5 Tutorial includes the following topics:
- Introductory:
- This section covers the basic HDF5 data
objects and file structure, the HDF5 programming model, and the
API functions necessary for creating and modifying data objects.
Also introduced are the available HDF5 tools for accessing HDF5 files.
The topics are intended to be completed in order.
The high level HDF5 Lite API simplifies many of the steps needed to create HDF5 Files and objects and can be viewed in conjunction with these introductory topics.
- Advanced:
- This section requires a basic understanding
of HDF5. The topics can be viewed in any order:
- » Datatypes are described more in depth, defining pre-defined vs. derived, and native vs. standard types. Also described are compound and reference datatypes.
- » Property lists are described: the different types (File Creation, File Access, Dataset Creation, and Data Access/Transfer), and how they are used.
- » The Hyperslab Selection and Point Selection topics show how to do partial I/O.
- » The Extendible Datasets topic describes how to create an unlimited dimension dataset.
- » The Mounting Files topic covers how to open and mount an HDF5 file into another HDF5 file.
- » Group Iteration covers how to go through an HDF5 file, accessing and discovering all objects in the file.
- » The File Drivers topic is a brief description of what a File Driver is and how to use property lists with them.
-
The parallel tutorial describes Parallel HDF5
design, using MPI with HDF5, accessing HDF5 files, using collective
vs. independent I/O, and different ways of doing partial I/O.
-
These APIs are written on top of HDF5, and
they simplify the steps and provide templates for creating simple objects,
images and tables (compound datatypes), as well as dimension scales and
packets.
We hope that the step-by-step examples and instructions are useful.
Please send your comments and suggestions to the helpdesk.
- - Last modified:January 08th 2008
