Creates a new step and updates attributes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(h5hut_obj), | intent(inout) | :: | this |
A H5hut object |
||
| integer, | intent(in) | :: | iter |
iteration counter |
||
| real(kind=WP), | intent(in) | :: | time |
Time value |
||
| character(len=*), | intent(in), | optional | :: | label_iter |
Optional iteration label |
|
| character(len=*), | intent(in), | optional | :: | label_time |
Optional time label |
impure subroutine h5hut_obj_NewTimeStep(this,iter,time,label_iter,label_time) !> Creates a new step and updates attributes. implicit none class(h5hut_obj), intent(inout) :: this !! A H5hut object integer, intent(in) :: iter !! iteration counter real(WP), intent(in) :: time !! Time value character(len=*), intent(in), & optional :: label_iter !! Optional iteration label character(len=*), intent(in), & optional :: label_time !! Optional time label ! Work variables integer :: step ! Get number of steps in file step = this%GetNSteps() + 1 ! Add a new step call this%SetStep(step) ! Set step attributes if (present(label_time)) then call this%hdf5%WriteAttributes(this%step_name,label_time,real(time,leapDP)) else call this%hdf5%WriteAttributes(this%step_name,'Time',real(time,leapDP)) end if if (present(label_iter)) then call this%hdf5%WriteAttributes(this%step_name,label_iter,int(iter,leapI8)) else call this%hdf5%WriteAttributes(this%step_name,'Iter',int(iter,leapI8)) end if ! Set flag this%block_group_exists = .false. return end subroutine h5hut_obj_NewTimeStep