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

Last change on this file since 1 was 1, checked in by raasch, 15 years ago

Initial repository layout and content

File size: 2.0 KB
Line 
1 SUBROUTINE init_pt_anomaly
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6!
7!
8! Former revisions:
9! -----------------
10! $Log: init_pt_anomaly.f90,v $
11! Revision 1.7  2005/03/26 20:36:55  raasch
12! Arguments for non-cyclic boundary conditions added to argument list of
13! routine exchange_horiz
14!
15! Revision 1.6  2001/03/30 07:32:28  raasch
16! Translation of remaining German identifiers (variables, subroutines, etc.)
17!
18! Revision 1.5  2001/01/22 19:40:09  letzel
19! All comments translated into English.
20!
21! Revision 1.4  2001/01/22 07:19:14  raasch
22! Module test_variables removed
23!
24! Revision 1.3  1998/07/06 12:17:25  raasch
25! + USE test_variables
26!
27! Revision 1.2  1997/09/12 06:26:16  raasch
28! Stoerungsradius jetzt proportional zur Gitterweite
29!
30! Revision 1.1  1997/08/29 08:58:56  raasch
31! Initial revision
32!
33!
34! Description:
35! ------------
36! Impose a temperature perturbation for an advection test.
37!------------------------------------------------------------------------------!
38
39    USE arrays_3d
40    USE constants
41    USE grid_variables
42    USE indices
43    USE control_parameters
44
45    IMPLICIT NONE
46
47    INTEGER ::  i, ic, j, jc, k, kc
48    REAL    ::  betrag, radius, rc, x, y, z
49
50!
51!-- Defaults: radius rc, strength z,
52!--           position of centre: ic, jc, kc
53    rc =  10.0 * dx
54    ic =  ( nx+1 ) / 2
55    jc =  ic
56    kc = nzt / 2
57
58!
59!-- Compute the perturbation.
60    DO  i = nxl, nxr
61       DO  j = nys, nyn
62          DO  k = nzb+1, nzt-1
63             x = ( i - ic ) * dx
64             y = ( j - jc ) * dy
65             z = ABS( zu(k) - zu(kc) )
66             radius = SQRT( x**2 + y**2 + z**2 )
67             IF ( radius <= rc )  THEN
68                betrag = 5.0 * EXP( -( radius / 2.0 )**2 )
69             ELSE
70                betrag = 0.0
71             ENDIF
72
73             pt(k,j,i) = pt(k,j,i) + betrag
74
75          ENDDO
76       ENDDO
77    ENDDO
78
79!
80!-- Exchange of boundary values for temperature
81    CALL exchange_horiz( pt, 0, 0 )
82
83
84 END SUBROUTINE init_pt_anomaly
Note: See TracBrowser for help on using the repository browser.