read Submodule

This submodule is for reading HDF5 via submodules


Uses

    • hdf5
    • H5LT
  • module~~read~~UsesGraph module~read read module~h5fortran h5fortran module~read->module~h5fortran H5LT H5LT module~read->H5LT hdf5 hdf5 module~read->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~~read~~UsedByGraph module~read read module~reader_nd reader_ND module~reader_nd->module~read module~reader reader module~reader->module~read module~reader_lt reader_lt module~reader_lt->module~read

Contents


Functions

function get_native_dtype(ds_id, dname, filename) result(native_dtype)

get the dataset variable type the "type" and "native_type" are just IDs, the final native type is composed from: * enddianness * generic type we think endianness is handled by HDF5 ... ? compose datatype inferred

Arguments

Type IntentOptional AttributesName
integer(kind=hid_t), intent(in) :: ds_id
character(len=*), intent(in) :: dname
character(len=*), intent(in) :: filename

Return Value integer(kind=hid_t)


Module Procedures

module procedure hdf_get_ndims module function hdf_get_ndims(self, dname) result(drank)

get rank or "ndims"

Arguments

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

Return Value integer

module procedure hdf_get_shape module subroutine hdf_get_shape(self, dname, dims, ierr)

must get dims before info, as "dims" must be allocated or segfault occurs.

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

module procedure hdf_get_chunk 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(:)

module procedure hdf_get_layout module function hdf_get_layout(self, dname) result(layout)

Arguments

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

Return Value integer

module procedure hdf_check_exist module function hdf_check_exist(self, dname) result(exists)

h5lexists_f can false error with groups--just use h5ltpath_valid

Arguments

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

Return Value logical