Reads Eulerian data using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(out) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(out) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
|
| integer, | intent(in), | optional | :: | step |
User supplied step to open |
impure subroutine eulerian_set_ReadH5HUT(this,iter,time,list,step) !> Reads Eulerian data using H5HUT. implicit none class(eulerian_set), intent(inout):: this !! An Eulerian Set integer, intent(out) :: iter !! Iteration at write real(wp), intent(out) :: time !! Time at write character(str8), intent(in), & optional :: list(:) !! Names of fields to write integer, intent(in), & optional :: step !! User supplied step to open ! Work variables type(h5hut_obj) :: h5 !! H5hut structure integer :: n,ind ! Nothing to read, if empty if (.not.allocated(this%field)) return ! Open file call h5%Initialize(trim(adjustl(this%read_file)),"R",this%parallel) if (.not.present(step)) then ! Jump to last step call h5%LastTimeStep(iter,time) else ! Jump to desired step call h5%JumpToStep(step,iter,time) end if if (.not.present(list)) then ! Read all fields do n=1,size(this%field) call this%ReadSingle(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%ReadSingle(h5,ind) end do end if ! Close file call h5%Finalize() return end subroutine eulerian_set_ReadH5HUT