1 | SUBROUTINE init_pt_anomaly |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later version. |
---|
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 | ! |
---|
17 | ! Copyright 1997-2012 Leibniz University Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: init_pt_anomaly.f90 1037 2012-10-22 14:10:22Z fricke $ |
---|
27 | ! |
---|
28 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
29 | ! code put under GPL (PALM 3.9) |
---|
30 | ! |
---|
31 | ! 861 2012-03-26 14:18:34Z suehring |
---|
32 | ! Modification of the amplitude to obtain a visible temperature perturbation. |
---|
33 | ! |
---|
34 | ! 667 2010-12-23 12:06:00Z suehring/gryschka |
---|
35 | ! Call of exchange_horiz are modified. |
---|
36 | ! |
---|
37 | ! 75 2007-03-22 09:54:05Z raasch |
---|
38 | ! 2nd+3rd argument removed from exchange horiz |
---|
39 | ! |
---|
40 | ! 19 2007-02-23 04:53:48Z raasch |
---|
41 | ! Calculation extended for gridpoint nzt |
---|
42 | ! |
---|
43 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
44 | ! |
---|
45 | ! Revision 1.7 2005/03/26 20:36:55 raasch |
---|
46 | ! Arguments for non-cyclic boundary conditions added to argument list of |
---|
47 | ! routine exchange_horiz |
---|
48 | ! |
---|
49 | ! Revision 1.1 1997/08/29 08:58:56 raasch |
---|
50 | ! Initial revision |
---|
51 | ! |
---|
52 | ! |
---|
53 | ! Description: |
---|
54 | ! ------------ |
---|
55 | ! Impose a temperature perturbation for an advection test. |
---|
56 | !------------------------------------------------------------------------------! |
---|
57 | |
---|
58 | USE arrays_3d |
---|
59 | USE constants |
---|
60 | USE grid_variables |
---|
61 | USE indices |
---|
62 | USE control_parameters |
---|
63 | |
---|
64 | IMPLICIT NONE |
---|
65 | |
---|
66 | INTEGER :: i, ic, j, jc, k, kc |
---|
67 | REAL :: betrag, radius, rc, x, y, z |
---|
68 | |
---|
69 | ! |
---|
70 | !-- Defaults: radius rc, strength z, |
---|
71 | !-- position of centre: ic, jc, kc |
---|
72 | rc = 10.0 * dx |
---|
73 | ic = ( nx+1 ) / 2 |
---|
74 | jc = ic |
---|
75 | kc = nzt / 2 |
---|
76 | |
---|
77 | ! |
---|
78 | !-- Compute the perturbation. |
---|
79 | DO i = nxl, nxr |
---|
80 | DO j = nys, nyn |
---|
81 | DO k = nzb+1, nzt |
---|
82 | x = ( i - ic ) * dx |
---|
83 | y = ( j - jc ) * dy |
---|
84 | z = ABS( zu(k) - zu(kc) ) |
---|
85 | radius = SQRT( x**2 + y**2 + z**2 ) |
---|
86 | IF ( radius <= rc ) THEN |
---|
87 | betrag = 5.0 * EXP( -( radius * 0.001 / 2.0 )**2 ) |
---|
88 | ELSE |
---|
89 | betrag = 0.0 |
---|
90 | ENDIF |
---|
91 | |
---|
92 | pt(k,j,i) = pt(k,j,i) + betrag |
---|
93 | |
---|
94 | ENDDO |
---|
95 | ENDDO |
---|
96 | ENDDO |
---|
97 | |
---|
98 | ! |
---|
99 | !-- Exchange of boundary values for temperature |
---|
100 | CALL exchange_horiz( pt, nbgp ) |
---|
101 | |
---|
102 | |
---|
103 | END SUBROUTINE init_pt_anomaly |
---|