WriteHDF5_MPI_Vector2D_t Subroutine

public subroutine WriteHDF5_MPI_Vector2D_t(this, fileId, group, elemoffset, nglobalelem)

Arguments

TypeIntentOptionalAttributesName
class(Vector2D_t), intent(in) :: this
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: group
integer, intent(in) :: elemoffset
integer, intent(in) :: nglobalelem

Contents


Source Code

  subroutine WriteHDF5_MPI_Vector2D_t(this,fileId,group,elemoffset,nglobalelem)
    implicit none
    class(Vector2D_t),intent(in) :: this
    character(*),intent(in) :: group
    integer(HID_T),intent(in) :: fileId
    integer,intent(in) :: elemoffset
    integer,intent(in) :: nglobalelem
    ! Local
    integer(HID_T) :: offset(1:3)
    integer(HID_T) :: globalDims(1:3)
    integer :: ivar,idir
    character(4) :: dimvar

    offset(1:3) = (/0,0,elemoffset/)
    globalDims(1:3) = (/this%interp%N+1, &
                        this%interp%N+1, &
                        nglobalelem/)

    call CreateGroup_HDF5(fileId,trim(group))

    do idir = 1,2
      write(dimvar,'(I1)') idir
      dimvar = "dim"//trim(dimvar)
      do ivar = 1,this%nVar
        !call this%meta(ivar)%WriteHDF5(group,ivar,fileId)
        call WriteArray_HDF5(fileId, &
                             trim(group)//"/"//trim(this%meta(ivar)%name)//"_"//dimvar, &
                             this%interior(:,:,:,ivar,idir),offset,globalDims)
      enddo
    enddo

  endsubroutine WriteHDF5_MPI_Vector2D_t