subroutine reset_tot_parts() ! if the second RK step is to be compared, the reference has to be reset ! -> recount the TotParts from the restored data use real_time_data, only: TotPartsStorage implicit none TotParts = get_tot_parts() TotPartsStorage = TotParts end subroutine reset_tot_parts