Name: H5Acreate
Signature:
  hid_t `H5Acreate`(hid_t `loc_id`, const char *`name`, hid_t `type_id`, hid_t `space_id`, hid_t `create_plist` )
Purpose:
  Creates a dataset as an attribute of another group, dataset, or named datatype.
Description:
  `H5Acreate` creates the attribute `name` attached to the object specified with `loc_id`. `loc_id` can be a group, dataset, or named datatype identifier.

  The attribute name specified in `name` must be unique. Attempting to create an attribute with the same name as an already existing attribute will fail, leaving the pre-existing attribute in place. To overwrite an existing attribute with a new attribute of the same name, first call `H5Adelete` then recreate the attribute with `H5Acreate`.

  The datatype and dataspace identifiers of the attribute, `type_id` and `space_id`, respectively, are created with the H5T and H5S interfaces, respectively.

  Currently only simple dataspaces are allowed for attribute dataspaces.

  The attribute creation property list, `create_plist`, is currently unused; it may be used in the future for optional attribute properties. At this time, `H5P_DEFAULT` is the only accepted value.

  The attribute identifier returned from this function must be released with `H5Aclose` or resource leaks will develop.
Parameters:

hid_t `loc_id` | IN: Object (dataset, group, or named datatype) to be attached to.
const char *`name` | IN: Name of attribute to create.
hid_t `type_id` | IN: Identifier of datatype for attribute.
hid_t `space_id` | IN: Identifier of dataspace for attribute.
hid_t `create_plist` | IN: Identifier of creation property list. (Currently unused; the only accepted value is `H5P_DEFAULT`.)

Returns:
  Returns an attribute identifier if successful; otherwise returns a negative value.
Fortran90 Interface: h5acreate_f

      SUBROUTINE h5acreate_f(obj_id, name, type_id, space_id, attr_id, &
                             hdferr, creation_prp)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: obj_id    ! Object identifier
        CHARACTER(LEN=*), INTENT(IN) :: name    ! Attribute name
        INTEGER(HID_T), INTENT(IN) :: type_id   ! Attribute datatype identifier
        INTEGER(HID_T), INTENT(IN) :: space_id  ! Attribute dataspace identifier
        INTEGER(HID_T), INTENT(OUT) :: attr_id  ! Attribute identifier
        INTEGER, INTENT(OUT) :: hdferr          ! Error code:
                                                ! 0 on success and -1 on failure

        INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp
                                                ! Attribute creation property
                                                ! list identifier
      END SUBROUTINE h5acreate_f