Index: palm/trunk/SOURCE/diffusion_s.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_s.f90	(revision 4182)
+++ palm/trunk/SOURCE/diffusion_s.f90	(revision 4329)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Renamed wall_flags_0 to wall_flags_static_0
+! 
+! 4182 2019-08-22 15:20:23Z scharf
 ! Corrected "Former revisions" section
 ! 
@@ -83,5 +86,5 @@
        
        USE indices,                                                            &
-           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt, wall_flags_0
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt, wall_flags_static_0
        
        USE kinds
@@ -132,5 +135,5 @@
        !$ACC PRIVATE(surf_e, surf_s, flag, mask_top, mask_bottom) &
        !$ACC PRIVATE(mask_north, mask_south, mask_west, mask_east) &
-       !$ACC PRESENT(wall_flags_0, kh) &
+       !$ACC PRESENT(wall_flags_static_0, kh) &
        !$ACC PRESENT(s) &
        !$ACC PRESENT(ddzu, ddzw, drho_air, rho_air_zw) &
@@ -156,12 +159,12 @@
 !
 !--             Predetermine flag to mask topography and wall-bounded grid points
-                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) ) 
 !
 !--             Predetermine flag to mask wall-bounded grid points, equivalent to
 !--             former s_outer array
-                mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 0 ) )
-                mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 0 ) )
-                mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 0 ) )
-                mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 0 ) )
+                mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i-1), 0 ) )
+                mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i+1), 0 ) )
+                mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j-1,i), 0 ) )
+                mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j+1,i), 0 ) )
 
                 tend(k,j,i) = tend(k,j,i)                                      &
@@ -297,11 +300,11 @@
 !--             flux at model top. 
                 mask_bottom = MERGE( 1.0_wp, 0.0_wp,                           &
-                                     BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+                                     BTEST( wall_flags_static_0(k-1,j,i), 8 ) ) 
                 mask_top    = MERGE( 1.0_wp, 0.0_wp,                           &
-                                     BTEST( wall_flags_0(k+1,j,i), 8 ) ) *     &
+                                     BTEST( wall_flags_static_0(k+1,j,i), 8 ) ) *     &
                               MERGE( 1.0_wp, 0.0_wp,                           &
-                                     BTEST( wall_flags_0(k+1,j,i), 9 ) ) 
+                                     BTEST( wall_flags_static_0(k+1,j,i), 9 ) ) 
                 flag        = MERGE( 1.0_wp, 0.0_wp,                           &
-                                     BTEST( wall_flags_0(k,j,i), 0 ) )
+                                     BTEST( wall_flags_static_0(k,j,i), 0 ) )
 
                 tend(k,j,i) = tend(k,j,i)                                      &
@@ -412,5 +415,5 @@
        
        USE indices,                                                            &
-           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0
+           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_static_0
        
        USE kinds
@@ -462,12 +465,12 @@
 !
 !--       Predetermine flag to mask topography and wall-bounded grid points
-          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0 ) ) 
 !
 !--       Predetermine flag to mask wall-bounded grid points, equivalent to
 !--       former s_outer array
-          mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 0 ) )
-          mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 0 ) )
-          mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 0 ) )
-          mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 0 ) )
+          mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i-1), 0 ) )
+          mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i+1), 0 ) )
+          mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j-1,i), 0 ) )
+          mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j+1,i), 0 ) )
 !
 !--       Finally, determine flag to mask both topography itself as well
@@ -607,11 +610,11 @@
 !--       flux at model top.   
           mask_bottom = MERGE( 1.0_wp, 0.0_wp,                                 &
-                               BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+                               BTEST( wall_flags_static_0(k-1,j,i), 8 ) ) 
           mask_top    = MERGE( 1.0_wp, 0.0_wp,                                 &
-                               BTEST( wall_flags_0(k+1,j,i), 8 ) )  *          &
+                               BTEST( wall_flags_static_0(k+1,j,i), 8 ) )  *          &
                         MERGE( 1.0_wp, 0.0_wp,                                 &
-                               BTEST( wall_flags_0(k+1,j,i), 9 ) )
+                               BTEST( wall_flags_static_0(k+1,j,i), 9 ) )
           flag        = MERGE( 1.0_wp, 0.0_wp,                                 &
-                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                               BTEST( wall_flags_static_0(k,j,i), 0 ) )
 
           tend(k,j,i) = tend(k,j,i)                                            &
