# H5Part, Logical Internal HDF5 File Layout
Keywords: scientific visualization

# H5Part: Logical Internal HDF5 File Layout

HDF5 is extremely flexible in the sense that it allows the user to define a higher level data model to describe domain-specific data relationships. This flexibility however makes it necessary to develop an agreement on the logical layout of the data. The H5Part data model consists of Particle groups corresponding to the simulation time steps, each with seven datasets corresponding to x, px, y, py, z, pz, id for each particle. Attributes can be added to the file and to the datasets.

    HDF5 "parttest.h5" {
    GROUP "/" {
       GROUP "Particles#0" {
          DATASET "id" {
             DATATYPE  H5T_STD_I64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
          DATASET "px" {
             DATATYPE  H5T_IEEE_F64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
          DATASET "py" {
             DATATYPE  H5T_IEEE_F64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
          DATASET "pz" {
             DATATYPE  H5T_IEEE_F64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
          DATASET "x" {
             DATATYPE  H5T_IEEE_F64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
          DATASET "y" {
             DATATYPE  H5T_IEEE_F64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
          DATASET "z" {
             DATATYPE  H5T_IEEE_F64LE
             DATASPACE  SIMPLE { ( 10 ) / ( 10 ) }
          }
       }

See hdf5.pdf for an introduction on the use of HDF5.