Creates and writes an attribute.


H5LT_SET_ATTRIBUTE_FLOAT(loc_id, obj_name, attr_name, buffer, size)


<pre><code class="language-c">herr_t H5LTset_attribute_float( hid_t loc_id, const char *obj_name, const char *attr_name, float *buffer, hsize_t size )</code></pre>

<pre><code class="language-fortran">subroutine h5ltset_attribute_float_f(loc_id, dset_name, attr_name, &
                                     buf, size, errcode)
  implicit none
  integer(HID_T), intent(IN) :: loc_id           ! file or group identifier 
  character(LEN=*), intent(IN) :: dset_name      ! name of the dataset 
  character(LEN=*), intent(IN) :: attr_name      ! name of the attribute
  real, intent(INOUT), dimension(*) :: buf       ! data buffer
  integer(size_t),  intent(in) :: size           ! size of attribute array
  integer :: errcode                             ! error code
end subroutine h5ltset_attribute_float_f</code></pre>

hid_t loc_idIN: Identifier of the object ( dataset or group) to create the attribute within.
const char *obj_nameIN: The name of the object to attach the attribute.
const char *attr_nameIN: The attribute name.
float * bufferIN: Buffer with data to be written to the attribute.
hsize_t size

IN: The size of the 1D array (one in the case of a scalar attribute). This value is used by H5Screate_simple to create the dataspace.


H5LTset_attribute_float creates and writes a numerical floating point attribute named attr_name and attaches it to the object specified by the name obj_name. The attribute has a dimensionality of 1. The HDF5 datatype of the attribute is H5T_NATIVE_FLOAT.


Returns a non-negative value if successful; otherwise returns a negative value.


Coming Soon!