Index: palm/trunk/SOURCE/init_pt_anomaly.f90
===================================================================
--- palm/trunk/SOURCE/init_pt_anomaly.f90	(revision 4901)
+++ palm/trunk/SOURCE/init_pt_anomaly.f90	(revision 1)
@@ -1,44 +1,30 @@
-!> @file init_pt_anomaly.f90
-!--------------------------------------------------------------------------------------------------!
-! This file is part of the PALM model system.
-!
-! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
-! Public License as published by the Free Software Foundation, either version 3 of the License, or
-! (at your option) any later version.
-!
-! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-! Public License for more details.
-!
-! You should have received a copy of the GNU General Public License along with PALM. If not, see
-! <http://www.gnu.org/licenses/>.
-!
-! Copyright 1997-2021 Leibniz Universitaet Hannover
-!--------------------------------------------------------------------------------------------------!
-!
-! Current revisions:
+ SUBROUTINE init_pt_anomaly
+
+!------------------------------------------------------------------------------!
+! Actual revisions:
 ! -----------------
-!
+! 
 !
 ! Former revisions:
 ! -----------------
-! $Id$
-! file re-formatted to follow the PALM coding standard
+! $Log: init_pt_anomaly.f90,v $
+! Revision 1.7  2005/03/26 20:36:55  raasch
+! Arguments for non-cyclic boundary conditions added to argument list of
+! routine exchange_horiz
 !
-! 4457 2020-03-11 14:20:43Z raasch
-! use statement for exchange horiz added
+! Revision 1.6  2001/03/30 07:32:28  raasch
+! Translation of remaining German identifiers (variables, subroutines, etc.)
 !
-! 4360 2020-01-07 11:25:50Z suehring
-! Introduction of wall_flags_total_0, which currently sets bits based on static topography
-! information used in wall_flags_static_0
+! Revision 1.5  2001/01/22 19:40:09  letzel
+! All comments translated into English.
 !
-! 4329 2019-12-10 15:46:36Z motisi
-! Renamed wall_flags_0 to wall_flags_static_0
+! Revision 1.4  2001/01/22 07:19:14  raasch
+! Module test_variables removed
 !
-! 4182 2019-08-22 15:20:23Z scharf
-! Corrected "Former revisions" section
+! Revision 1.3  1998/07/06 12:17:25  raasch
+! + USE test_variables
 !
-! 3655 2019-01-07 16:51:22Z knoop
-! Added topography flags
+! Revision 1.2  1997/09/12 06:26:16  raasch
+! Stoerungsradius jetzt proportional zur Gitterweite
 !
 ! Revision 1.1  1997/08/29 08:58:56  raasch
@@ -48,110 +34,50 @@
 ! Description:
 ! ------------
-!> Impose a temperature perturbation for an advection test.
-!--------------------------------------------------------------------------------------------------!
- SUBROUTINE init_pt_anomaly
+! Impose a temperature perturbation for an advection test.
+!------------------------------------------------------------------------------!
 
-
-    USE arrays_3d,                                                                                 &
-        ONLY:  pt, zu
-
+    USE arrays_3d
+    USE constants
+    USE grid_variables
+    USE indices
     USE control_parameters
-
-    USE exchange_horiz_mod,                                                                        &
-        ONLY:  exchange_horiz
-
-    USE grid_variables,                                                                            &
-        ONLY:  dx, dy
-
-    USE indices,                                                                                   &
-        ONLY:  nbgp, nx, nxl, nxr, ny, nyn, nys, nzb, nzt, wall_flags_total_0
-
-    USE kinds
 
     IMPLICIT NONE
 
-    INTEGER(iwp) ::  i  !< grid index along x
-    INTEGER(iwp) ::  ic !< center index along x
-    INTEGER(iwp) ::  j  !< grid index along y
-    INTEGER(iwp) ::  jc !< center index along y
-    INTEGER(iwp) ::  k  !< grid index along z
-    INTEGER(iwp) ::  kc !< center index along z
-
-    REAL(wp)     ::  amount                               !< amount of temperature perturbation
-    REAL(wp)     ::  bubble_center_y                      !< center of bubble in y
-    REAL(wp)     ::  bubble_center_z = 170.0              !< center of bubble in z
-    REAL(wp)     ::  bubble_sigma_y = 300.0               !< width of bubble in y
-    REAL(wp)     ::  bubble_sigma_z = 150.0               !< width of bubble in z
-    REAL(wp)     ::  flag                                 !< flag to mask topography grid points
-    REAL(wp)     ::  initial_temperature_difference = 0.4 !< temperature perturbation for bubble in K
-    REAL(wp)     ::  radius                               !< radius of pt anomaly
-    REAL(wp)     ::  rc                                   !< radius of pt anomaly
-    REAL(wp)     ::  x                                    !< x dimension of pt anomaly
-    REAL(wp)     ::  y                                    !< y dimension of pt anomaly
-    REAL(wp)     ::  z                                    !< z dimension of pt anomaly
-
+    INTEGER ::  i, ic, j, jc, k, kc
+    REAL    ::  betrag, radius, rc, x, y, z
 
 !
 !-- Defaults: radius rc, strength z,
-!--           position of center: ic, jc, kc
-    rc =  10.0_wp * dx
+!--           position of centre: ic, jc, kc
+    rc =  10.0 * dx
     ic =  ( nx+1 ) / 2
     jc =  ic
-    kc =  nzt / 2
+    kc = nzt / 2
 
-    IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 )  THEN
 !
-!--    Compute the perturbation.
-       DO  i = nxl, nxr
-          DO  j = nys, nyn
-             DO  k = nzb+1, nzt
-!
-!--             Predetermine flag to mask topography
-                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
+!-- Compute the perturbation.
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt-1
+             x = ( i - ic ) * dx
+             y = ( j - jc ) * dy
+             z = ABS( zu(k) - zu(kc) )
+             radius = SQRT( x**2 + y**2 + z**2 )
+             IF ( radius <= rc )  THEN
+                betrag = 5.0 * EXP( -( radius / 2.0 )**2 )
+             ELSE
+                betrag = 0.0
+             ENDIF
 
-                x = ( i - ic ) * dx
-                y = ( j - jc ) * dy
-                z = ABS( zu(k) - zu(kc) )
-                radius = SQRT( x**2 + y**2 + z**2 )
-                IF ( radius <= rc )  THEN
-                   amount = 5.0_wp * EXP( -( radius * 0.001_wp / 2.0_wp )**2 )
-                ELSE
-                   amount = 0.0_wp
-                ENDIF
+             pt(k,j,i) = pt(k,j,i) + betrag
 
-                pt(k,j,i) = pt(k,j,i) + amount * flag
-
-             ENDDO
           ENDDO
        ENDDO
-
-!
-!-- Initialize warm air bubble close to surface and homogenous elegonated along x-Axis
-    ELSEIF ( INDEX( initializing_actions, 'initialize_bubble' ) /= 0 )  THEN
-!
-!--    Calculate y-center of model domain
-       bubble_center_y = ( ny + 1.0 ) * dy / 2.0
-
-!
-!--    Compute perturbation for potential temperaure
-       DO  i = nxl, nxr
-          DO  j = nys, nyn
-             DO  k = nzb+1, nzt
-!
-!--             Predetermine flag to mask topography
-                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0 ) )
-
-                pt(k,j,i) = pt(k,j,i) +                                                            &
-                               EXP( -0.5 * ( (j* dy - bubble_center_y) / bubble_sigma_y )**2) *    &
-                               EXP( -0.5 * ( (zu(k) - bubble_center_z) / bubble_sigma_z)**2)  *    &
-                               initial_temperature_difference * flag
-             ENDDO
-          ENDDO
-       ENDDO
-    ENDIF
+    ENDDO
 
 !
 !-- Exchange of boundary values for temperature
-    CALL exchange_horiz( pt, nbgp )
+    CALL exchange_horiz( pt, 0, 0 )
 
 
