source: palm/trunk/SOURCE/init_pt_anomaly.f90 @ 1036

Last change on this file since 1036 was 1036, checked in by raasch, 9 years ago

code has been put under the GNU General Public License (v3)

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
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 1036 2012-10-22 13:43:42Z raasch $
27!
28! 861 2012-03-26 14:18:34Z suehring
29! Modification of the amplitude to obtain a visible temperature perturbation.
30!
31! 667 2010-12-23 12:06:00Z suehring/gryschka
32! Call of exchange_horiz are modified.
33!
34! 75 2007-03-22 09:54:05Z raasch
35! 2nd+3rd argument removed from exchange horiz
36!
37! 19 2007-02-23 04:53:48Z raasch
38! Calculation extended for gridpoint nzt
39!
40! RCS Log replace by Id keyword, revision history cleaned up
41!
42! Revision 1.7  2005/03/26 20:36:55  raasch
43! Arguments for non-cyclic boundary conditions added to argument list of
44! routine exchange_horiz
45!
46! Revision 1.1  1997/08/29 08:58:56  raasch
47! Initial revision
48!
49!
50! Description:
51! ------------
52! Impose a temperature perturbation for an advection test.
53!------------------------------------------------------------------------------!
54
55    USE arrays_3d
56    USE constants
57    USE grid_variables
58    USE indices
59    USE control_parameters
60
61    IMPLICIT NONE
62
63    INTEGER ::  i, ic, j, jc, k, kc
64    REAL    ::  betrag, radius, rc, x, y, z
65
66!
67!-- Defaults: radius rc, strength z,
68!--           position of centre: ic, jc, kc
69    rc =  10.0 * dx
70    ic =  ( nx+1 ) / 2
71    jc =  ic
72    kc = nzt / 2
73
74!
75!-- Compute the perturbation.
76    DO  i = nxl, nxr
77       DO  j = nys, nyn
78          DO  k = nzb+1, nzt
79             x = ( i - ic ) * dx
80             y = ( j - jc ) * dy
81             z = ABS( zu(k) - zu(kc) )
82             radius = SQRT( x**2 + y**2 + z**2 )
83             IF ( radius <= rc )  THEN
84                betrag = 5.0 * EXP( -( radius * 0.001 / 2.0 )**2 )
85             ELSE
86                betrag = 0.0
87             ENDIF
88
89             pt(k,j,i) = pt(k,j,i) + betrag
90
91          ENDDO
92       ENDDO
93    ENDDO
94
95!
96!-- Exchange of boundary values for temperature
97    CALL exchange_horiz( pt, nbgp )
98
99
100 END SUBROUTINE init_pt_anomaly
Note: See TracBrowser for help on using the repository browser.