dm_hdf5_open Interface

public interface dm_hdf5_open

Generic HDF5 open function.


Module Procedures

private function hdf5_open_file(file, path, mode, create) result(rc)

Opens HDF5 file, by default in read/write access mode, unless mode is passed. If create is .true., a new file will be created.

The function returns the following error codes:

  • E_EXIST if the file to create already exists.
  • E_HDF5 if opening or creating the file failed.
  • E_INVALID if the file is opened already or argument mode is invalid.
  • E_NOT_FOUND if the file was not found.

Arguments

Type IntentOptional Attributes Name
type(hdf5_file_type), intent(out) :: file

HDF5 file type.

character(len=*), intent(in) :: path

Path to HDF5 file.

integer, intent(in), optional :: mode

Open mode (HDF5_RDONLY or HDF5_RDWR).

logical, intent(in), optional :: create

Create HDF5 file.

Return Value integer

private function hdf5_open_group(id, group, name, create) result(rc)

Opens or creates group of name name. The function returns E_INVALID if the file is not opened, and E_HDF5 if the group operation failed.

Arguments

Type IntentOptional Attributes Name
class(hdf5_id_type), intent(inout) :: id

HDF5 file or group type.

type(hdf5_group_type), intent(out) :: group

HDF5 group type.

character(len=*), intent(in) :: name

Group name.

logical, intent(in), optional :: create

Create group.

Return Value integer