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

| HDF5 Last Updated on 2026-07-28 The HDF5 Field Guide

Loading...
Searching...
No Matches
Fortran Attribute (H5A) Interface

## Detailed Description

See also
  Attributes (H5A), C-API
  HDF5 Attributes, User Guide

## Modules
module | h5a
| This module contains Fortran interfaces for H5A functions.

## Functions/Subroutines
subroutine | h5aclose_async_f (attr_id, es_id, hdferr, file, func, line)
| Asynchronously closes the specified attribute.
subroutine | h5aclose_f (attr_id, hdferr)
| Closes the specified attribute.
subroutine | h5acreate_async_f (loc_id, name, type_id, space_id, attr_id, es_id, hdferr, acpl_id, aapl_id, file, func, line)
| Asynchronously creates a dataset as an attribute of a group, dataset, or named datatype.
subroutine | h5acreate_by_name_async_f (loc_id, obj_name, attr_name, type_id, space_id, attr, es_id, hdferr, acpl_id, aapl_id, lapl_id, file, func, line)
| Asynchronously creates an attribute attached to a specified object.
subroutine | h5acreate_by_name_f (loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, acpl_id, aapl_id, lapl_id)
| Creates an attribute attached to a specified object.
subroutine | h5acreate_f (loc_id, name, type_id, space_id, attr_id, hdferr, acpl_id, aapl_id)
| Creates a dataset as an attribute of a group, dataset, or named datatype.
subroutine | h5adelete_by_idx_f (loc_id, obj_name, idx_type, order, n, hdferr, lapl_id)
| Deletes an attribute from an object according to index order.
subroutine | h5adelete_by_name_f (loc_id, obj_name, attr_name, hdferr, lapl_id)
| Removes an attribute from a specified location.
subroutine | h5adelete_f (obj_id, name, hdferr)
| Deletes an attribute of an object (group, dataset or named datatype).
subroutine | h5aexists_async_f (obj_id, attr_name, attr_exists, es_id, hdferr, file, func, line)
| Asynchronously determines whether an attribute with a given name exists on an object.
subroutine | h5aexists_by_name_async_f (loc_id, obj_name, attr_name, attr_exists, es_id, hdferr, lapl_id, file, func, line)
| Asynchronously determines whether an attribute with a given name exists on an object.
subroutine | h5aexists_by_name_f (loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id)
| Determines whether an attribute with a given name exists on an object.
subroutine | h5aexists_f (obj_id, attr_name, attr_exists, hdferr)
| Determines whether an attribute with a given name exists on an object.
subroutine | h5aget_create_plist_f (attr_id, creation_prop_id, hdferr)
| Gets an attribute creation property list identifier.
subroutine | h5aget_info_by_idx_f (loc_id, obj_name, idx_type, order, n, f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
| Retrieves attribute information by attribute index position.
subroutine | h5aget_info_by_name_f (loc_id, obj_name, attr_name, f_corder_valid, corder, cset, data_size, hdferr, lapl_id)
| Retrieves attribute information, by attribute name.
subroutine | h5aget_info_f (attr_id, f_corder_valid, corder, cset, data_size, hdferr)
| Retrieves attribute information, by attribute identifier.
subroutine | h5aget_name_by_idx_f (loc_id, obj_name, idx_type, order, n, name, hdferr, size, lapl_id)
| Gets an attribute name, by attribute index position.
subroutine | h5aget_name_f (attr_id, size, buf, hdferr)
| Gets an attribute name.
subroutine | h5aget_num_attrs_f (obj_id, attr_num, hdferr)
| Determines the number of attributes attached to an object.
subroutine | h5aget_space_f (attr_id, space_id, hdferr)
| Gets a copy of the dataspace for an attribute.
subroutine | h5aget_storage_size_f (attr_id, size, hdferr)
| Returns the amount of storage required for an attribute.
subroutine | h5aget_type_f (attr_id, type_id, hdferr)
| Gets an attribute datatype.
subroutine | h5aopen_async_f (obj_id, attr_name, attr_id, es_id, hdferr, aapl_id, file, func, line)
| Asynchronously opens an attribute for an object specified by object identifier and attribute name.
subroutine | h5aopen_by_idx_async_f (loc_id, obj_name, idx_type, order, n, attr_id, es_id, hdferr, aapl_id, lapl_id, file, func, line)
| Asynchronously opens an existing attribute that is attached to an object specified by location and name.
subroutine | h5aopen_by_idx_f (loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id)
| Opens an existing attribute that is attached to an object specified by location and name.
subroutine | h5aopen_by_name_async_f (loc_id, obj_name, attr_name, attr_id, es_id, hdferr, aapl_id, lapl_id, file, func, line)
| Asynchronously opens an attribute for an object by object name and attribute name.
subroutine | h5aopen_by_name_f (loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id)
| Opens an attribute for an object by object name and attribute name.
subroutine | h5aopen_f (obj_id, attr_name, attr_id, hdferr, aapl_id)
| Opens an attribute for an object specified by object identifier and attribute name.
subroutine | h5aopen_idx_f (obj_id, index, attr_id, hdferr)
| Opens the attribute specified by its index.
subroutine | h5aopen_name_f (obj_id, name, attr_id, hdferr)
| Opens an attribute specified by name.
subroutine | h5aread_async_f (attr_id, memtype_id, buf, es_id, hdferr, file, func, line)
| Asynchronously reads an attribute.
subroutine | h5aread_f (attr_id, memtype_id, buf, dims, hdferr)
| Reads an attribute.
subroutine | h5aread_f (attr_id, memtype_id, buf, hdferr)
| Reads an attribute.
subroutine | h5arename_async_f (loc_id, old_attr_name, new_attr_name, es_id, hdferr, file, func, line)
| Asynchronously renames an attribute.
subroutine | h5arename_by_name_async_f (loc_id, obj_name, old_attr_name, new_attr_name, es_id, hdferr, lapl_id, file, func, line)
| Asynchronously renames an attribute.
subroutine | h5arename_by_name_f (loc_id, obj_name, old_attr_name, new_attr_name, hdferr, lapl_id)
| Renames an attribute.
subroutine | h5arename_f (loc_id, old_attr_name, new_attr_name, hdferr)
| Renames an attribute.
subroutine | h5awrite_async_f (attr_id, memtype_id, buf, es_id, hdferr, file, func, line)
| Asynchronously writes an attribute.
subroutine | h5awrite_f (attr_id, memtype_id, buf, dims, hdferr)
| Writes data to an attribute.
subroutine | h5awrite_f (attr_id, memtype_id, buf, hdferr)
| Writes data to an attribute.

## Function/Subroutine Documentation

## ◆ h5aclose_async_f()

subroutine h5aclose_async_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously closes the specified attribute.

Parameters

  attr_id | Attribute identifier
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aclose_async()

## ◆ h5aclose_f()

subroutine h5aclose_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer, intent(out) | hdferr )

Closes the specified attribute.

Parameters

  attr_id | Attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aclose()

## ◆ h5acreate_async_f()

subroutine h5acreate_async_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | name,
|  | integer(hid_t), intent(in) | type_id,
|  | integer(hid_t), intent(in) | space_id,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | acpl_id,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously creates a dataset as an attribute of a group, dataset, or named datatype.

Parameters

  loc_id | Identifier of an object (group, dataset, or named datatype) attribute is attached to
  name | Attribute name
  type_id | Attribute datatype identifier
  space_id | Attribute dataspace identifier
  attr_id | Attribute identifier
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  acpl_id | Attribute creation property list identifier
  aapl_id | Attribute access property list identifier
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Acreate_async()

## ◆ h5acreate_by_name_async_f()

subroutine h5acreate_by_name_async_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | integer(hid_t), intent(in) | type_id,
|  | integer(hid_t), intent(in) | space_id,
|  | integer(hid_t), intent(out) | attr,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | acpl_id,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | integer(hid_t), intent(in), optional | lapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously creates an attribute attached to a specified object.

Parameters

  loc_id | Location or object identifier; may be dataset or group
  obj_name | Name, relative to loc_id, of object that attribute is to be attached to
  attr_name | Attribute name
  type_id | Attribute datatype identifier
  space_id | Attribute dataspace identifier
  attr | An attribute identifier
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  acpl_id | Attribute creation property list identifier (Currently not used.)
  aapl_id | Attribute access property list identifier (Currently not used.)
  lapl_id | Link access property list
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Acreate_by_name_async()

## ◆ h5acreate_by_name_f()

subroutine h5acreate_by_name_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | integer(hid_t), intent(in) | type_id,
|  | integer(hid_t), intent(in) | space_id,
|  | integer(hid_t), intent(out) | attr,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | acpl_id,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | integer(hid_t), intent(in), optional | lapl_id )

Creates an attribute attached to a specified object.

Parameters

  loc_id | Location or object identifier; may be dataset or group
  obj_name | Name, relative to loc_id, of object that attribute is to be attached to
  attr_name | Attribute name
  type_id | Attribute datatype identifier
  space_id | Attribute dataspace identifier
  attr | An attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  acpl_id | Attribute creation property list identifier (Currently not used.)
  aapl_id | Attribute access property list identifier (Currently not used.)
  lapl_id | Link access property list

See C API: H5Acreate_by_name()

## ◆ h5acreate_f()

subroutine h5acreate_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | name,
|  | integer(hid_t), intent(in) | type_id,
|  | integer(hid_t), intent(in) | space_id,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | acpl_id,
|  | integer(hid_t), intent(in), optional | aapl_id )

Creates a dataset as an attribute of a group, dataset, or named datatype.

Parameters

  loc_id | Identifier of an object (group, dataset, or named datatype) attribute is attached to
  name | Attribute name
  type_id | Attribute datatype identifier
  space_id | Attribute dataspace identifier
  attr_id | Attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  acpl_id | Attribute creation property list identifier
  aapl_id | Attribute access property list identifier

See C API: H5Acreate2()

## ◆ h5adelete_by_idx_f()

subroutine h5adelete_by_idx_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | integer, intent(in) | idx_type,
|  | integer, intent(in) | order,
|  | integer(hsize_t), intent(in) | n,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id )

Deletes an attribute from an object according to index order.

Parameters

  loc_id | Location or object identifier; may be dataset or group or named datatype
  obj_name | Name of object, relative to location, from which attribute is to be removed
  idx_type | Type of index; Possible values are: H5_INDEX_UNKNOWN_F = -1 - Unknown index type H5_INDEX_NAME_F - Index on names H5_INDEX_CRT_ORDER_F - Index on creation order H5_INDEX_N_F - Number of indices defined
  order | Order in which to iterate over index; Possible values are: H5_ITER_UNKNOWN_F - Unknown order H5_ITER_INC_F - Increasing order H5_ITER_DEC_F - Decreasing order H5_ITER_NATIVE_F - No particular order, whatever is fastest H5_ITER_N_F - Number of iteration orders
  n | Offset within index
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list

See C API: H5Adelete_by_idx()

## ◆ h5adelete_by_name_f()

subroutine h5adelete_by_name_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id )

Removes an attribute from a specified location.

Parameters

  loc_id | Identifier for object to which attribute is attached
  obj_name | Name of attribute to open
  attr_name | Attribute access property list
  lapl_id | Link access property list
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Adelete_by_name()

## ◆ h5adelete_f()

subroutine h5adelete_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(in) | name,
|  | integer, intent(out) | hdferr )

Deletes an attribute of an object (group, dataset or named datatype).

Parameters

  obj_id | Object identifier
  name | Attribute name
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Adelete()

## ◆ h5aexists_async_f()

subroutine h5aexists_async_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(in) | attr_name,
|  | type(c_ptr), intent(in) | attr_exists,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously determines whether an attribute with a given name exists on an object.

Parameters

  obj_id | Object identifier
  attr_name | Attribute name
  attr_exists | Pointer to attribute exists status. It should be declared INTEGER(C_INT) and initialized to zero (false) for portability. It will return one when true. LOGICAL(C_BOOL) is also acceptable but may encounter atypical anomalies. It should be initialized to false when used.
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aexists_async()

## ◆ h5aexists_by_name_async_f()

subroutine h5aexists_by_name_async_f | ( | integer (hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | type(c_ptr), intent(in) | attr_exists,
|  | integer (hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer (hid_t), intent(in), optional | lapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously determines whether an attribute with a given name exists on an object.

Parameters

  loc_id | Location identifier
  obj_name | Object name either relative to loc_id, absolute from the file's root group, or '. '(a dot)
  attr_name | Attribute name
  attr_exists | Pointer to attribute exists status, must be of type LOGICAL(C_BOOL) and initialize to .FALSE.
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list identifier
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aexists_by_name_async()

## ◆ h5aexists_by_name_f()

subroutine h5aexists_by_name_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | logical, intent(out) | attr_exists,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id )

Determines whether an attribute with a given name exists on an object.

Parameters

  loc_id | Location identifier
  obj_name | Object name either relative to loc_id, absolute from the file's root group, or '. '(a dot)
  attr_name | Attribute name
  attr_exists | Attribute exists status
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list identifier

See C API: H5Aexists_by_name()

## ◆ h5aexists_f()

subroutine h5aexists_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(in) | attr_name,
|  | logical, intent(out) | attr_exists,
|  | integer, intent(out) | hdferr )

Determines whether an attribute with a given name exists on an object.

Parameters

  obj_id | Object identifier
  attr_name | Attribute name
  attr_exists | Attribute exists status
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aexists()

## ◆ h5aget_create_plist_f()

subroutine h5aget_create_plist_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(out) | creation_prop_id,
|  | integer, intent(out) | hdferr )

Gets an attribute creation property list identifier.

Parameters

  attr_id | Identifier of the attribute
  creation_prop_id | Identifier for the attribute's creation property
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_create_plist()

## ◆ h5aget_info_by_idx_f()

subroutine h5aget_info_by_idx_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | integer, intent(in) | idx_type,
|  | integer, intent(in) | order,
|  | integer(hsize_t), intent(in) | n,
|  | logical, intent(out) | f_corder_valid,
|  | integer, intent(out) | corder,
|  | integer, intent(out) | cset,
|  | integer(hsize_t), intent(out) | data_size,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id )

Retrieves attribute information by attribute index position.

Parameters

  loc_id | Location of object to which attribute is attached
  obj_name | Name of object to which attribute is attached, relative to location
  idx_type | Type of index
  order | Index traversal order
  n | Attribute's position in index
  f_corder_valid | Indicates whether the creation order data is valid for this attribute
  corder | Is a positive integer containing the creation order of the attribute
  cset | Indicates the character set used for the attribute's name
  data_size | Indicates the size, in the number of characters, of the attribute
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list

See C API: H5Aget_info_by_idx()

## ◆ h5aget_info_by_name_f()

subroutine h5aget_info_by_name_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | logical, intent(out) | f_corder_valid,
|  | integer, intent(out) | corder,
|  | integer, intent(out) | cset,
|  | integer(hsize_t), intent(out) | data_size,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id )

Retrieves attribute information, by attribute name.

Parameters

  loc_id | Location of object to which attribute is attached
  obj_name | Name of object to which attribute is attached, relative to location
  attr_name | Attribute name
  f_corder_valid | Indicates whether the creation order data is valid for this attribute
  corder | Is a positive integer containing the creation order of the attribute
  cset | Indicates the character set used for the attribute's name
  data_size | Indicates the size, in the number of characters, of the attribute
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list

See C API: H5Aget_info_by_name()

## ◆ h5aget_info_f()

subroutine h5aget_info_f | ( | integer(hid_t), intent(in) | attr_id,
|  | logical, intent(out) | f_corder_valid,
|  | integer, intent(out) | corder,
|  | integer, intent(out) | cset,
|  | integer(hsize_t), intent(out) | data_size,
|  | integer, intent(out) | hdferr )

Retrieves attribute information, by attribute identifier.

Parameters

  attr_id | Attribute identifier. NOTE: In C it is defined as a structure: H5A_info_t.
  f_corder_valid | Indicates whether the creation order data is valid for this attribute.
  corder | Is a positive integer containing the creation order of the attribute.
  cset | Indicates the character set used for the attribute's name.
  data_size | Indicates the size, in the number of characters, of the attribute.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_info()

## ◆ h5aget_name_by_idx_f()

subroutine h5aget_name_by_idx_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | integer, intent(in) | idx_type,
|  | integer, intent(in) | order,
|  | integer(hsize_t), intent(in) | n,
|  | character(len=*), intent(out) | name,
|  | integer, intent(out) | hdferr,
|  | integer(size_t), intent(out), optional | size,
|  | integer(hid_t), intent(in), optional | lapl_id )

Gets an attribute name, by attribute index position.

Parameters

  loc_id | Location of object to which attribute is attached
  obj_name | Name of object to which attribute is attached, relative to location
  idx_type | Type of index; Possible values are: H5_INDEX_UNKNOWN_F = -1 - Unknown index type H5_INDEX_NAME_F - Index on names H5_INDEX_CRT_ORDER_F - Index on creation order H5_INDEX_N_F - Number of indices defined
  order | Index traversal order in which to iterate over index; Possible values are: H5_ITER_UNKNOWN_F - Unknown order H5_ITER_INC_F - Increasing order H5_ITER_DEC_F - Decreasing order H5_ITER_NATIVE_F - No particular order, whatever is fastest H5_ITER_N_F - Number of iteration orders
  n | Attribute's position in index
  name | Attribute name
  hdferr | Returns 0 if successful and -1 if it fails.
  size | Size, in bytes, of attribute name
  lapl_id | Link access property list

See C API: H5Aget_name_by_idx()

## ◆ h5aget_name_f()

subroutine h5aget_name_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(size_t), intent(in) | size,
|  | character(len=*), intent(inout) | buf,
|  | integer, intent(out) | hdferr )

Gets an attribute name.

Parameters

  attr_id | Attribute identifier
  size | Size of a buffer to read name in
  buf | Buffer to read name in
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_name()

## ◆ h5aget_num_attrs_f()

subroutine h5aget_num_attrs_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer, intent(out) | attr_num,
|  | integer, intent(out) | hdferr )

Determines the number of attributes attached to an object.

Parameters

  obj_id | Object (group, dataset, or named datatype) identifier
  attr_num | Number of attributes attached to the object
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_num_attrs()

## ◆ h5aget_space_f()

subroutine h5aget_space_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(out) | space_id,
|  | integer, intent(out) | hdferr )

Gets a copy of the dataspace for an attribute.

Parameters

  attr_id | Attribute identifier
  space_id | Attribite dataspace identifier
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_space()

## ◆ h5aget_storage_size_f()

subroutine h5aget_storage_size_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hsize_t), intent(out) | size,
|  | integer, intent(out) | hdferr )

Returns the amount of storage required for an attribute.

Parameters

  attr_id | Attribute identifier
  size | Attribute storage size
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_storage_size()

## ◆ h5aget_type_f()

subroutine h5aget_type_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(out) | type_id,
|  | integer, intent(out) | hdferr )

Gets an attribute datatype.

Parameters

  attr_id | Attribute identifier
  type_id | Attribute datatype identifier
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aget_type()

## ◆ h5aopen_async_f()

subroutine h5aopen_async_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(in) | attr_name,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously opens an attribute for an object specified by object identifier and attribute name.

Parameters

  obj_id | Identifier for object to which attribute is attached
  attr_name | Name of attribute to open
  attr_id | Attribute identifier
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  aapl_id | Attribute access property list
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aopen_async()

## ◆ h5aopen_by_idx_async_f()

subroutine h5aopen_by_idx_async_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | integer, intent(in) | idx_type,
|  | integer, intent(in) | order,
|  | integer(hsize_t), intent(in) | n,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | integer(hid_t), intent(in), optional | lapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously opens an existing attribute that is attached to an object specified by location and name.

Parameters

  loc_id | Location of object to which attribute is attached.
  obj_name | Name of object to which attribute is attached, relative to location.
  idx_type | Type of index; Possible values are: H5_INDEX_UNKNOWN_F = -1 - Unknown index type H5_INDEX_NAME_F - Index on names H5_INDEX_CRT_ORDER_F - Index on creation order H5_INDEX_N_F - Number of indices defined
  order | Order in which to iterate over index; Possible values are: H5_ITER_UNKNOWN_F - Unknown order H5_ITER_INC_F - Increasing order H5_ITER_DEC_F - Decreasing order H5_ITER_NATIVE_F - No particular order, whatever is fastest H5_ITER_N_F - Number of iteration orders
  n | Attribute's position in index.
  attr_id | Attribute identifier.
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  aapl_id | Attribute access property list.
  lapl_id | Link access property list.
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aopen_by_idx_async()

## ◆ h5aopen_by_idx_f()

subroutine h5aopen_by_idx_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | integer, intent(in) | idx_type,
|  | integer, intent(in) | order,
|  | integer(hsize_t), intent(in) | n,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | integer(hid_t), intent(in), optional | lapl_id )

Opens an existing attribute that is attached to an object specified by location and name.

Parameters

  loc_id | Location of object to which attribute is attached.
  obj_name | Name of object to which attribute is attached, relative to location.
  idx_type | Type of index; Possible values are: H5_INDEX_UNKNOWN_F = -1 - Unknown index type H5_INDEX_NAME_F - Index on names H5_INDEX_CRT_ORDER_F - Index on creation order H5_INDEX_N_F - Number of indices defined
  order | Order in which to iterate over index; Possible values are: H5_ITER_UNKNOWN_F - Unknown order H5_ITER_INC_F - Increasing order H5_ITER_DEC_F - Decreasing order H5_ITER_NATIVE_F - No particular order, whatever is fastest H5_ITER_N_F - Number of iteration orders
  n | Attribute's position in index.
  attr_id | Attribute identifier.
  hdferr | Returns 0 if successful and -1 if it fails.
  aapl_id | Attribute access property list.
  lapl_id | Link access property list.

See C API: H5Aopen_by_idx()

## ◆ h5aopen_by_name_async_f()

subroutine h5aopen_by_name_async_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | integer(hid_t), intent(in), optional | lapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously opens an attribute for an object by object name and attribute name.

Parameters

  loc_id | Location from which to find object to which attribute is attached
  obj_name | Object name either relative to loc_id, absolute from the file's root group, or '.' (a dot)
  attr_name | Attribute name
  attr_id | Attribute identifier
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  aapl_id | Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.)
  lapl_id | Link access property list identifier
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aopen_by_name_async()

## ◆ h5aopen_by_name_f()

subroutine h5aopen_by_name_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | attr_name,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | aapl_id,
|  | integer(hid_t), intent(in), optional | lapl_id )

Opens an attribute for an object by object name and attribute name.

Parameters

  loc_id | Location from which to find object to which attribute is attached
  obj_name | Object name either relative to loc_id, absolute from the file's root group, or '.' (a dot)
  attr_name | Attribute name
  attr_id | Attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  aapl_id | Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.)
  lapl_id | Link access property list identifier

See C API: H5Aopen_by_name()

## ◆ h5aopen_f()

subroutine h5aopen_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(in) | attr_name,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | aapl_id )

Opens an attribute for an object specified by object identifier and attribute name.

Parameters

  obj_id | Identifier for object to which attribute is attached
  attr_name | Name of attribute to open
  attr_id | Attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  aapl_id | Attribute access property list

See C API: H5Aopen()

## ◆ h5aopen_idx_f()

subroutine h5aopen_idx_f | ( | integer(hid_t), intent(in) | obj_id,
|  | integer, intent(in) | index,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer, intent(out) | hdferr )

Opens the attribute specified by its index.

Deprecated
  Superseded by H5Aopen_by_idx_f().

Parameters

  obj_id | Identifier of a group, dataset, or named datatype an attribute to be attached to
  index | Index of the attribute to open (zero-based)
  attr_id | Attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aopen_idx()

## ◆ h5aopen_name_f()

subroutine h5aopen_name_f | ( | integer(hid_t), intent(in) | obj_id,
|  | character(len=*), intent(in) | name,
|  | integer(hid_t), intent(out) | attr_id,
|  | integer, intent(out) | hdferr )

Opens an attribute specified by name.

Parameters

  obj_id | Identifier of a group, dataset, or named datatype attribute to be attached to
  name | Attribute name
  attr_id | Attribute identifier
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aopen_name()

## ◆ h5aread_async_f()

subroutine h5aread_async_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | memtype_id,
|  | type(c_ptr), intent(in) | buf,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously reads an attribute.

Parameters

  attr_id | Identifier of an attribute to read.
  memtype_id | Identifier of the attribute datatype (in memory).
  buf | Buffer for data to be read.
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Aread_async()

## ◆ h5aread_f() [1/2]

subroutine h5aread_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | memtype_id,
|  | type(type), intent(inout) | buf,
|  | integer(hsize_t), dimension(*), intent(in) | dims,
|  | integer, intent(out) | hdferr )

Reads an attribute.

Attention
  Obsolete API, use the Fortran 2003 version instead.

Parameters

  attr_id | Identifier of an attribute to read.
  memtype_id | Identifier of the attribute datatype (in memory).
  buf | Buffer for data to be read.
  dims | Array to hold corresponding dimension sizes of data buffer buf; dim(k) has value of the k-th dimension of buffer buf; values are ignored if buf is a scalar.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aread()

## ◆ h5aread_f() [2/2]

subroutine h5aread_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | memtype_id,
|  | type(c_ptr), intent(in) | buf,
|  | integer, intent(out) | hdferr )

Reads an attribute.

Attention
  The preferred API, Fortran 2003 version.

Parameters

  attr_id | Identifier of an attribute to read.
  memtype_id | Identifier of the attribute datatype (in memory).
  buf | Buffer for data to be read.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Aread()

## ◆ h5arename_async_f()

subroutine h5arename_async_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | old_attr_name,
|  | character(len=*), intent(in) | new_attr_name,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously renames an attribute.

Parameters

  loc_id | Location or object identifier; may be dataset or group
  old_attr_name | Prior attribute name
  new_attr_name | New attribute name
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Arename_async()

## ◆ h5arename_by_name_async_f()

subroutine h5arename_by_name_async_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | old_attr_name,
|  | character(len=*), intent(in) | new_attr_name,
|  | integer(hid_t), intent(in) | es_id,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id,
|  | type(c_ptr), intent(in), optional | file,
|  | type(c_ptr), intent(in), optional | func,
|  | integer, intent(in), optional | line )

Asynchronously renames an attribute.

Parameters

  loc_id | Location or object identifier; may be dataset or group or named datatype
  obj_name | Name of object, relative to location, whose attribute is to be renamed
  old_attr_name | Prior attribute name
  new_attr_name | New attribute name
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list identifier
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Arename_by_name()

## ◆ h5arename_by_name_f()

subroutine h5arename_by_name_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | obj_name,
|  | character(len=*), intent(in) | old_attr_name,
|  | character(len=*), intent(in) | new_attr_name,
|  | integer, intent(out) | hdferr,
|  | integer(hid_t), intent(in), optional | lapl_id )

Renames an attribute.

Parameters

  loc_id | Location or object identifier; may be dataset or group or named datatype
  obj_name | Name of object, relative to location, whose attribute is to be renamed
  old_attr_name | Prior attribute name
  new_attr_name | New attribute name
  hdferr | Returns 0 if successful and -1 if it fails.
  lapl_id | Link access property list identifier

See C API: H5Arename_by_name()

## ◆ h5arename_f()

subroutine h5arename_f | ( | integer(hid_t), intent(in) | loc_id,
|  | character(len=*), intent(in) | old_attr_name,
|  | character(len=*), intent(in) | new_attr_name,
|  | integer, intent(out) | hdferr )

Renames an attribute.

Parameters

  loc_id | Location or object identifier; may be dataset or group
  old_attr_name | Prior attribute name
  new_attr_name | New attribute name
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Arename()

## ◆ h5awrite_async_f()

subroutine h5awrite_async_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | memtype_id,
|  | type(c_ptr), intent(in) | buf,
|  | 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 writes an attribute.

Parameters

  attr_id | Identifier of an attribute to read.
  memtype_id | Identifier of the attribute datatype (in memory).
  buf | Data to be written.
  es_id | Event set identifier
  hdferr | Returns 0 if successful and -1 if it fails.
  file | Pointer to filename the async subroutine is being called from, filename must be null character terminated
  func | Pointer to function name the async subroutine is being called in, func must be null character terminated
  line | Line number the async subroutine is being called at

See C API: H5Awrite_async()

## ◆ h5awrite_f() [1/2]

subroutine h5awrite_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | memtype_id,
|  | type(type), intent(in) | buf,
|  | integer(hsize_t), dimension(*), intent(in) | dims,
|  | integer, intent(out) | hdferr )

Writes data to an attribute.

Attention
  Obsolete API, use the Fortran 2003 version instead.

Parameters

  attr_id | Identifier of an attribute to write.
  memtype_id | Identifier of the attribute datatype (in memory).
  buf | Data buffer; may be a scalar or an array.
  dims | Array to hold corresponding dimension sizes of data buffer buf; dim(k) has value of the k-th dimension of buffer buf; values are ignored if buf is a scalar.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Awrite()

## ◆ h5awrite_f() [2/2]

subroutine h5awrite_f | ( | integer(hid_t), intent(in) | attr_id,
|  | integer(hid_t), intent(in) | memtype_id,
|  | type(c_ptr), intent(in) | buf,
|  | integer, intent(out) | hdferr )

Writes data to an attribute.

Attention
  The preferred API, Fortran 2003 version.

Parameters

  attr_id | Identifier of an attribute to write.
  memtype_id | Identifier of the attribute datatype (in memory).
  buf | Data to be written.
  hdferr | Returns 0 if successful and -1 if it fails.

See C API: H5Awrite()