[1682] | 1 | !> @file timestep_scheme_steering.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[2000] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
[1036] | 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
[3655] | 17 | ! Copyright 1997-2019 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1001] | 21 | ! ------------------ |
---|
[1683] | 22 | ! |
---|
[2001] | 23 | ! |
---|
[1] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
[3] | 26 | ! $Id: timestep_scheme_steering.f90 4182 2019-08-22 15:20:23Z knoop $ |
---|
[4182] | 27 | ! Corrected "Former revisions" section |
---|
| 28 | ! |
---|
| 29 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[3634] | 30 | ! OpenACC port for SPEC |
---|
[674] | 31 | ! |
---|
[4182] | 32 | ! Revision 1.1 2004/01/28 15:34:47 raasch |
---|
| 33 | ! Initial revision |
---|
| 34 | ! |
---|
| 35 | ! |
---|
[1] | 36 | ! Description: |
---|
| 37 | ! ------------ |
---|
[1682] | 38 | !> Depending on the timestep scheme set the steering factors for the prognostic |
---|
| 39 | !> equations. |
---|
[1] | 40 | !------------------------------------------------------------------------------! |
---|
[1682] | 41 | SUBROUTINE timestep_scheme_steering |
---|
| 42 | |
---|
[1] | 43 | |
---|
[1320] | 44 | USE control_parameters, & |
---|
| 45 | ONLY: intermediate_timestep_count, timestep_scheme, tsc |
---|
[1] | 46 | |
---|
[1322] | 47 | USE kinds |
---|
| 48 | |
---|
[1] | 49 | IMPLICIT NONE |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 53 | ! |
---|
| 54 | !-- Runge-Kutta schemes (here the factors depend on the respective |
---|
| 55 | !-- intermediate step) |
---|
| 56 | IF ( timestep_scheme == 'runge-kutta-2' ) THEN |
---|
| 57 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
[1322] | 58 | tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp /) |
---|
[1] | 59 | ELSE |
---|
[1322] | 60 | tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /) |
---|
[1] | 61 | ENDIF |
---|
| 62 | ELSE |
---|
| 63 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
[1322] | 64 | tsc(1:5) = (/ 1.0_wp, 1.0_wp / 3.0_wp, 0.0_wp, 0.0_wp, 0.0_wp /) |
---|
[1] | 65 | ELSEIF ( intermediate_timestep_count == 2 ) THEN |
---|
[1322] | 66 | tsc(1:5) = (/ 1.0_wp, 15.0_wp / 16.0_wp, -25.0_wp/48.0_wp, 0.0_wp, 0.0_wp /) |
---|
[1] | 67 | ELSE |
---|
[1322] | 68 | tsc(1:5) = (/ 1.0_wp, 8.0_wp / 15.0_wp, 1.0_wp/15.0_wp, 0.0_wp, 1.0_wp /) |
---|
[1] | 69 | ENDIF |
---|
| 70 | ENDIF |
---|
| 71 | |
---|
[3634] | 72 | !$ACC UPDATE DEVICE(tsc(1:5)) |
---|
| 73 | |
---|
[1001] | 74 | ELSEIF ( timestep_scheme == 'euler' ) THEN |
---|
[1] | 75 | ! |
---|
[1001] | 76 | !-- Euler scheme |
---|
[1322] | 77 | tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /) |
---|
[1] | 78 | |
---|
| 79 | ENDIF |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | END SUBROUTINE timestep_scheme_steering |
---|