h5fortran Module

HDF5 object-oriented polymorphic interface


Uses

  • module~~h5fortran~~UsesGraph module~h5fortran h5fortran hdf5 hdf5 module~h5fortran->hdf5 iso_c_binding iso_c_binding module~h5fortran->iso_c_binding h5lt h5lt module~h5fortran->h5lt iso_fortran_env iso_fortran_env module~h5fortran->iso_fortran_env

Used by

  • module~~h5fortran~~UsedByGraph module~h5fortran h5fortran program~nonexistvar nonexistvar program~nonexistvar->module~h5fortran module~write write module~write->module~h5fortran program~exist_tests exist_tests program~exist_tests->module~h5fortran module~pathlib pathlib module~pathlib->module~h5fortran program~test_lt test_lt program~test_lt->module~h5fortran program~test_attributes test_attributes program~test_attributes->module~h5fortran program~scalar_test scalar_test program~scalar_test->module~h5fortran module~read read module~read->module~h5fortran program~test_destruct test_destruct program~test_destruct->module~h5fortran program~test_hdf5 test_hdf5 program~test_hdf5->module~h5fortran program~array_test array_test program~array_test->module~h5fortran program~fail_slice_mismatch fail_slice_mismatch program~fail_slice_mismatch->module~h5fortran program~fail_slice_mismatch~2 fail_slice_mismatch program~fail_slice_mismatch~2->module~h5fortran program~fail_unknown_read fail_unknown_read program~fail_unknown_read->module~h5fortran module~attributes attributes module~attributes->module~h5fortran program~test_deflate test_deflate program~test_deflate->module~h5fortran program~test_layout test_layout program~test_layout->module~h5fortran program~test_error test_error program~test_error->module~h5fortran program~test_string test_string program~test_string->module~h5fortran program~test_shape test_shape program~test_shape->module~h5fortran module~reader_lt reader_lt module~reader_lt->module~read module~writer writer module~writer->module~write module~reader_nd reader_ND module~reader_nd->module~read module~reader reader module~reader->module~read module~writer_lt writer_lt module~writer_lt->module~write module~writer_nd writer_ND module~writer_nd->module~write

Contents

h5write h5read h5write_attr h5read_attr is_absolute_path get_tempdir std_unlink hdf_create hdf_open_group hdf_close_group create_softlink h5exist lt0write_r32 lt0write_r64 lt0write_i32 lt0write_i64 lt0write_char lt1write_r32 lt1write_r64 lt1write_i32 lt1write_i64 lt2write_r32 lt2write_r64 lt2write_i32 lt2write_i64 lt3write_r32 lt3write_r64 lt3write_i32 lt3write_i64 lt4write_r32 lt4write_r64 lt4write_i32 lt4write_i64 lt5write_r32 lt5write_r64 lt5write_i32 lt5write_i64 lt6write_r32 lt6write_r64 lt6write_i32 lt6write_i64 lt7write_r32 lt7write_r64 lt7write_i32 lt7write_i64 lt0read lt1read lt2read lt3read lt4read lt5read lt6read lt7read hdf_write_scalar_r32 hdf_write_scalar_r64 hdf_write_scalar_i32 hdf_write_scalar_i64 hdf_write_scalar_char hdf_write_1d_r32 hdf_write_1d_r64 hdf_write_1d_i32 hdf_write_1d_i64 hdf_write_2d_r32 hdf_write_2d_r64 hdf_write_2d_i32 hdf_write_2d_i64 hdf_write_3d_r32 hdf_write_3d_r64 hdf_write_3d_i32 hdf_write_3d_i64 hdf_write_4d_r32 hdf_write_4d_r64 hdf_write_4d_i32 hdf_write_4d_i64 hdf_write_5d_r32 hdf_write_5d_r64 hdf_write_5d_i32 hdf_write_5d_i64 hdf_write_6d_r32 hdf_write_6d_r64 hdf_write_6d_i32 hdf_write_6d_i64 hdf_write_7d_r32 hdf_write_7d_r64 hdf_write_7d_i32 hdf_write_7d_i64 hdf_get_ndims hdf_get_layout hdf_check_exist hdf_get_shape hdf_get_chunk hdf_read_scalar hdf_read_1d hdf_read_2d hdf_read_3d hdf_read_4d hdf_read_5d hdf_read_6d hdf_read_7d readattr_char readattr_num writeattr_char writeattr_num writeattr_char_lt writeattr_num_lt readattr_char_lt readattr_num_lt

Interfaces

public interface h5write

public interface h5read

  • private interface lt0read()

    Arguments

    None
  • private interface lt1read()

    Arguments

    None
  • private interface lt2read()

    Arguments

    None
  • private interface lt3read()

    Arguments

    None
  • private interface lt4read()

    Arguments

    None
  • private interface lt5read()

    Arguments

    None
  • private interface lt6read()

    Arguments

    None
  • private interface lt7read()

    Arguments

    None

public interface h5write_attr

public interface h5read_attr

interface

Submodules

  • private module function is_absolute_path(path)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: path

    Return Value logical

interface

Submodules

  • private module function get_tempdir()

    Arguments

    None

    Return Value character(len=:), allocatable

interface

Submodules

  • private module subroutine std_unlink(filename)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename

interface

  • private module subroutine hdf_create(self, dname, dtype, dims, sid, did, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=HID_T), intent(in) :: dtype
    integer(kind=HSIZE_T), intent(in) :: dims(:)
    integer(kind=HID_T), intent(out), optional :: sid
    integer(kind=HID_T), intent(out), optional :: did
    integer, intent(in), optional :: chunk_size(:)
    integer, intent(in), optional :: istart(:)
    integer, intent(in), optional :: iend(:)
    integer, intent(in), optional :: stride(:)
    logical, intent(in), optional :: compact

    keep istart, iend, stride for future slice shape check

interface

  • private module subroutine hdf_open_group(self, gname, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: gname
    integer, intent(out), optional :: ierr

interface

  • private module subroutine hdf_close_group(self, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    integer, intent(out), optional :: ierr

interface

  • private module subroutine create_softlink(self, target, link)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: target
    character(len=*), intent(in) :: link

interface

  • public module function h5exist(filename, dname)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname

    Return Value logical

interface

  • private module subroutine lt0write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt0write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt0write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt0write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt0write_char(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: value
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt1write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt1write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt1write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt1write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt2write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt2write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt2write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt2write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt3write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt3write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt3write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt3write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt4write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt4write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt4write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt4write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt5write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt5write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt5write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt5write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt6write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt6write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt6write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt6write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt7write_r32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt7write_r64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt7write_i32(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt7write_i64(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt0read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt1read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt2read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt3read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt4read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt5read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt6read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine lt7read(filename, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine hdf_write_scalar_r32(self, dname, value, ierr, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value
    integer, intent(out), optional :: ierr
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_scalar_r64(self, dname, value, ierr, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value
    integer, intent(out), optional :: ierr
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_scalar_i32(self, dname, value, ierr, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value
    integer, intent(out), optional :: ierr
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_scalar_i64(self, dname, value, ierr, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value
    integer, intent(out), optional :: ierr
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_scalar_char(self, dname, value, ierr, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: value
    integer, intent(out), optional :: ierr
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_1d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(1)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_1d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(1)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_1d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(1)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_1d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(1)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_2d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(2)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_2d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(2)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_2d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(2)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_2d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(2)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_3d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(3)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_3d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(3)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_3d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(3)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_3d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(3)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_4d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(4)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_4d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(4)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_4d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(4)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_4d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(4)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_5d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(5)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_5d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(5)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_5d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(5)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_5d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(5)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_6d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(6)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_6d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(6)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_6d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(6)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_6d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(6)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_7d_r32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real32), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(7)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_7d_r64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    real(kind=real64), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(7)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_7d_i32(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int32), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(7)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module subroutine hdf_write_7d_i64(self, dname, value, ierr, chunk_size, istart, iend, stride, compact)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(inout) :: self
    character(len=*), intent(in) :: dname
    integer(kind=int64), intent(in) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional :: chunk_size(7)
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride
    logical, intent(in), optional :: compact

interface

  • private module function hdf_get_ndims(self, dname) result(drank)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname

    Return Value integer

interface

  • private module function hdf_get_layout(self, dname) result(layout)

    H5D_CONTIGUOUS_F, H5D_CHUNKED_F, H5D_VIRTUAL_F, H5D_COMPACT_F

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname

    Return Value integer

interface

  • private module function hdf_check_exist(self, dname) result(exists)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname

    Return Value logical

interface

  • private module subroutine hdf_get_shape(self, dname, dims, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    integer(kind=HSIZE_T), intent(out), allocatable:: dims(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine hdf_get_chunk(self, dname, chunk_size)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    integer(kind=hsize_t), intent(out) :: chunk_size(:)

interface

  • private module subroutine hdf_read_scalar(self, dname, value, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(inout) :: value

    intent(inout) for character

    integer, intent(out), optional :: ierr

interface

  • private module subroutine hdf_read_1d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine hdf_read_2d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine hdf_read_3d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine hdf_read_4d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine hdf_read_5d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine hdf_read_6d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine hdf_read_7d(self, dname, value, ierr, istart, iend, stride)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    class(*), intent(out) :: value(:,:,:,:,:,:,:)
    integer, intent(out), optional :: ierr
    integer, intent(in), optional dimension(:):: istart
    integer, intent(in), optional dimension(:):: iend
    integer, intent(in), optional dimension(:):: stride

interface

  • private module subroutine readattr_char(self, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    character(len=*), intent(inout) :: attrval

    intent(inout) for character

    integer, intent(out), optional :: ierr

interface

  • private module subroutine readattr_num(self, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    class(*), intent(out) :: attrval(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine writeattr_char(self, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    character(len=*), intent(in) :: attrval
    integer, intent(out), optional :: ierr

interface

  • private module subroutine writeattr_num(self, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    class(hdf5_file), intent(in) :: self
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    class(*), intent(in) :: attrval(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine writeattr_char_lt(filename, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    character(len=*), intent(in) :: attrval
    integer, intent(out), optional :: ierr

interface

  • private module subroutine writeattr_num_lt(filename, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    class(*), intent(in) :: attrval(:)
    integer, intent(out), optional :: ierr

interface

  • private module subroutine readattr_char_lt(filename, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    character(len=*), intent(inout) :: attrval

    intent(inout) for character

    integer, intent(out), optional :: ierr

interface

  • private module subroutine readattr_num_lt(filename, dname, attr, attrval, ierr)

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: filename
    character(len=*), intent(in) :: dname
    character(len=*), intent(in) :: attr
    class(*), intent(out) :: attrval(:)
    integer, intent(out), optional :: ierr

Derived Types

type, public :: hdf5_file

main type

Components

TypeVisibility AttributesNameInitial
character(len=:), public, allocatable:: filename
integer(kind=HID_T), public :: lid =0
integer(kind=HID_T), public :: gid
integer(kind=HID_T), public :: glid
integer, public :: comp_lvl =0
logical, public :: verbose =.true.
logical, public :: debug =.false.
logical, public :: is_open =.false.
logical, public :: is_scratch =.false.

will be auto-deleted on close

integer, public :: libversion(3)

Finalizations Procedures

final :: destructor

flush file to disk and close file if user forgets to do so.

Type-Bound Procedures

procedure, public :: softlink => create_softlink

define methods (procedures) that don't need generic procedure

procedure, public :: is_compact => hdf_is_compact
procedure, public :: is_chunked => hdf_is_chunked
procedure, public :: is_contig => hdf_is_contig
procedure, public :: exists => hdf_check_exist
procedure, public :: exist => hdf_check_exist
procedure, public :: chunks => hdf_get_chunk
procedure, public :: layout => hdf_get_layout
procedure, public :: shape => hdf_get_shape
procedure, public :: ndims => hdf_get_ndims
procedure, public :: flush => hdf_flush
procedure, public :: close_group => hdf_close_group
procedure, public :: open_group => hdf_open_group
procedure, public :: create => hdf_create
procedure, public :: write_group
procedure, public :: close => hdf_finalize
procedure, public :: finalize => hdf_finalize
procedure, public :: open => hdf_initialize
procedure, public :: initialize => hdf_initialize
generic, public :: write => hdf_write_scalar_r32, hdf_write_scalar_r64, hdf_write_scalar_i32, hdf_write_scalar_i64, hdf_write_scalar_char, hdf_write_1d_r32, hdf_write_1d_r64, hdf_write_1d_i32, hdf_write_1d_i64, hdf_write_2d_r32, hdf_write_2d_r64, hdf_write_2d_i32, hdf_write_2d_i64, hdf_write_3d_r32, hdf_write_3d_r64, hdf_write_3d_i32, hdf_write_3d_i64, hdf_write_4d_r32, hdf_write_4d_r64, hdf_write_4d_i32, hdf_write_4d_i64, hdf_write_5d_r32, hdf_write_5d_r64, hdf_write_5d_i32, hdf_write_5d_i64, hdf_write_6d_r32, hdf_write_6d_r64, hdf_write_6d_i32, hdf_write_6d_i64, hdf_write_7d_r32, hdf_write_7d_r64, hdf_write_7d_i32, hdf_write_7d_i64

below are procedure that need generic mapping (type or rank agnostic) write group or dataset integer/real

generic, public :: write_r32 => hdf_write_scalar_r32, hdf_write_1d_r32, hdf_write_2d_r32, hdf_write_3d_r32, hdf_write_4d_r32, hdf_write_5d_r32, hdf_write_6d_r32, hdf_write_7d_r32
generic, public :: write_r64 => hdf_write_scalar_r64, hdf_write_1d_r64, hdf_write_2d_r64, hdf_write_3d_r64, hdf_write_4d_r64, hdf_write_5d_r64, hdf_write_6d_r64, hdf_write_7d_r64
generic, public :: write_i32 => hdf_write_scalar_i32, hdf_write_1d_i32, hdf_write_2d_i32, hdf_write_3d_i32, hdf_write_4d_i32, hdf_write_5d_i32, hdf_write_6d_i32, hdf_write_7d_i32
generic, public :: write_i64 => hdf_write_scalar_i64, hdf_write_1d_i64, hdf_write_2d_i64, hdf_write_3d_i64, hdf_write_4d_i64, hdf_write_5d_i64, hdf_write_6d_i64, hdf_write_7d_i64
generic, public :: write_char => hdf_write_scalar_char
generic, public :: writeattr => writeattr_char, writeattr_num

write attributes

generic, public :: readattr => readattr_char, readattr_num

read attributes

generic, public :: read => hdf_read_scalar, hdf_read_1d, hdf_read_2d, hdf_read_3d, hdf_read_4d, hdf_read_5d, hdf_read_6d, hdf_read_7d

read dataset

procedure, private :: readattr_num

private methods each method must be declared here, and above as a generic, public

procedure, private :: readattr_char
procedure, private :: writeattr_num
procedure, private :: writeattr_char
procedure, private :: hdf_read_7d
procedure, private :: hdf_read_6d
procedure, private :: hdf_read_5d
procedure, private :: hdf_read_4d
procedure, private :: hdf_read_3d
procedure, private :: hdf_read_2d
procedure, private :: hdf_read_1d
procedure, private :: hdf_read_scalar
procedure, private :: hdf_write_7d_i64
procedure, private :: hdf_write_7d_i32
procedure, private :: hdf_write_7d_r64
procedure, private :: hdf_write_7d_r32
procedure, private :: hdf_write_6d_i64
procedure, private :: hdf_write_6d_i32
procedure, private :: hdf_write_6d_r64
procedure, private :: hdf_write_6d_r32
procedure, private :: hdf_write_5d_i64
procedure, private :: hdf_write_5d_i32
procedure, private :: hdf_write_5d_r64
procedure, private :: hdf_write_5d_r32
procedure, private :: hdf_write_4d_i64
procedure, private :: hdf_write_4d_i32
procedure, private :: hdf_write_4d_r64
procedure, private :: hdf_write_4d_r32
procedure, private :: hdf_write_3d_i64
procedure, private :: hdf_write_3d_i32
procedure, private :: hdf_write_3d_r64
procedure, private :: hdf_write_3d_r32
procedure, private :: hdf_write_2d_i64
procedure, private :: hdf_write_2d_i32
procedure, private :: hdf_write_2d_r64
procedure, private :: hdf_write_2d_r32
procedure, private :: hdf_write_1d_i64
procedure, private :: hdf_write_1d_i32
procedure, private :: hdf_write_1d_r64
procedure, private :: hdf_write_1d_r32
procedure, private :: hdf_write_scalar_char
procedure, private :: hdf_write_scalar_i64
procedure, private :: hdf_write_scalar_i32
procedure, private :: hdf_write_scalar_r64
procedure, private :: hdf_write_scalar_r32

Functions

private function hdf_is_contig(self, dname)

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
character(len=*), intent(in) :: dname

Return Value logical

private function hdf_is_compact(self, dname)

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
character(len=*), intent(in) :: dname

Return Value logical

private function hdf_is_chunked(self, dname)

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
character(len=*), intent(in) :: dname

Return Value logical

public function is_hdf5(filename)

is this file HDF5?

Read more…

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: filename

Return Value logical

public function check(ierr, filename, dname)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: ierr
character(len=*), intent(in), optional :: filename
character(len=*), intent(in), optional :: dname

Return Value logical


Subroutines

private subroutine hdf_initialize(self, filename, ierr, status, action, comp_lvl, verbose, debug)

Opens hdf5 file

Read more…

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(inout) :: self
character(len=*), intent(in) :: filename
integer, intent(out), optional :: ierr
character(len=*), intent(in), optional :: status
character(len=*), intent(in), optional :: action
integer, intent(in), optional :: comp_lvl
logical, intent(in), optional :: verbose
logical, intent(in), optional :: debug

private subroutine hdf_finalize(self, ierr, close_hdf5_interface)

This must be called on each HDF5 file to flush buffers to disk data loss can occur if program terminates before this procedure

Read more…

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(inout) :: self
integer, intent(out), optional :: ierr
logical, intent(in), optional :: close_hdf5_interface

private subroutine destructor(self)

Close file and handle if user forgets to do so

Arguments

Type IntentOptional AttributesName
type(hdf5_file), intent(inout) :: self

private subroutine hdf_flush(self, ierr)

request operating system flush data to disk. The operating system can do this when it desires, which might be a while.

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
integer, intent(out), optional :: ierr

public subroutine hdf5_close(ierr)

this subroutine will close ALL existing file handles only call it at end of your program "Flushes all data to disk, closes all open identifiers, and cleans up memory." "Should be called by all HDF5 Fortran programs"

Arguments

Type IntentOptional AttributesName
integer, intent(out), optional :: ierr

private subroutine write_group(self, gname, ierr)

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
character(len=*), intent(in) :: gname
integer, intent(out), optional :: ierr

public subroutine hdf_wrapup(did, sid, ierr)

Arguments

Type IntentOptional AttributesName
integer(kind=HID_T), intent(in) :: did
integer(kind=HID_T), intent(in) :: sid
integer, intent(out) :: ierr

public subroutine hdf_get_slice(self, dname, did, sid, mem_sid, i0, i1, i2)

setup array slices for read and write istart iend

Read more…

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
character(len=*), intent(in) :: dname
integer(kind=HID_T), intent(inout) :: did
integer(kind=hid_t), intent(out) :: sid
integer(kind=hid_t), intent(out) :: mem_sid
class(*), intent(in), dimension(:):: i0
class(*), intent(in), dimension(:):: i1
class(*), intent(in), optional dimension(:):: i2

public subroutine hdf_shape_check(self, dname, dims)

allow user to specify int4 or int8 dims check for matching rank, else bad reads can occur--doesn't always crash without this check check for matching size, else bad reads can occur.

Arguments

Type IntentOptional AttributesName
class(hdf5_file), intent(in) :: self
character(len=*), intent(in) :: dname
class(*), intent(in) :: dims(:)