Index: palm/trunk/SOURCE/advec_v_up.f90
===================================================================
--- palm/trunk/SOURCE/advec_v_up.f90	(revision 2718)
+++ palm/trunk/SOURCE/advec_v_up.f90	(revision 3538)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Remove unnecessary double-masking of topography
+! 
+! 2718 2018-01-02 08:49:38Z maronga
 ! Corrected "Former revisions" section
 ! 
@@ -104,5 +107,5 @@
 
        USE indices,                                                            &
-           ONLY:  nxl, nxr, nyn, nysv, nzb, nzt, wall_flags_0
+           ONLY:  nxl, nxr, nyn, nysv, nzb, nzt
 
        USE kinds
@@ -129,12 +132,8 @@
                 IF ( ukomp > 0.0_wp )  THEN
                    tend(k,j,i) = tend(k,j,i) - ukomp *                         &
-                                         ( v(k,j,i) - v(k,j,i-1) ) * ddx       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i) - v(k,j,i-1) ) * ddx
                 ELSE
                    tend(k,j,i) = tend(k,j,i) - ukomp *                         &
-                                         ( v(k,j,i+1) - v(k,j,i) ) * ddx       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i+1) - v(k,j,i) ) * ddx
                 ENDIF
 !
@@ -143,12 +142,8 @@
                 IF ( vkomp > 0.0_wp )  THEN
                    tend(k,j,i) = tend(k,j,i) - vkomp *                         &
-                                         ( v(k,j,i) - v(k,j-1,i) ) * ddy       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i) - v(k,j-1,i) ) * ddy
                 ELSE
                    tend(k,j,i) = tend(k,j,i) - vkomp *                         &
-                                         ( v(k,j+1,i) - v(k,j,i) ) * ddy       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j+1,i) - v(k,j,i) ) * ddy
                 ENDIF
 !
@@ -158,12 +153,8 @@
                 IF ( wkomp > 0.0_wp )  THEN
                    tend(k,j,i) = tend(k,j,i) - wkomp *                         &
-                                         ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)   &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)
                 ELSE
                    tend(k,j,i) = tend(k,j,i) - wkomp *                         &
-                                         ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)
                 ENDIF
 
@@ -192,5 +183,5 @@
 
        USE indices,                                                            &
-           ONLY:  nzb, nzt, wall_flags_0
+           ONLY:  nzb, nzt
 
        USE kinds
@@ -215,12 +206,8 @@
           IF ( ukomp > 0.0_wp )  THEN
              tend(k,j,i) = tend(k,j,i) - ukomp *                               &
-                                         ( v(k,j,i) - v(k,j,i-1) ) * ddx       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i) - v(k,j,i-1) ) * ddx
           ELSE
              tend(k,j,i) = tend(k,j,i) - ukomp *                               &
-                                         ( v(k,j,i+1) - v(k,j,i) ) * ddx       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i+1) - v(k,j,i) ) * ddx
           ENDIF
 !
@@ -229,12 +216,8 @@
           IF ( vkomp > 0.0_wp )  THEN
              tend(k,j,i) = tend(k,j,i) - vkomp *                               &
-                                         ( v(k,j,i) - v(k,j-1,i) ) * ddy       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i) - v(k,j-1,i) ) * ddy
           ELSE
              tend(k,j,i) = tend(k,j,i) - vkomp *                               &
-                                         ( v(k,j+1,i) - v(k,j,i) ) * ddy       &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j+1,i) - v(k,j,i) ) * ddy
           ENDIF
 !
@@ -243,12 +226,8 @@
           IF ( wkomp > 0.0_wp )  THEN
              tend(k,j,i) = tend(k,j,i) - wkomp *                               &
-                                         ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)   &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)
           ELSE
              tend(k,j,i) = tend(k,j,i) - wkomp *                               &
-                                         ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) &
-                                      * MERGE( 1.0_wp, 0.0_wp,                 &
-                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                                         ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)
           ENDIF
 
