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