Index: palm/trunk/SOURCE/data_output_mask.f90
===================================================================
--- palm/trunk/SOURCE/data_output_mask.f90	(revision 4331)
+++ palm/trunk/SOURCE/data_output_mask.f90	(revision 4346)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Introduction of wall_flags_total_0, which currently sets bits based on static
+! topography information used in wall_flags_static_0
+! 
+! 4331 2019-12-10 18:25:02Z suehring
 ! Formatting adjustment
 ! 
@@ -97,5 +101,5 @@
 
     USE indices,                                                               &
-        ONLY:  nbgp, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_static_0
+        ONLY:  nbgp, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_total_0
 
     USE kinds
@@ -267,10 +271,10 @@
                          im = mask_i(mid,i)
                          jm = mask_j(mid,j)
-                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )),&
+                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )),&
                                        DIM = 1 ) - 1
                          DO  k = 1, mask_size_l(mid,3)
                             kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                         Set value if not in building
-                            IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
+                            IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
                                local_pf(i,j,k) = fill_value
                             ELSE
@@ -336,9 +340,10 @@
                          im = mask_i(mid,i)
                          jm = mask_j(mid,j)
-                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &
+                                         DIM = 1 ) - 1
                          DO  k = 1, mask_size_l(mid,3)
                             kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                         Set value if not in building
-                            IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
+                            IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
                                local_pf(i,j,k) = fill_value
                             ELSE
@@ -379,9 +384,10 @@
                             im = mask_i(mid,i)
                             jm = mask_j(mid,j)
-                            ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                            ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &
+                                             DIM = 1 ) - 1
                             DO  k = 1, mask_size_l(mid,3)
                                kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                            Set value if not in building
-                               IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
+                               IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
                                   local_pf(i,j,k) = fill_value
                                ELSE
@@ -473,9 +479,10 @@
                          im = mask_i(mid,i)
                          jm = mask_j(mid,j)
-                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &
+                                          DIM = 1 ) - 1
                          DO  k = 1, mask_size_l(mid,3)
                             kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                         Set value if not in building
-                            IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
+                            IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
                                local_pf(i,j,k) = fill_value
                             ELSE
@@ -512,9 +519,10 @@
                          im = mask_i(mid,i)
                          jm = mask_j(mid,j)
-                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                         ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &
+                                          DIM = 1 ) - 1
                          DO  k = 1, mask_size_l(mid,3)
                             kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                         Set value if not in building
-                            IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
+                            IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
                                local_pf(i,j,k) = fill_value
                             ELSE
@@ -654,9 +662,10 @@
                    im = mask_i(mid,i)
                    jm = mask_j(mid,j)
-                   ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_static_0(:,jm,im), 5 )), DIM = 1 ) - 1
+                   ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &
+                                    DIM = 1 ) - 1
                    DO  k = 1, mask_size_l(mid,3)
                       kk = MIN( ktt+mask_k(mid,k), nzt+1 )
 !--                   Set value if not in building
-                      IF ( BTEST( wall_flags_static_0(kk,jm,im), 6 ) )  THEN
+                      IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) )  THEN
                          local_pf(i,j,k) = fill_value
                       ELSE
