Skip to content

fccf/hdf5_interface

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Build status

Object-oriented Fortran 2018 HDF5 interface

Very simple single-file/module access to HDF5. More advanced object-oriented Fortran HDF5 access also available, but not compatible with HDF5 1.10 like this program.

Read/write integer / real32/64:

  • scalar
  • 1-D
  • 2-D
  • 3-D

via polymorphism.

Tested on systems including Mac OS X (via homebrew), Ubuntu 16.04/18.04 (gfortran ≥ 5.4.1) with HDF5 1.8 and 1.10 and Windows Subsystem for Linux.

Build

Requirements:

and then:

cd app
cmake ../src
make

make test

Usage

Here are a few examples. All of them assume:

use hdf5_interface, only: hdf5_file
type(hdf5_file) :: h5f

Create new HDF5 file, with variable "value1"

call h5f%initialize('test.h5',status='new',action='w')

call h5f%add('/value1', 123.)

call h5f%finalize()

Add variable "value1" to existing HDF5 file "test.h5"

call h5f%initialize('test.h5',status='old',action='rw')

call h5f%add('/value1', 123.)

call h5f%finalize()

About

high level fortran interface for HDF5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published