Creates and writes a dataset of a type type_id.

Procedure:

H5LT_MAKE_DATASET(loc_id, dset_name, rank, dims, type_id, buffer)

Signature:

<pre><code class="language-c">herr_t H5LTmake_dataset ( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, hid_t type_id, const void*buffer )</code></pre>

Fortran90:

<pre><code class="language-fortran">subroutine h5ltmake_dataset_f(loc_id, dset_name, rank, dims, type_id, &
                              buf, errcode)
  implicit none
  integer(HID_T), intent(IN) :: loc_id            ! file or group identifier 
  character(LEN=*), intent(IN) :: dset_name       ! name of the dataset 
  integer, intent(IN) :: rank                     ! rank 
  integer(HSIZE_T), dimension(*), intent(IN) :: dims 
                                                  ! size of the bufffer buf  
  integer(HID_T), intent(IN) :: type_id           ! datatype identifier 
  <TYPE>, intent(IN), dimension(*) :: buf         ! data buffer 
  integer :: errcode                              ! error code
end subroutine h5ltmake_dataset_f</code></pre>

Fortran2003:

<pre><code class="language-fortran">subroutine h5ltmake_dataset_f(loc_id, dset_name, rank, dims, type_id, &
                              buf, errcode)
  implicit none
  integer(HID_T), intent(IN) :: loc_id            ! file or group identifier 
  character(LEN=*), intent(IN) :: dset_name       ! name of the dataset 
  integer, intent(IN) :: rank                     ! rank 
  integer(HSIZE_T), dimension(*), intent(IN) :: dims 
                                                  ! size of the bufffer buf  
  integer(HID_T), intent(IN) :: type_id           ! datatype identifier 
  type(C_PTR), intent(IN) :: buf                  ! data buffer 
  integer :: errcode                              ! error code
end subroutine h5ltmake_dataset_f</code></pre>

Parameters:
hid_t loc_idIN: Identifier of the file or group to create the dataset within.
const char *dset_name   IN: The name of the dataset to create.
int rankIN: Number of dimensions of dataspace.
const hsize_t * dimsIN: An array of the size of each dimension.
hid_t type_idIN: Identifier of the datatype to use when creating the dataset.
const void * bufferIN: Buffer with data to be written to the dataset.

Description:

H5LTmake_dataset creates and writes a dataset named dset_name attached to the object specified by the identifier loc_id.

The parameter type_id can be any valid HDF5 predefined native datatype; For example, setting type_id to H5T_NATIVE_INTwill result in a dataset of signed integer datatype.

Returns:

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

Example:

Coming Soon!

History:
Release    Change
1.8.7Fortran subroutine modified in this release to accomodate arrays with more than three dimensions.
1.10.0Fortran 2003 subroutine added to accept a C address of the data buffer.