SUBROUTINE timestep_scheme_steering !------------------------------------------------------------------------------! ! Current revisions: ! ----------------- ! ! Former revisions: ! ----------------- ! $Id: timestep_scheme_steering.f90 674 2011-01-18 16:33:31Z fricke $ ! ! 673 2011-01-18 16:19:48Z suehring ! No pressure term during time integration (tsc(4)=0.0). ! ! RCS Log replace by Id keyword, revision history cleaned up ! ! Revision 1.2 2005/03/26 21:17:06 raasch ! No pressure term for Runge-Kutta-schemes (tsc(4)=0.0) ! ! Revision 1.1 2004/01/28 15:34:47 raasch ! Initial revision ! ! ! Description: ! ------------ ! Depending on the timestep scheme set the steering factors for the prognostic ! equations. !------------------------------------------------------------------------------! USE control_parameters IMPLICIT NONE IF ( timestep_scheme(1:5) == 'runge' ) THEN ! !-- Runge-Kutta schemes (here the factors depend on the respective !-- intermediate step) IF ( timestep_scheme == 'runge-kutta-2' ) THEN IF ( intermediate_timestep_count == 1 ) THEN tsc(1:5) = (/ 1.0, 1.0, 0.0, 0.0, 0.0 /) ELSE tsc(1:5) = (/ 1.0, 0.5, -0.5, 0.0, 1.0 /) ENDIF ELSE IF ( intermediate_timestep_count == 1 ) THEN tsc(1:5) = (/ 1.0, 1.0/3.0, 0.0, 0.0, 0.0 /) ELSEIF ( intermediate_timestep_count == 2 ) THEN tsc(1:5) = (/ 1.0, 15.0/16.0, -25.0/48.0, 0.0, 0.0 /) ELSE tsc(1:5) = (/ 1.0, 8.0/15.0, 1.0/15.0, 0.0, 1.0 /) ENDIF ENDIF ELSE IF ( .NOT. dt_fixed ) THEN ! !-- Leapfrog and Euler schemes !-- Determine whether after the time step adjustment the Euler- or the !-- leapfrog scheme will be applied. The very first time step must always !-- be an Euler step. IF ( dt_changed ) THEN IF ( timestep_scheme == 'leapfrog+euler' .OR. & timestep_scheme == 'euler' .OR. simulated_time == 0.0 ) THEN tsc(1:5) = (/ 1.0, 1.0, 0.0, 0.0, 1.0 /) ELSE tsc(1:5) = (/ 0.0, 2.0, 0.0, 0.0, 2.0 /) ENDIF ELSE ! !-- No time step change, hence continue with the scheme set by the !-- user. IF ( timestep_scheme == 'euler' ) THEN tsc(1:5) = (/ 1.0, 1.0, 0.0, 0.0, 1.0 /) ELSE tsc(1:5) = (/ 0.0, 2.0, 0.0, 0.0, 2.0 /) ENDIF ENDIF ELSE ! !-- Fixed time step: ! !-- In any case, the very first time step must always be an Euler step. timestep_reason = 'F' IF ( simulated_time == 0.0 ) THEN dt_changed = .TRUE. tsc(1:5) = (/ 1.0, 1.0, 0.0, 0.0, 1.0 /) ELSE dt_changed = .FALSE. IF ( timestep_scheme == 'euler' ) THEN tsc(1:5) = (/ 1.0, 1.0, 0.0, 0.0, 1.0 /) ELSE tsc(1:5) = (/ 0.0, 2.0, 0.0, 0.0, 2.0 /) ENDIF ENDIF ENDIF ENDIF END SUBROUTINE timestep_scheme_steering