Signature:

      SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, hdferr)
        INTEGER(HID_T)  , INTENT(IN)  :: attr_id
        INTEGER(HID_T)  , INTENT(IN)  :: memtype_id
        TYPE(C_PTR)     , INTENT(IN)  :: buf
        INTEGER         , INTENT(OUT) :: hdferr

Inputs:

      attr_id     - Attribute identifier
      memtype_id  - Attribute datatype identifier  (in memory)
      buf         - Data buffer; may be a scalar or an array

Outputs:

      hdferr      - Returns 0 if successful and -1 if fails