h5hut_obj_LastTimeStep Subroutine

private impure subroutine h5hut_obj_LastTimeStep(this, iter, time, label_iter, label_time)

Gets information about the last step.

Type Bound

h5hut_obj

Arguments

Type IntentOptional 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


Calls

proc~~h5hut_obj_lasttimestep~~CallsGraph proc~h5hut_obj_lasttimestep h5hut_obj%h5hut_obj_LastTimeStep none~readattributes hdf5_obj%ReadAttributes proc~h5hut_obj_lasttimestep->none~readattributes proc~h5hut_obj_getnsteps h5hut_obj%h5hut_obj_GetNSteps proc~h5hut_obj_lasttimestep->proc~h5hut_obj_getnsteps proc~h5hut_obj_setstep h5hut_obj%h5hut_obj_SetStep proc~h5hut_obj_lasttimestep->proc~h5hut_obj_setstep proc~hdf5_obj_readattributes0d hdf5_obj%hdf5_obj_ReadAttributes0D none~readattributes->proc~hdf5_obj_readattributes0d proc~hdf5_obj_readattributes1d hdf5_obj%hdf5_obj_ReadAttributes1D none~readattributes->proc~hdf5_obj_readattributes1d proc~hdf5_obj_readgroupnames hdf5_obj%hdf5_obj_ReadGroupNames proc~h5hut_obj_getnsteps->proc~hdf5_obj_readgroupnames proc~hdf5_obj_creategroup hdf5_obj%hdf5_obj_CreateGroup proc~h5hut_obj_setstep->proc~hdf5_obj_creategroup h5gcreate_f h5gcreate_f proc~hdf5_obj_creategroup->h5gcreate_f proc~hashtbl_obj_hashstring hashtbl_obj%hashtbl_obj_HashString proc~hdf5_obj_creategroup->proc~hashtbl_obj_hashstring proc~hashtbl_obj_put hashtbl_obj%hashtbl_obj_Put proc~hdf5_obj_creategroup->proc~hashtbl_obj_put proc~hdf5_obj_closegroup hdf5_obj%hdf5_obj_CloseGroup proc~hdf5_obj_creategroup->proc~hdf5_obj_closegroup proc~hdf5_obj_fixgroupname hdf5_obj%hdf5_obj_FixGroupName proc~hdf5_obj_creategroup->proc~hdf5_obj_fixgroupname h5aclose_f h5aclose_f proc~hdf5_obj_readattributes0d->h5aclose_f h5aget_space_f h5aget_space_f proc~hdf5_obj_readattributes0d->h5aget_space_f h5aget_type_f h5aget_type_f proc~hdf5_obj_readattributes0d->h5aget_type_f h5aopen_f h5aopen_f proc~hdf5_obj_readattributes0d->h5aopen_f h5aread_f h5aread_f proc~hdf5_obj_readattributes0d->h5aread_f h5sclose_f h5sclose_f proc~hdf5_obj_readattributes0d->h5sclose_f h5sget_simple_extent_dims_f h5sget_simple_extent_dims_f proc~hdf5_obj_readattributes0d->h5sget_simple_extent_dims_f proc~hdf5_obj_readattributes0d->proc~hdf5_obj_closegroup proc~hdf5_obj_getgroupobject hdf5_obj%hdf5_obj_GetGroupObject proc~hdf5_obj_readattributes0d->proc~hdf5_obj_getgroupobject proc~hdf5_obj_opengroup hdf5_obj%hdf5_obj_OpenGroup proc~hdf5_obj_readattributes0d->proc~hdf5_obj_opengroup proc~hdf5_obj_readattributes1d->h5aclose_f proc~hdf5_obj_readattributes1d->h5aget_space_f proc~hdf5_obj_readattributes1d->h5aget_type_f proc~hdf5_obj_readattributes1d->h5aopen_f proc~hdf5_obj_readattributes1d->h5aread_f proc~hdf5_obj_readattributes1d->h5sclose_f proc~hdf5_obj_readattributes1d->h5sget_simple_extent_dims_f proc~hdf5_obj_readattributes1d->proc~hdf5_obj_closegroup proc~hdf5_obj_readattributes1d->proc~hdf5_obj_getgroupobject proc~hdf5_obj_readattributes1d->proc~hdf5_obj_opengroup h5gn_members_f h5gn_members_f proc~hdf5_obj_readgroupnames->h5gn_members_f h5iget_name_f h5iget_name_f proc~hdf5_obj_readgroupnames->h5iget_name_f h5oclose_f h5oclose_f proc~hdf5_obj_readgroupnames->h5oclose_f h5oget_info_f h5oget_info_f proc~hdf5_obj_readgroupnames->h5oget_info_f h5oopen_by_idx_f h5oopen_by_idx_f proc~hdf5_obj_readgroupnames->h5oopen_by_idx_f proc~hdf5_obj_readgroupnames->proc~hdf5_obj_fixgroupname proc~sllist_obj_put sllist_obj%sllist_obj_Put proc~hashtbl_obj_put->proc~sllist_obj_put proc~hdf5_obj_closegroup->proc~hashtbl_obj_hashstring proc~hdf5_obj_closegroup->proc~hdf5_obj_fixgroupname proc~hdf5_obj_closegroup->proc~hdf5_obj_getgroupobject h5gclose_f h5gclose_f proc~hdf5_obj_closegroup->h5gclose_f proc~hashtbl_obj_remove hashtbl_obj%hashtbl_obj_Remove proc~hdf5_obj_closegroup->proc~hashtbl_obj_remove proc~hdf5_obj_getgroupobject->proc~hashtbl_obj_hashstring proc~hdf5_obj_getgroupobject->proc~hdf5_obj_fixgroupname none~get~3 hashtbl_obj%Get proc~hdf5_obj_getgroupobject->none~get~3 proc~hdf5_obj_opengroup->proc~hashtbl_obj_hashstring proc~hdf5_obj_opengroup->proc~hashtbl_obj_put proc~hdf5_obj_opengroup->proc~hdf5_obj_fixgroupname proc~hdf5_obj_opengroup->proc~hdf5_obj_getgroupobject h5oopen_f h5oopen_f proc~hdf5_obj_opengroup->h5oopen_f proc~hashtbl_obj_get_int4 hashtbl_obj%hashtbl_obj_Get_int4 none~get~3->proc~hashtbl_obj_get_int4 proc~hashtbl_obj_get_int8 hashtbl_obj%hashtbl_obj_Get_int8 none~get~3->proc~hashtbl_obj_get_int8 proc~hashtbl_obj_get_real_dp hashtbl_obj%hashtbl_obj_Get_real_dp none~get~3->proc~hashtbl_obj_get_real_dp proc~hashtbl_obj_get_real_sp hashtbl_obj%hashtbl_obj_Get_real_sp none~get~3->proc~hashtbl_obj_get_real_sp proc~sllist_obj_remove sllist_obj%sllist_obj_Remove proc~hashtbl_obj_remove->proc~sllist_obj_remove proc~sllist_obj_put->proc~sllist_obj_put none~get~2 sllist_obj%Get proc~hashtbl_obj_get_int4->none~get~2 proc~hashtbl_obj_get_int8->none~get~2 proc~hashtbl_obj_get_real_dp->none~get~2 proc~hashtbl_obj_get_real_sp->none~get~2 proc~sllist_obj_get_int4 sllist_obj%sllist_obj_Get_int4 none~get~2->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8 sllist_obj%sllist_obj_Get_int8 none~get~2->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp sllist_obj%sllist_obj_Get_real_dp none~get~2->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp sllist_obj%sllist_obj_Get_real_sp none~get~2->proc~sllist_obj_get_real_sp proc~sllist_obj_get_int4->proc~sllist_obj_get_int4 proc~sllist_obj_get_int8->proc~sllist_obj_get_int8 proc~sllist_obj_get_real_dp->proc~sllist_obj_get_real_dp proc~sllist_obj_get_real_sp->proc~sllist_obj_get_real_sp

Called by

proc~~h5hut_obj_lasttimestep~~CalledByGraph proc~h5hut_obj_lasttimestep h5hut_obj%h5hut_obj_LastTimeStep proc~eulerian_set_readh5hut eulerian_set%eulerian_set_ReadH5HUT proc~eulerian_set_readh5hut->proc~h5hut_obj_lasttimestep proc~marker_set_readh5hut marker_set%marker_set_ReadH5HUT proc~marker_set_readh5hut->proc~h5hut_obj_lasttimestep proc~particle_set_readh5hut particle_set%particle_set_ReadH5HUT proc~particle_set_readh5hut->proc~h5hut_obj_lasttimestep proc~respart_set_readh5hut ResPart_set%ResPart_set_ReadH5HUT proc~respart_set_readh5hut->proc~h5hut_obj_lasttimestep

Source Code

    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