Index: palm/trunk/SOURCE/production_e.f90
===================================================================
--- palm/trunk/SOURCE/production_e.f90	(revision 139)
+++ palm/trunk/SOURCE/production_e.f90	(revision 187)
@@ -4,5 +4,6 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Change: add 'minus' sign to fluxes obtained from subroutine wall_fluxes_e for
+!         consistency with subroutine wall_fluxes
 !
 ! Former revisions:
@@ -164,10 +165,10 @@
                       CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                           usvs, 1.0, 0.0, 0.0, 0.0 )
-                      dudy = wall_e_y(j,i) * usvs(k) / km(k,j,i)
-!                      dudy = wall_e_y(j,i) * usvs(k,j,i) / km(k,j,i)
+                      dudy = - wall_e_y(j,i) * usvs(k) / km(k,j,i)
+!                      dudy = - wall_e_y(j,i) * usvs(k,j,i) / km(k,j,i)
                       CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                           wsvs, 0.0, 0.0, 1.0, 0.0 )
-                      dwdy = wall_e_y(j,i) * wsvs(k) / km(k,j,i)
-!                      dwdy = wall_e_y(j,i) * wsvs(k,j,i) / km(k,j,i)
+                      dwdy = - wall_e_y(j,i) * wsvs(k) / km(k,j,i)
+!                      dwdy = - wall_e_y(j,i) * wsvs(k,j,i) / km(k,j,i)
                    ELSE
                       dudy = 0.25 * ( u(k,j+1,i) + u(k,j+1,i+1) - &
@@ -180,10 +181,10 @@
                       CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                           vsus, 0.0, 1.0, 0.0, 0.0 )
-                      dvdx = wall_e_x(j,i) * vsus(k) / km(k,j,i)
-!                      dvdx = wall_e_x(j,i) * vsus(k,j,i) / km(k,j,i)
+                      dvdx = - wall_e_x(j,i) * vsus(k) / km(k,j,i)
+!                      dvdx = - wall_e_x(j,i) * vsus(k,j,i) / km(k,j,i)
                       CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                           wsus, 0.0, 0.0, 0.0, 1.0 )
-                      dwdx = wall_e_x(j,i) * wsus(k) / km(k,j,i)
-!                      dwdx = wall_e_x(j,i) * wsus(k,j,i) / km(k,j,i)
+                      dwdx = - wall_e_x(j,i) * wsus(k) / km(k,j,i)
+!                      dwdx = - wall_e_x(j,i) * wsus(k,j,i) / km(k,j,i)
                    ELSE
                       dvdx = 0.25 * ( v(k,j,i+1) + v(k,j+1,i+1) - &
@@ -220,8 +221,8 @@
 
                       IF ( wall_e_y(j,i) /= 0.0 )  THEN
-                         dudy = wall_e_y(j,i) * usvs(k) / km(k,j,i)
-!                         dudy = wall_e_y(j,i) * usvs(k,j,i) / km(k,j,i)
-                         dwdy = wall_e_y(j,i) * wsvs(k) / km(k,j,i)
-!                         dwdy = wall_e_y(j,i) * wsvs(k,j,i) / km(k,j,i)
+                         dudy = - wall_e_y(j,i) * usvs(k) / km(k,j,i)
+!                         dudy = - wall_e_y(j,i) * usvs(k,j,i) / km(k,j,i)
+                         dwdy = - wall_e_y(j,i) * wsvs(k) / km(k,j,i)
+!                         dwdy = - wall_e_y(j,i) * wsvs(k,j,i) / km(k,j,i)
                       ELSE
                          dudy = 0.25 * ( u(k,j+1,i) + u(k,j+1,i+1) - &
@@ -232,8 +233,8 @@
 
                       IF ( wall_e_x(j,i) /= 0.0 )  THEN
-                         dvdx = wall_e_x(j,i) * vsus(k) / km(k,j,i)
-!                         dvdx = wall_e_x(j,i) * vsus(k,j,i) / km(k,j,i)
-                         dwdx = wall_e_x(j,i) * wsus(k) / km(k,j,i)
-!                         dwdx = wall_e_x(j,i) * wsus(k,j,i) / km(k,j,i)
+                         dvdx = - wall_e_x(j,i) * vsus(k) / km(k,j,i)
+!                         dvdx = - wall_e_x(j,i) * vsus(k,j,i) / km(k,j,i)
+                         dwdx = - wall_e_x(j,i) * wsus(k) / km(k,j,i)
+!                         dwdx = - wall_e_x(j,i) * wsus(k,j,i) / km(k,j,i)
                       ELSE
                          dvdx = 0.25 * ( v(k,j,i+1) + v(k,j+1,i+1) - &
@@ -629,8 +630,8 @@
                 CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                     usvs, 1.0, 0.0, 0.0, 0.0 )
-                dudy = wall_e_y(j,i) * usvs(k) / km(k,j,i)
+                dudy = - wall_e_y(j,i) * usvs(k) / km(k,j,i)
                 CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                     wsvs, 0.0, 0.0, 1.0, 0.0 )
-                dwdy = wall_e_y(j,i) * wsvs(k) / km(k,j,i)
+                dwdy = - wall_e_y(j,i) * wsvs(k) / km(k,j,i)
              ELSE
                 dudy = 0.25 * ( u(k,j+1,i) + u(k,j+1,i+1) - &
@@ -643,8 +644,8 @@
                 CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                     vsus, 0.0, 1.0, 0.0, 0.0 )
-                dvdx = wall_e_x(j,i) * vsus(k) / km(k,j,i)
+                dvdx = - wall_e_x(j,i) * vsus(k) / km(k,j,i)
                 CALL wall_fluxes_e( i, j, k, nzb_diff_s_outer(j,i)-2, &
                                     wsus, 0.0, 0.0, 0.0, 1.0 )
-                dwdx = wall_e_x(j,i) * wsus(k) / km(k,j,i)
+                dwdx = - wall_e_x(j,i) * wsus(k) / km(k,j,i)
              ELSE
                 dvdx = 0.25 * ( v(k,j,i+1) + v(k,j+1,i+1) - &
@@ -679,6 +680,6 @@
 
                 IF ( wall_e_y(j,i) /= 0.0 )  THEN
-                   dudy = wall_e_y(j,i) * usvs(k) / km(k,j,i)
-                   dwdy = wall_e_y(j,i) * wsvs(k) / km(k,j,i)
+                   dudy = - wall_e_y(j,i) * usvs(k) / km(k,j,i)
+                   dwdy = - wall_e_y(j,i) * wsvs(k) / km(k,j,i)
                 ELSE
                    dudy = 0.25 * ( u(k,j+1,i) + u(k,j+1,i+1) - &
@@ -689,6 +690,6 @@
 
                 IF ( wall_e_x(j,i) /= 0.0 )  THEN
-                   dvdx = wall_e_x(j,i) * vsus(k) / km(k,j,i)
-                   dwdx = wall_e_x(j,i) * wsus(k) / km(k,j,i)
+                   dvdx = - wall_e_x(j,i) * vsus(k) / km(k,j,i)
+                   dwdx = - wall_e_x(j,i) * wsus(k) / km(k,j,i)
                 ELSE
                    dvdx = 0.25 * ( v(k,j,i+1) + v(k,j+1,i+1) - &
