subroutine WriteHDF5_MPI_Vector3D_t(this,fileId,group,elemoffset,nglobalelem)
implicit none
class(Vector3D_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:4)
integer(HID_T) :: globalDims(1:4)
integer :: ivar,idir
character(4) :: dimvar
offset(1:4) = (/0,0,0,elemoffset/)
globalDims(1:4) = (/this%interp%N+1, &
this%interp%N+1, &
this%interp%N+1, &
nglobalelem/)
call CreateGroup_HDF5(fileId,trim(group))
do idir = 1,3
write(dimvar,'(I1)') idir
dimvar = "dim"//trim(dimvar)
do ivar = 1,this%nVar
call WriteArray_HDF5(fileId, &
trim(group)//"/"//trim(this%meta(ivar)%name)//"_"//dimvar, &
this%interior(:,:,:,:,ivar,idir),offset,globalDims)
enddo
enddo
endsubroutine WriteHDF5_MPI_Vector3D_t