Index: palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90
===================================================================
--- palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90	(revision 4331)
+++ palm/trunk/SOURCE/diagnostic_output_quantities_mod.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
 ! - Modularize 2-m potential temperature output
 ! - New output for 10-m wind speed
@@ -114,5 +118,5 @@
                nzb,                                                            &
                nzt,                                                            &
-               wall_flags_static_0
+               wall_flags_total_0
 
     USE kinds
@@ -704,6 +708,6 @@
              DO  k = nzb_do, nzt_do
                 local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),                &
-                                         REAL( fill_value, KIND = wp ),        &
-                                         BTEST( wall_flags_static_0(k,j,i), flag_nr ) ) 
+                                     REAL( fill_value, KIND = wp ),            &
+                                     BTEST( wall_flags_total_0(k,j,i), flag_nr ) ) 
              ENDDO
           ENDDO
@@ -807,6 +811,6 @@
              DO  k = nzb_do, nzt_do
                 local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),                &
-                                         REAL( fill_value, KIND = wp ),        &
-                                         BTEST( wall_flags_static_0(k,j,i), flag_nr ) ) 
+                                     REAL( fill_value, KIND = wp ),            &
+                                     BTEST( wall_flags_total_0(k,j,i), flag_nr ) ) 
              ENDDO
           ENDDO
@@ -924,5 +928,5 @@
                 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)
@@ -930,5 +934,5 @@
 !
 !--                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
@@ -1071,5 +1075,5 @@
                           - (   u(k,j+1,i) + u(k,j+1,i+1)                      &
                               - u(k,j-1,i) - u(k,j-1,i+1) ) * ddy     )**2  )  &
-                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 0) )
+                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 0) )
                    ENDDO
                 ENDDO
@@ -1082,5 +1086,5 @@
                    DO  k = nzb+1, nzt
                       uu(k,j,i) = u(k,j,i) * u(k,j,i)                          &
-                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 1) )
+                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 1) )
                    ENDDO
                 ENDDO
@@ -1093,5 +1097,5 @@
                    DO  k = nzb+1, nzt
                       vv(k,j,i) = v(k,j,i) * v(k,j,i)                          &
-                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 2) )
+                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 2) )
                    ENDDO
                 ENDDO
@@ -1104,5 +1108,5 @@
                    DO  k = nzb+1, nzt-1
                       ww(k,j,i) = w(k,j,i) * w(k,j,i)                          &
-                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_static_0(k,j,i), 3) )
+                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_total_0(k,j,i), 3) )
                    ENDDO
                 ENDDO
