Index: palm/trunk/SOURCE/pres.f90
===================================================================
--- palm/trunk/SOURCE/pres.f90	(revision 4329)
+++ palm/trunk/SOURCE/pres.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
+! 
+! 4329 2019-12-10 15:46:36Z motisi
 ! Renamed wall_flags_0 to wall_flags_static_0
 ! 
@@ -72,5 +76,5 @@
         ONLY:  nbgp, ngp_2dh_outer, nx, nxl, nxlg, nxl_mg, nxr, nxrg, nxr_mg,  &
                ny, nys, nysg, nys_mg, nyn, nyng, nyn_mg, nzb, nzt, nzt_mg,     &
-               wall_flags_static_0
+               wall_flags_total_0
 
     USE kinds
@@ -190,5 +194,5 @@
              volume_flow_l(1) = volume_flow_l(1) + u(k,j,i) * dzw(k)           &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 1 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 1 )  &
                                             )
           ENDDO
@@ -209,5 +213,5 @@
              u(k,j,i) = u(k,j,i) + volume_flow_offset(1)                       &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 1 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 1 )  &
                                             )
           ENDDO
@@ -235,5 +239,5 @@
              volume_flow_l(2) = volume_flow_l(2) + v(k,j,i) * dzw(k)           &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 2 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 2 )  &
                                             )
           ENDDO
@@ -254,5 +258,5 @@
              v(k,j,i) = v(k,j,i) + volume_flow_offset(2)                       &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 2 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 2 )  &
                                             )
           ENDDO
@@ -283,5 +287,5 @@
              DO  k = nzb+1, nzt
                 w_l_l(k) = w_l_l(k) + 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
@@ -300,5 +304,5 @@
              DO  k = nzb+1, nzt
                 w(k,j,i) = w(k,j,i) - w_l(k)                                                       &
-                                     * 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
@@ -347,5 +351,5 @@
                         ) * ddt_3d * d_weight_pres                             &
                                    * MERGE( 1.0_wp, 0.0_wp,                    &
-                                            BTEST( wall_flags_static_0(k,j,i), 0 )    &
+                                      BTEST( wall_flags_total_0(k,j,i), 0 )    &
                                           )
           ENDDO
@@ -355,5 +359,5 @@
              threadsum = threadsum + ABS( d(k,j,i) )                           &
                                    * MERGE( 1.0_wp, 0.0_wp,                    &
-                                            BTEST( wall_flags_static_0(k,j,i), 0 )    &
+                                      BTEST( wall_flags_total_0(k,j,i), 0 )    &
                                           )
           ENDDO
@@ -372,5 +376,5 @@
     !$OMP DO SCHEDULE( STATIC )
     !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k) &
-    !$ACC PRESENT(u, v, w, rho_air, rho_air_zw, ddzw, wall_flags_static_0) &
+    !$ACC PRESENT(u, v, w, rho_air, rho_air_zw, ddzw, wall_flags_total_0) &
     !$ACC PRESENT(d)
     DO  i = nxl, nxr
@@ -383,5 +387,5 @@
                         ) * ddt_3d * d_weight_pres                             &
                                    * MERGE( 1.0_wp, 0.0_wp,                    &
-                                            BTEST( wall_flags_static_0(k,j,i), 0 )    &
+                                      BTEST( wall_flags_total_0(k,j,i), 0 )    &
                                           )     
           ENDDO
@@ -633,5 +637,5 @@
     !$OMP DO
     !$ACC PARALLEL LOOP COLLAPSE(2) PRIVATE(i, j, k) &
-    !$ACC PRESENT(u, v, w, tend, ddzu, wall_flags_static_0)
+    !$ACC PRESENT(u, v, w, tend, ddzu, wall_flags_total_0)
     DO  i = nxl, nxr   
        DO  j = nys, nyn
@@ -642,5 +646,5 @@
                                      * weight_pres_l                           &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 3 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 3 )  &
                                             )
           ENDDO
@@ -651,5 +655,5 @@
                                      * weight_pres_l                           &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 1 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 1 )  &
                                             )
           ENDDO
@@ -660,5 +664,5 @@
                                      * weight_pres_l                           &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 2 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 2 )  &
                                             )
           ENDDO                                                         
@@ -691,5 +695,5 @@
              volume_flow_l(1) = volume_flow_l(1) + u(k,j,nxr) * dzw(k)         &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,nxr), 1 )&
+                                        BTEST( wall_flags_total_0(k,j,nxr), 1 )&
                                             )
           ENDDO
@@ -710,5 +714,5 @@
              volume_flow_l(2) = volume_flow_l(2) + v(k,nyn,i) * dzw(k)         &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,nyn,i), 2 )&
+                                        BTEST( wall_flags_total_0(k,nyn,i), 2 )&
                                             )
            ENDDO
@@ -741,5 +745,5 @@
                 u(k,j,i) = u(k,j,i) + volume_flow_offset(1)                    &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 1 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 1 )  &
                                             )
              ENDDO
@@ -747,5 +751,5 @@
                 v(k,j,i) = v(k,j,i) + volume_flow_offset(2)                    &
                                      * MERGE( 1.0_wp, 0.0_wp,                  &
-                                              BTEST( wall_flags_static_0(k,j,i), 2 )  &
+                                        BTEST( wall_flags_total_0(k,j,i), 2 )  &
                                             )
              ENDDO
@@ -791,5 +795,5 @@
                             w(k-1,j,i) * rho_air_zw(k-1) ) * ddzw(k)           &
                         ) * MERGE( 1.0_wp, 0.0_wp,                             &
-                                   BTEST( wall_flags_static_0(k,j,i), 0 )             &
+                             BTEST( wall_flags_total_0(k,j,i), 0 )             &
                                  )
              ENDDO
@@ -802,5 +806,5 @@
        !$OMP DO SCHEDULE( STATIC )
        !$ACC PARALLEL LOOP COLLAPSE(3) PRIVATE(i, j, k) &
-       !$ACC PRESENT(u, v, w, rho_air, rho_air_zw, ddzw, wall_flags_static_0) &
+       !$ACC PRESENT(u, v, w, rho_air, rho_air_zw, ddzw, wall_flags_total_0) &
        !$ACC PRESENT(d)
        DO  i = nxl, nxr
@@ -812,5 +816,5 @@
                                w(k-1,j,i) * rho_air_zw(k-1) ) * ddzw(k)        &
                            ) * MERGE( 1.0_wp, 0.0_wp,                          &
-                                   BTEST( wall_flags_static_0(k,j,i), 0 )             &
+                             BTEST( wall_flags_total_0(k,j,i), 0 )             &
                                     )
              ENDDO
