Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5  1.14.1.2
API Reference
Fortran File (H5F) Interface

Detailed Description

See also
Files (H5F), C-API
The HDF5 File, User Guide

Functions/Subroutines

subroutine h5fcreate_f (name, access_flags, file_id, hdferr, creation_prp, access_prp)
 Creates HDF5 files. More...
 
subroutine h5fcreate_async_f (name, access_flags, file_id, es_id, hdferr, creation_prp, access_prp, file, func, line)
 Asynchronously creates HDF5 files. More...
 
subroutine h5fflush_f (object_id, scope, hdferr)
 Flushes all buffers associated with a file to disk. More...
 
subroutine h5fflush_async_f (object_id, scope, es_id, hdferr, file, func, line)
 Asynchronously flushes all buffers associated with a file to disk. More...
 
subroutine h5fmount_f (loc_id, name, child_id, hdferr, access_prp)
 Mounts a file. More...
 
subroutine h5funmount_f (loc_id, name, hdferr)
 Unmounts a file. More...
 
subroutine h5fopen_f (name, access_flags, file_id, hdferr, access_prp)
 Opens HDF5 file. More...
 
subroutine h5fopen_async_f (name, access_flags, file_id, es_id, hdferr, access_prp, file, func, line)
 Asynchronously opens HDF5 file. More...
 
subroutine h5freopen_f (file_id, ret_file_id, hdferr)
 Reopens HDF5 file. More...
 
subroutine h5freopen_async_f (file_id, ret_file_id, es_id, hdferr, file, func, line)
 Asynchronously reopens HDF5 file. More...
 
subroutine h5fget_create_plist_f (file_id, prop_id, hdferr)
 Returns a file creation property list identifier. More...
 
subroutine h5fget_access_plist_f (file_id, access_id, hdferr)
 Returns a file access property list identifier. More...
 
subroutine h5fis_accessible_f (name, status, hdferr, access_prp)
 Determines whether a file can be accessed as HDF5. More...
 
subroutine h5fis_hdf5_f (name, status, hdferr)
 Determines whether a file is in the HDF5 format. More...
 
subroutine h5fclose_f (file_id, hdferr)
 Closes HDF5 file. More...
 
subroutine h5fclose_async_f (file_id, es_id, hdferr, file, func, line)
 Asynchronously closes HDF5 file. More...
 
subroutine h5fget_obj_count_f (file_id, obj_type, obj_count, hdferr)
 Gets number of the objects open within a file. More...
 
subroutine h5fget_obj_ids_f (file_id, obj_type, max_objs, obj_ids, hdferr, num_objs)
 Get list of open objects identifiers within a file. More...
 
subroutine h5fget_freespace_f (file_id, free_space, hdferr)
 Get amount of free space within a file. More...
 
subroutine h5fget_name_f (obj_id, buf, size, hdferr)
 Gets the name of the file from the object identifier. More...
 
subroutine h5fget_filesize_f (file_id, size, hdferr)
 Retrieves the file size of the HDF5 file. More...
 
subroutine h5fget_fileno_f (file_id, fileno, hdferr)
 Retrieves the file number of the HDF5 file. More...
 
subroutine h5fget_file_image_f (file_id, buf_ptr, buf_len, hdferr, buf_size)
 Retrieves a copy of the image of an existing, open file. More...
 
subroutine h5fget_dset_no_attrs_hint_f (file_id, minimize, hdferr)
 Gets the value of the "minimize dataset headers" value which creates smaller dataset object headers when its set and no attributes are present. More...
 
subroutine h5fset_dset_no_attrs_hint_f (file_id, minimize, hdferr)
 Sets the value of the "minimize dataset headers" value which creates smaller dataset object headers when its set and no attributes are present. More...
 

Variables

integer h5f_acc_rdwr_f
 H5F_ACC_RDWR. More...
 
integer h5f_acc_rdonly_f
 H5F_ACC_RDONLY. More...
 
integer h5f_acc_trunc_f
 H5F_ACC_TRUNC. More...
 
integer h5f_acc_excl_f
 H5F_ACC_EXCL. More...
 
integer h5f_acc_debug_f
 H5F_ACC_DEBUG. More...
 
integer h5f_scope_local_f
 H5F_SCOPE_LOCAL. More...
 
integer h5f_scope_global_f
 H5F_SCOPE_GLOBAL. More...
 
integer h5f_close_default_f
 H5F_CLOSE_DEFAULT. More...
 
integer h5f_close_weak_f
 H5F_CLOSE_WEAK. More...
 
integer h5f_close_semi_f
 H5F_CLOSE_SEMI. More...
 
integer h5f_close_strong_f
 H5F_CLOSE_STRONG. More...
 
integer h5f_obj_file_f
 H5F_OBJ_FILE. More...
 
integer h5f_obj_dataset_f
 H5F_OBJ_DATASET. More...
 
integer h5f_obj_group_f
 H5F_OBJ_GROUP. More...
 
integer h5f_obj_datatype_f
 H5F_OBJ_DATATYPE. More...
 
integer h5f_obj_all_f
 H5F_OBJ_ALL. More...
 
integer h5f_libver_earliest_f
 H5F_LIBVER_EARLIEST. More...
 
integer h5f_libver_latest_f
 H5F_LIBVER_LATEST. More...
 
integer h5f_unlimited_f
 H5F_UNLIMITED. More...
 
integer h5f_libver_error_f
 H5F_LIBVER_ERROR. More...
 
integer h5f_libver_nbounds_f
 H5F_LIBVER_NBOUNDS. More...
 
integer h5f_libver_v18_f
 H5F_LIBVER_V18. More...
 
integer h5f_libver_v110_f
 H5F_LIBVER_V110. More...
 
integer h5f_libver_v112_f
 H5F_LIBVER_V112. More...
 
integer h5f_libver_v114_f
 H5F_LIBVER_V114. More...
 

Function/Subroutine Documentation

◆ h5fclose_async_f()

subroutine h5f::h5fclose_async_f ( integer(hid_t), intent(in)  file_id,
integer(hid_t), intent(in)  es_id,
integer, intent(out)  hdferr,
type(c_ptr), optional  file,
type(c_ptr), optional  func,
integer, intent(in), optional  line 
)

Asynchronously closes HDF5 file.

Parameters
file_idFile identifier
es_id

◆ h5fclose_f()

subroutine h5f::h5fclose_f ( integer(hid_t), intent(in)  file_id,
integer, intent(out)  hdferr 
)

Closes HDF5 file.

Parameters
file_idFile identifier.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fclose()

◆ h5fcreate_async_f()

subroutine h5f::h5fcreate_async_f ( character(len=*), intent(in)  name,
integer, intent(in)  access_flags,
integer(hid_t), intent(out)  file_id,
integer(hid_t), intent(in)  es_id,
integer, intent(out)  hdferr,
integer(hid_t), intent(in), optional  creation_prp,
integer(hid_t), intent(in), optional  access_prp,
type(c_ptr), optional  file,
type(c_ptr), optional  func,
integer, intent(in), optional  line 
)

Asynchronously creates HDF5 files.

Parameters
nameName of the file to create
access_flagsFile access flags. Allowable values are:
  • H5F_ACC_TRUNC_F
  • H5F_ACC_EXCL_F
file_idFile identifier
es_id

◆ h5fcreate_f()

subroutine h5f::h5fcreate_f ( character(len=*), intent(in)  name,
integer, intent(in)  access_flags,
integer(hid_t), intent(out)  file_id,
integer, intent(out)  hdferr,
integer(hid_t), intent(in), optional  creation_prp,
integer(hid_t), intent(in), optional  access_prp 
)

Creates HDF5 files.

Parameters
nameName of the file to create.
access_flagsFile access flags. Allowable values are:
  • H5F_ACC_TRUNC_F
  • H5F_ACC_EXCL_F
file_idFile identifier.
hdferrReturns 0 if successful and -1 if it fails.
creation_prpFile creation property list identifier.
access_prpFile access property list identifier.

See C API: H5Fcreate()

◆ h5fflush_async_f()

subroutine h5f::h5fflush_async_f ( integer(hid_t), intent(in)  object_id,
integer, intent(in)  scope,
integer(hid_t), intent(in)  es_id,
integer, intent(out)  hdferr,
type(c_ptr), optional  file,
type(c_ptr), optional  func,
integer, intent(in), optional  line 
)

Asynchronously flushes all buffers associated with a file to disk.

Parameters
object_idIdentifier of object used to identify the file.
scopeSpecifies the scope of the flushing action. Possible values are:
  • H5F_SCOPE_GLOBAL_F
  • H5F_SCOPE_LOCAL_F
es_id

◆ h5fflush_f()

subroutine h5f::h5fflush_f ( integer(hid_t), intent(in)  object_id,
integer, intent(in)  scope,
integer, intent(out)  hdferr 
)

Flushes all buffers associated with a file to disk.

Parameters
object_idIdentifier of object used to identify the file.
scopeSpecifies the scope of the flushing action. Possible values are:
  • H5F_SCOPE_GLOBAL_F
  • H5F_SCOPE_LOCAL_F
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fflush()

◆ h5fget_access_plist_f()

subroutine h5f::h5fget_access_plist_f ( integer(hid_t), intent(in)  file_id,
integer(hid_t), intent(out)  access_id,
integer, intent(out)  hdferr 
)

Returns a file access property list identifier.

Parameters
file_idIdentifier of a file to creation property list of.
access_idAccess property list identifier.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_access_plist()

◆ h5fget_create_plist_f()

subroutine h5f::h5fget_create_plist_f ( integer(hid_t), intent(in)  file_id,
integer(hid_t), intent(out)  prop_id,
integer, intent(out)  hdferr 
)

Returns a file creation property list identifier.

Parameters
file_idIdentifier of a file to creation property list of.
prop_idCreation property list identifier.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_create_plist()

◆ h5fget_dset_no_attrs_hint_f()

subroutine h5f::h5fget_dset_no_attrs_hint_f ( integer(hid_t), intent(in)  file_id,
logical, intent(out)  minimize,
integer, intent(out)  hdferr 
)

Gets the value of the "minimize dataset headers" value which creates smaller dataset object headers when its set and no attributes are present.

Parameters
file_idTarget file identifier.
minimizeValue of the setting.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_dset_no_attrs_hint()

◆ h5fget_file_image_f()

subroutine h5f::h5fget_file_image_f ( integer(hid_t), intent(in)  file_id,
type(c_ptr), intent(inout)  buf_ptr,
integer(size_t), intent(in)  buf_len,
integer, intent(out)  hdferr,
integer(size_t), intent(out), optional  buf_size 
)

Retrieves a copy of the image of an existing, open file.

Parameters
file_idTarget file identifier.
buf_ptrPointer to the buffer into which the image of the HDF5 file is to be copied.
buf_lenSize of the supplied buffer.
hdferrReturns 0 if successful and -1 if it fails.
buf_sizeReturns the size in bytes of the buffer required to store the file image, no data will be copied.

See C API: H5Fget_file_image()

◆ h5fget_fileno_f()

subroutine h5f::h5fget_fileno_f ( integer(hid_t), intent(in)  file_id,
integer, intent(out)  fileno,
integer, intent(out)  hdferr 
)

Retrieves the file number of the HDF5 file.

Parameters
file_idFile identifier.
filenoFile number.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_fileno()

◆ h5fget_filesize_f()

subroutine h5f::h5fget_filesize_f ( integer(hid_t), intent(in)  file_id,
integer(hsize_t), intent(out)  size,
integer, intent(out)  hdferr 
)

Retrieves the file size of the HDF5 file.

Parameters
file_idFile identifier.
sizeFile size.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_filesize()

◆ h5fget_freespace_f()

subroutine h5f::h5fget_freespace_f ( integer(hid_t), intent(in)  file_id,
integer(hssize_t), intent(out)  free_space,
integer, intent(out)  hdferr 
)

Get amount of free space within a file.

Parameters
file_idFile identifier.
free_spaceAmount of free space in file.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_freespace()

◆ h5fget_name_f()

subroutine h5f::h5fget_name_f ( integer(hid_t), intent(in)  obj_id,
character(len=*), intent(out)  buf,
integer(size_t), intent(out)  size,
integer, intent(out)  hdferr 
)

Gets the name of the file from the object identifier.

Parameters
obj_idObject identifier.
bufBuffer to store the read name.
sizeActual size of the name.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_name()

◆ h5fget_obj_count_f()

subroutine h5f::h5fget_obj_count_f ( integer(hid_t), intent(in)  file_id,
integer, intent(in)  obj_type,
integer(size_t), intent(out)  obj_count,
integer, intent(out)  hdferr 
)

Gets number of the objects open within a file.

Parameters
file_idFile identifier.
obj_typeType of the object; possible values are:
  • H5F_OBJ_FILE_F
  • H5F_OBJ_DATASET_F
  • H5F_OBJ_GROUP_F
  • H5F_OBJ_DATATYPE_F
  • H5F_OBJ_ALL_F
obj_countNumber of open objects.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fget_obj_count()

◆ h5fget_obj_ids_f()

subroutine h5f::h5fget_obj_ids_f ( integer(hid_t), intent(in)  file_id,
integer, intent(in)  obj_type,
integer(size_t), intent(in)  max_objs,
integer(hid_t), dimension(*), intent(inout)  obj_ids,
integer, intent(out)  hdferr,
integer(size_t), intent(out), optional  num_objs 
)

Get list of open objects identifiers within a file.

Parameters
file_idFile identifier.
obj_typeType of the object; possible values are:
  • H5F_OBJ_FILE_F
  • H5F_OBJ_DATASET_F
  • H5F_OBJ_GROUP_F
  • H5F_OBJ_DATATYPE_F
  • H5F_OBJ_ALL_F
max_objsMaximum # of objects to retrieve.
obj_idsArray of open object identifiers.
hdferrReturns 0 if successful and -1 if it fails.
num_objsNumber of open objects.

See C API: H5Fget_obj_ids()

◆ h5fis_accessible_f()

subroutine h5f::h5fis_accessible_f ( character(len=*), intent(in)  name,
logical, intent(out)  status,
integer, intent(out)  hdferr,
integer(hid_t), intent(in), optional  access_prp 
)

Determines whether a file can be accessed as HDF5.

Parameters
nameName of the file to check.
statusIndicates if file is and HDF5 file.
hdferrReturns 0 if successful and -1 if it fails.
access_prpFile access property list identifier.

See C API: H5Fis_accessible()

◆ h5fis_hdf5_f()

subroutine h5f::h5fis_hdf5_f ( character(len=*), intent(in)  name,
logical, intent(out)  status,
integer, intent(out)  hdferr 
)

Determines whether a file is in the HDF5 format.

Parameters
nameName of the file to check.
statusIndicates if file is and HDF5 file.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fis_hdf5()

◆ h5fmount_f()

subroutine h5f::h5fmount_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  name,
integer(hid_t), intent(in)  child_id,
integer, intent(out)  hdferr,
integer(hid_t), intent(in), optional  access_prp 
)

Mounts a file.

Parameters
loc_idThe identifier for of file or group in which name is defined.
nameThe name of the group onto which the file specified by child_id is to be mounted.
child_idThe identifier of the file to be mounted.
hdferrReturns 0 if successful and -1 if it fails.
access_prpThe identifier of the property list to be used.

See C API: H5Fmount()

◆ h5fopen_async_f()

subroutine h5f::h5fopen_async_f ( character(len=*), intent(in)  name,
integer, intent(in)  access_flags,
integer(hid_t), intent(out)  file_id,
integer(hid_t), intent(in)  es_id,
integer, intent(out)  hdferr,
integer(hid_t), intent(in), optional  access_prp,
type(c_ptr), optional  file,
type(c_ptr), optional  func,
integer, intent(in), optional  line 
)

Asynchronously opens HDF5 file.

Parameters
nameName of the file to acecss.
access_flagsFile access flags. Allowable values are:
  • H5F_ACC_RDWR_F
  • H5F_ACC_RDONLY_F
file_idFile identifier
es_id

◆ h5fopen_f()

subroutine h5f::h5fopen_f ( character(len=*), intent(in)  name,
integer, intent(in)  access_flags,
integer(hid_t), intent(out)  file_id,
integer, intent(out)  hdferr,
integer(hid_t), intent(in), optional  access_prp 
)

Opens HDF5 file.

Parameters
nameName of the file to acecss.
access_flagsFile access flags. Allowable values are:
  • H5F_ACC_RDWR_F
  • H5F_ACC_RDONLY_F
file_idFile identifier.
hdferrReturns 0 if successful and -1 if it fails.
access_prpFile access property list identifier.

See C API: H5Fopen()

◆ h5freopen_async_f()

subroutine h5f::h5freopen_async_f ( integer(hid_t), intent(in)  file_id,
integer(hid_t), intent(out)  ret_file_id,
integer(hid_t), intent(in)  es_id,
integer, intent(out)  hdferr,
type(c_ptr), optional  file,
type(c_ptr), optional  func,
integer, intent(in), optional  line 
)

Asynchronously reopens HDF5 file.

Parameters
file_idIdentifier of a file for which an additional identifier is required.
ret_file_idNew file identifier.
es_id

◆ h5freopen_f()

subroutine h5f::h5freopen_f ( integer(hid_t), intent(in)  file_id,
integer(hid_t), intent(out)  ret_file_id,
integer, intent(out)  hdferr 
)

Reopens HDF5 file.

Parameters
file_idIdentifier of a file for which an additional identifier is required.
ret_file_idNew file identifier.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Freopen()

◆ h5fset_dset_no_attrs_hint_f()

subroutine h5f::h5fset_dset_no_attrs_hint_f ( integer(hid_t), intent(in)  file_id,
logical, intent(in)  minimize,
integer, intent(out)  hdferr 
)

Sets the value of the "minimize dataset headers" value which creates smaller dataset object headers when its set and no attributes are present.

Parameters
file_idTarget file identifier.
minimizeValue of the setting.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Fset_dset_no_attrs_hint()

◆ h5funmount_f()

subroutine h5f::h5funmount_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  name,
integer, intent(out)  hdferr 
)

Unmounts a file.

Parameters
loc_idThe identifier for of file or group in which name is defined.
nameThe name of the mount point.
hdferrReturns 0 if successful and -1 if it fails.

See C API: H5Funmount()

Variable Documentation

◆ h5f_acc_debug_f

integer h5f_acc_debug_f

H5F_ACC_DEBUG.

◆ h5f_acc_excl_f

integer h5f_acc_excl_f

H5F_ACC_EXCL.

◆ h5f_acc_rdonly_f

integer h5f_acc_rdonly_f

H5F_ACC_RDONLY.

◆ h5f_acc_rdwr_f

integer h5f_acc_rdwr_f

H5F_ACC_RDWR.

◆ h5f_acc_trunc_f

integer h5f_acc_trunc_f

H5F_ACC_TRUNC.

◆ h5f_close_default_f

integer h5f_close_default_f

H5F_CLOSE_DEFAULT.

◆ h5f_close_semi_f

integer h5f_close_semi_f

H5F_CLOSE_SEMI.

◆ h5f_close_strong_f

integer h5f_close_strong_f

H5F_CLOSE_STRONG.

◆ h5f_close_weak_f

integer h5f_close_weak_f

H5F_CLOSE_WEAK.

◆ h5f_libver_earliest_f

integer h5f_libver_earliest_f

H5F_LIBVER_EARLIEST.

◆ h5f_libver_error_f

integer h5f_libver_error_f

H5F_LIBVER_ERROR.

◆ h5f_libver_latest_f

integer h5f_libver_latest_f

H5F_LIBVER_LATEST.

◆ h5f_libver_nbounds_f

integer h5f_libver_nbounds_f

H5F_LIBVER_NBOUNDS.

◆ h5f_libver_v110_f

integer h5f_libver_v110_f

H5F_LIBVER_V110.

◆ h5f_libver_v112_f

integer h5f_libver_v112_f

H5F_LIBVER_V112.

◆ h5f_libver_v114_f

integer h5f_libver_v114_f

H5F_LIBVER_V114.

◆ h5f_libver_v18_f

integer h5f_libver_v18_f

H5F_LIBVER_V18.

◆ h5f_obj_all_f

integer h5f_obj_all_f

H5F_OBJ_ALL.

◆ h5f_obj_dataset_f

integer h5f_obj_dataset_f

H5F_OBJ_DATASET.

◆ h5f_obj_datatype_f

integer h5f_obj_datatype_f

H5F_OBJ_DATATYPE.

◆ h5f_obj_file_f

integer h5f_obj_file_f

H5F_OBJ_FILE.

◆ h5f_obj_group_f

integer h5f_obj_group_f

H5F_OBJ_GROUP.

◆ h5f_scope_global_f

integer h5f_scope_global_f

H5F_SCOPE_GLOBAL.

◆ h5f_scope_local_f

integer h5f_scope_local_f

H5F_SCOPE_LOCAL.

◆ h5f_unlimited_f

integer h5f_unlimited_f

H5F_UNLIMITED.