HDF5 1.14.6.08405a5
API Reference
|
Navigate back: Main / Getting Started with HDF5 / Learning the Basics
We have shown how to create groups, datasets, and attributes. In this section, we show how to create datasets in groups. Recall that H5Dcreate creates a dataset at the location specified by a location identifier and a name. Similar to H5Gcreate, the location identifier can be a file identifier or a group identifier and the name can be relative or absolute. The location identifier and the name together determine the location where the dataset is to be created. If the location identifier and name refer to a group, then the dataset is created in that group.
See Examples from Learning the Basics for the examples used in the Learning the Basics tutorial.
The example shows how to create a dataset in a particular group. It opens the file created in the previous example and creates two datasets:
For details on compiling an HDF5 application: [ Compiling HDF5 Applications ]
Shown below is the contents and the definition of the group of groups.h5
(created by the C program). (The FORTRAN program creates the HDF5 file groupsf.h5
and the resulting DDL shows the filename groupsf.h5
in the first line.)
groups.h5 in DDL
groupsf.h5 in DDL
Previous Chapter Creating Groups using Absolute and Relative Names - Next Chapter Reading From or Writing To a Subset of a Dataset
Navigate back: Main / Getting Started with HDF5 / Learning the Basics