Writes Eulerian data using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
impure subroutine eulerian_set_WriteH5HUT(this,iter,time,list) !> Writes Eulerian data using H5HUT. implicit none class(eulerian_set), intent(inout):: this !! An Eulerian Set integer, intent(in) :: iter !! Iteration at write real(wp), intent(in) :: time !! Time at write character(str8), intent(in), & optional :: list(:) !! Names of fields to write ! Work variables type(h5hut_obj) :: h5 integer :: n, ind ! Nothing to write, if empty if (.not.allocated(this%field)) return ! Open the file if (this%overwrite) then call h5%Initialize(trim(adjustl(this%write_file)),"W",this%parallel) else call h5%Initialize(trim(adjustl(this%write_file)),"RW",this%parallel) end if ! Create a new time step call h5%NewTimeStep(iter,time) if (.not.present(list)) then ! Write all fields do n=1,size(this%field) call this%WriteSingle(h5,n) end do else do n=1,size(list) ! Get index of this Eulerian_obj ind = this%GetIndex(list(n)) if (ind.lt.1) call this%parallel%Stop('Unable to find '//list(n)//' in Eulerian_set') call this%WriteSingle(h5,ind) end do end if call h5%Finalize() return end subroutine eulerian_set_WriteH5HUT