Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-03-23 The HDF5 Field Guide

Loading...
Searching...
No Matches
Fortran Identifier (H5I) Interface

## Detailed Description

See also
  Identifiers (H5I), C-API
  HDF5 Identifiers, User Guide

## Modules
module | h5i
| This module contains Fortran interfaces for H5I functions.

## Functions/Subroutines
subroutine | h5idec_ref_f (obj_id, ref_count, hdferr)
| Decrements the reference count of an ID.
subroutine | h5iget_file_id_f (obj_id, file_id, hdferr)
| Obtains file identifier from the object identifier.
subroutine | h5iget_name_f (obj_id, buf, buf_size, name_size, hdferr)
| Gets a name of an object specified by its identifier.
subroutine | h5iget_ref_f (obj_id, ref_count, hdferr)
| Retrieves the reference count of an ID.
subroutine | h5iget_type_f (obj_id, type, hdferr)
| Retrieves the type of an object.
subroutine | h5iinc_ref_f (obj_id, ref_count, hdferr)
| Increments the reference count of an ID.
subroutine | h5iis_valid_f (id, valid, hdferr)
| Check if an ID is valid without producing an error message.

## Variables
integer | h5i_attr_f
| H5I_ATTR.
integer | h5i_badid_f
| H5I_BADID.
integer | h5i_dataset_f
| H5I_DATASET.
integer | h5i_dataspace_f
| H5I_DATASPACE.
integer | h5i_datatype_f
| H5I_DATATYPE.
integer | h5i_error_class_f
| H5I_ERROR_CLASS.
integer | h5i_error_msg_f
| H5I_ERROR_MSG.
integer | h5i_error_stack_f
| H5I_ERROR_STACK.
integer | h5i_file_f
| H5I_FILE.
integer | h5i_genprop_cls_f
| H5I_GENPROP_CLS.
integer | h5i_genprop_lst_f
| H5I_GENPROP_LST.
integer | h5i_group_f
| H5I_GROUP.
integer | h5i_invalid_hid_f
| H5I_INVALID_HID.
integer | h5i_ntypes_f
| H5I_NTYPES.
integer | h5i_uninit_f
| H5I_UNINIT.
integer | h5i_vfl_f
| H5I_VFL.
integer | h5i_vol_f
| H5I_VOL.

## Function/Subroutine Documentation

## ◆ h5idec_ref_f()

subroutine h5idec_ref_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer, intent(out) | ref_count,
|  | integer, intent(out) | hdferr )

Decrements the reference count of an ID.

Parameters

  obj_id | Object identifier.
  ref_count | Current reference count of the ID.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Idec_ref()

## ◆ h5iget_file_id_f()

subroutine h5iget_file_id_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer(hid_t), intent(out) | file_id,
|  | integer, intent(out) | hdferr )

Obtains file identifier from the object identifier.

Parameters

  obj_id | Object identifier.
  file_id | File identifier.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Iget_file_id()

## ◆ h5iget_name_f()

subroutine h5iget_name_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(out) | buf,
|  | integer(size_t), intent(in) | buf_size,
|  | integer(size_t), intent(out) | name_size,
|  | integer, intent(out) | hdferr )

Gets a name of an object specified by its identifier.

Parameters

  obj_id | Attribute identifier.
  buf_size | Size of a buffer to read name in.
  buf | Buffer to read name in, name will be truncated if buffer is not big enough.
  name_size | Name size.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Iget_name()

## ◆ h5iget_ref_f()

subroutine h5iget_ref_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer, intent(out) | ref_count,
|  | integer, intent(out) | hdferr )

Retrieves the reference count of an ID.

Parameters

  obj_id | Object identifier.
  ref_count | Current reference count of the ID.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Iget_ref()

## ◆ h5iget_type_f()

subroutine h5iget_type_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer, intent(out) | type,
|  | integer, intent(out) | hdferr )

Retrieves the type of an object.

Parameters

  obj_id | Object identifier.
  type | Type of the object, possible values: H5I_FILE_F H5I_GROUP_F H5I_DATATYPE_F H5I_DATASPACE_F H5I_DATASET_F H5I_ATTR_F H5I_BADID_F
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Iget_type()

## ◆ h5iinc_ref_f()

subroutine h5iinc_ref_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer, intent(out) | ref_count,
|  | integer, intent(out) | hdferr )

Increments the reference count of an ID.

Parameters

  obj_id | Object identifier.
  ref_count | Current reference count of the ID.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Iinc_ref()

## ◆ h5iis_valid_f()

subroutine h5iis_valid_f | ( | integer(hid_t), intent(in) | id,
|  | logical, intent(out) | valid,
|  | integer, intent(out) | hdferr )

Check if an ID is valid without producing an error message.

Parameters

  id | Identifier.
  valid | Status of id as a valid identifier.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Iis_valid()

## Variable Documentation

## ◆ h5i_attr_f

integer h5i_attr_f

H5I_ATTR.

## ◆ h5i_badid_f

integer h5i_badid_f

H5I_BADID.

## ◆ h5i_dataset_f

integer h5i_dataset_f

H5I_DATASET.

## ◆ h5i_dataspace_f

integer h5i_dataspace_f

H5I_DATASPACE.

## ◆ h5i_datatype_f

integer h5i_datatype_f

H5I_DATATYPE.

## ◆ h5i_error_class_f

integer h5i_error_class_f

H5I_ERROR_CLASS.

## ◆ h5i_error_msg_f

integer h5i_error_msg_f

H5I_ERROR_MSG.

## ◆ h5i_error_stack_f

integer h5i_error_stack_f

H5I_ERROR_STACK.

## ◆ h5i_file_f

integer h5i_file_f

H5I_FILE.

## ◆ h5i_genprop_cls_f

integer h5i_genprop_cls_f

H5I_GENPROP_CLS.

## ◆ h5i_genprop_lst_f

integer h5i_genprop_lst_f

H5I_GENPROP_LST.

## ◆ h5i_group_f

integer h5i_group_f

H5I_GROUP.

## ◆ h5i_invalid_hid_f

integer h5i_invalid_hid_f

H5I_INVALID_HID.

## ◆ h5i_ntypes_f

integer h5i_ntypes_f

H5I_NTYPES.

## ◆ h5i_uninit_f

integer h5i_uninit_f

H5I_UNINIT.

## ◆ h5i_vfl_f

integer h5i_vfl_f

H5I_VFL.

## ◆ h5i_vol_f

integer h5i_vol_f

H5I_VOL.