Gets information about the last step.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(h5hut_obj), | intent(inout) | :: | this |
A H5hut object |
||
| integer, | intent(out) | :: | iter |
Iteration at last step |
||
| real(kind=WP), | intent(out) | :: | time |
Time at last step |
||
| character(len=*), | intent(in), | optional | :: | label_iter |
Optional iteration label |
|
| character(len=*), | intent(in), | optional | :: | label_time |
Optional time label |
impure subroutine h5hut_obj_LastTimeStep(this,iter,time,label_iter,label_time) !> Gets information about the last step. implicit none class(h5hut_obj), intent(inout) :: this !! A H5hut object integer, intent(out) :: iter !! Iteration at last step real(WP), intent(out) :: time !! Time at last step character(len=*), intent(in), & optional :: label_iter !! Optional iteration label character(len=*), intent(in), & optional :: label_time !! Optional time label ! Work variables integer(leapI8) :: atti real(leapDP) :: attr integer :: step ! Jump to last step step = this%GetNSteps() call this%SetStep(step) ! Read step attributes if (present(label_time)) then call this%hdf5%ReadAttributes(this%step_name,label_time,attr) else call this%hdf5%ReadAttributes(this%step_name,'Time',attr) end if if (present(label_iter)) then call this%hdf5%ReadAttributes(this%step_name,label_iter,atti) else call this%hdf5%ReadAttributes(this%step_name,'Iter',atti) end if time=real(attr,wp) iter=int(atti) return end subroutine h5hut_obj_LastTimeStep