program main use initial_module use temporal use output implicit none integer :: itime,ftime real(DP) :: tout call debag_check_i call ic call save(1) ; call save(2) call time_print; call stopwatch(itime) tout=tax(1) do n=1,tlen-1 call ticktock(U) call report(n,tlen-1,10) if (n .eq. 1) call save(3) if (tax(mod(n,taxlen)+1) .ge. outputtime(tout)) then call save(2) tout=outputtime(tout) end if enddo call stopwatch(itime,ftime); call time_print call debag_check_e contains subroutine debag_check_i open(2,file=outdir//'error_HLLD.dat',status='replace') open(3,file=outdir//'error_INTERP.dat',status='replace') open(4,file=outdir//'pressure_blur.dat',status='replace') end subroutine debag_check_i subroutine debag_check_e if (HLLDerror .eq. 0) then; close(2,status='delete') else; close(2); end if if (INTERPerror .eq. 0) then; close(3,status='delete') else; close(3); end if if (pressure_blurred .eq. 0) then; close(4,status='delete') else; close(4); end if end subroutine debag_check_e end program main