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

Last change on this file since 874 was 863, checked in by suehring, 13 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1 SUBROUTINE init_pt_anomaly
2
3!------------------------------------------------------------------------------!
4! Current revisions:
5! -----------------
6!
7!
8! Former revisions:
9! -----------------
10! $Id: init_pt_anomaly.f90 863 2012-03-26 14:28:17Z heinze $
11!
12! 861 2012-03-26 14:18:34Z suehring
13! Modification of the amplitude to obtain a visible temperature perturbation.
14!
15! 667 2010-12-23 12:06:00Z suehring/gryschka
16! Call of exchange_horiz are modified.
17!
18! 75 2007-03-22 09:54:05Z raasch
19! 2nd+3rd argument removed from exchange horiz
20!
21! 19 2007-02-23 04:53:48Z raasch
22! Calculation extended for gridpoint nzt
23!
24! RCS Log replace by Id keyword, revision history cleaned up
25!
26! Revision 1.7  2005/03/26 20:36:55  raasch
27! Arguments for non-cyclic boundary conditions added to argument list of
28! routine exchange_horiz
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
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 * 0.001 / 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, nbgp )
82
83
84 END SUBROUTINE init_pt_anomaly
Note: See TracBrowser for help on using the repository browser.