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

Last change on this file since 1079 was 1037, checked in by raasch, 12 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 2.8 KB
RevLine 
[1]1 SUBROUTINE init_pt_anomaly
2
[1036]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!
[484]20! Current revisions:
[1]21! -----------------
22!
[861]23!
[1]24! Former revisions:
25! -----------------
[3]26! $Id: init_pt_anomaly.f90 1037 2012-10-22 14:10:22Z maronga $
[39]27!
[1037]28! 1036 2012-10-22 13:43:42Z raasch
29! code put under GPL (PALM 3.9)
30!
[863]31! 861 2012-03-26 14:18:34Z suehring
32! Modification of the amplitude to obtain a visible temperature perturbation.
33!
[668]34! 667 2010-12-23 12:06:00Z suehring/gryschka
35! Call of exchange_horiz are modified.
36!
[77]37! 75 2007-03-22 09:54:05Z raasch
38! 2nd+3rd argument removed from exchange horiz
39!
[39]40! 19 2007-02-23 04:53:48Z raasch
41! Calculation extended for gridpoint nzt
42!
[3]43! RCS Log replace by Id keyword, revision history cleaned up
44!
[1]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
[19]81          DO  k = nzb+1, nzt
[1]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
[861]87                betrag = 5.0 * EXP( -( radius * 0.001 / 2.0 )**2 )
[1]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
[667]100    CALL exchange_horiz( pt, nbgp )
[1]101
102
103 END SUBROUTINE init_pt_anomaly
Note: See TracBrowser for help on using the repository browser.