WriteArray_HDF5_int32_r3_serial Subroutine

private subroutine WriteArray_HDF5_int32_r3_serial(fileId, arrayName, hfArray)

Arguments

TypeIntentOptionalAttributesName
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: arrayName
integer(kind=int32), intent(in), dimension(:,:,:):: hfArray

Contents


Source Code

  subroutine WriteArray_HDF5_int32_r3_serial(fileId,arrayName,hfArray)
    implicit none
    integer(HID_T),intent(in) :: fileId
    character(*),intent(in) :: arrayName
    integer(int32),dimension(:,:,:),intent(in) :: hfArray
    ! Local
    integer(HID_T) :: dsetId
    integer(HID_T) :: memspace
    integer(HSIZE_T) :: dims(1:3)
    integer :: error

    dims = shape(hfArray)
    call h5screate_simple_f(3,dims,memspace,error)

    call h5dcreate_f(fileId,trim(arrayName),H5T_STD_I32LE,memspace, &
                     dsetId,error)

    call h5dwrite_f(dsetId,H5T_STD_I32LE, &
                    hfArray,dims,error)

    call h5dclose_f(dSetId,error)
    call h5sclose_f(memspace,error)

  endsubroutine WriteArray_HDF5_int32_r3_serial