[1682] | 1 | !> @file timestep_scheme_steering.f90 |
---|
[1036] | 2 | !--------------------------------------------------------------------------------! |
---|
| 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
| 5 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 6 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
| 7 | ! either version 3 of the License, or (at your option) any later version. |
---|
| 8 | ! |
---|
| 9 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 10 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 11 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 12 | ! |
---|
| 13 | ! You should have received a copy of the GNU General Public License along with |
---|
| 14 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 15 | ! |
---|
[1310] | 16 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1001] | 20 | ! ------------------ |
---|
[1683] | 21 | ! |
---|
| 22 | ! |
---|
[1] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
[3] | 25 | ! $Id: timestep_scheme_steering.f90 1683 2015-10-07 23:57:51Z gronemeier $ |
---|
[674] | 26 | ! |
---|
[1683] | 27 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 28 | ! Code annotations made doxygen readable |
---|
| 29 | ! |
---|
[1323] | 30 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
| 31 | ! REAL constants defined as wp-kind |
---|
| 32 | ! |
---|
[1321] | 33 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
| 34 | ! ONLY-attribute added to USE-statements |
---|
| 35 | ! |
---|
[1037] | 36 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 37 | ! code put under GPL (PALM 3.9) |
---|
| 38 | ! |
---|
[1002] | 39 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 40 | ! all actions concerning leapfrog scheme removed |
---|
| 41 | ! |
---|
[1] | 42 | ! Revision 1.1 2004/01/28 15:34:47 raasch |
---|
| 43 | ! Initial revision |
---|
| 44 | ! |
---|
| 45 | ! |
---|
| 46 | ! Description: |
---|
| 47 | ! ------------ |
---|
[1682] | 48 | !> Depending on the timestep scheme set the steering factors for the prognostic |
---|
| 49 | !> equations. |
---|
[1] | 50 | !------------------------------------------------------------------------------! |
---|
[1682] | 51 | SUBROUTINE timestep_scheme_steering |
---|
| 52 | |
---|
[1] | 53 | |
---|
[1320] | 54 | USE control_parameters, & |
---|
| 55 | ONLY: intermediate_timestep_count, timestep_scheme, tsc |
---|
[1] | 56 | |
---|
[1322] | 57 | USE kinds |
---|
| 58 | |
---|
[1] | 59 | IMPLICIT NONE |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | IF ( timestep_scheme(1:5) == 'runge' ) THEN |
---|
| 63 | ! |
---|
| 64 | !-- Runge-Kutta schemes (here the factors depend on the respective |
---|
| 65 | !-- intermediate step) |
---|
| 66 | IF ( timestep_scheme == 'runge-kutta-2' ) THEN |
---|
| 67 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
[1322] | 68 | tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp /) |
---|
[1] | 69 | ELSE |
---|
[1322] | 70 | tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /) |
---|
[1] | 71 | ENDIF |
---|
| 72 | ELSE |
---|
| 73 | IF ( intermediate_timestep_count == 1 ) THEN |
---|
[1322] | 74 | tsc(1:5) = (/ 1.0_wp, 1.0_wp / 3.0_wp, 0.0_wp, 0.0_wp, 0.0_wp /) |
---|
[1] | 75 | ELSEIF ( intermediate_timestep_count == 2 ) THEN |
---|
[1322] | 76 | 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] | 77 | ELSE |
---|
[1322] | 78 | 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] | 79 | ENDIF |
---|
| 80 | ENDIF |
---|
| 81 | |
---|
[1001] | 82 | ELSEIF ( timestep_scheme == 'euler' ) THEN |
---|
[1] | 83 | ! |
---|
[1001] | 84 | !-- Euler scheme |
---|
[1322] | 85 | tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /) |
---|
[1] | 86 | |
---|
| 87 | ENDIF |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | END SUBROUTINE timestep_scheme_steering |
---|