Skip to content
Snippets Groups Projects
Commit fd7835ca authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann
Browse files

correction to end at tmax and not tmax+dt

parent 8383e5be
No related branches found
No related tags found
No related merge requests found
......@@ -15,13 +15,13 @@ SUBROUTINE control
call daytim('Start at ')
! 1.2 Define data specific to run
WRITE(*,*) 'Load basic data...'
CALL basic_data
WRITE(*,*) '...basic data loaded.'
! 1.3 Read input parameters from input file
WRITE(*,*) 'Read input parameters...'
CALL readinputs
......@@ -43,7 +43,7 @@ SUBROUTINE control
WRITE(*,*) '...initial diagnostics done'
!
CALL FLUSH(stdout)
!________________________________________________________________________________
! 2. Main loop
DO
......@@ -53,9 +53,10 @@ SUBROUTINE control
time = time + dt
CALL tesend
CALL diagnose(step)
IF( nlend ) EXIT ! exit do loop
CALL diagnose(step)
! CALL write_restart ! if want to write a restart file every so often (in case of crash)
END DO
!________________________________________________________________________________
......
......@@ -16,7 +16,7 @@ SUBROUTINE tesend
!________________________________________________________________________________
! 2. Test on NRUN
nlend = step .GE. nrun
nlend = step .GT. nrun
IF ( nlend ) THEN
WRITE(*,'(/a)') 'NRUN steps done'
RETURN
......@@ -25,7 +25,7 @@ SUBROUTINE tesend
!________________________________________________________________________________
! 3. Test on TMAX
nlend = time .GE. tmax
nlend = time .GT. tmax
IF ( nlend ) THEN
WRITE(*,'(/a)') 'TMAX reached'
RETURN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment