Index: palm/trunk/SOURCE/diffusion_w.f90
===================================================================
--- palm/trunk/SOURCE/diffusion_w.f90	(revision 1323)
+++ palm/trunk/SOURCE/diffusion_w.f90	(revision 1340)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-!
+! REAL constants defined as wp-kind
 !
 ! Former revisions:
@@ -158,10 +158,10 @@
                       &   km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1)  &
                       & - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k)  &
-                      &         ) * ddzu(k+1)
+                      &            ) * ddzu(k+1)
              ENDDO
 
 !
 !--          Wall functions at all vertical walls, where necessary
-             IF ( wall_w_x(j,i) /= 0.0  .OR.  wall_w_y(j,i) /= 0.0 )  THEN
+             IF ( wall_w_x(j,i) /= 0.0_wp  .OR.  wall_w_y(j,i) /= 0.0_wp )  THEN
 
                 DO  k = nzb_w_inner(j,i)+1, nzb_w_outer(j,i)
@@ -198,8 +198,8 @@
                                      + wall_w_y(j,i) * wsvs(k,j,i)             &
                                    ) * ddy                                     &
-                                 + 2.0 * (                                     &
+                                 + 2.0_wp * (                                  &
                            km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) &
                          - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k) &
-                                         ) * ddzu(k+1)
+                                            ) * ddzu(k+1)
                 ENDDO
              ENDIF
@@ -288,5 +288,5 @@
                          &   km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) &
                          & - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k) &
-                         &         ) * ddzu(k+1)
+                         &            ) * ddzu(k+1)
                 ENDIF
              ENDDO
@@ -297,5 +297,5 @@
 
                 IF ( k > nzb_w_inner(j,i)  .AND.  k <= nzb_w_outer(j,i)  .AND. &
-                     wall_w_x(j,i) /= 0.0  .AND.  wall_w_y(j,i) /= 0.0 )  THEN
+                     wall_w_x(j,i) /= 0.0_wp  .AND.  wall_w_y(j,i) /= 0.0_wp )  THEN
 !
 !--                Interpolate eddy diffusivities on staggered gridpoints
@@ -330,8 +330,8 @@
                                      + wall_w_y(j,i) * wsvs(k,j,i)             &
                                    ) * ddy                                     &
-                                 + 2.0 * (                                     &
+                                 + 2.0_wp * (                                  &
                            km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) &
                          - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k) &
-                                         ) * ddzu(k+1)
+                                            ) * ddzu(k+1)
                 ENDIF
              ENDDO
@@ -400,25 +400,25 @@
                       &   km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1)  &
                       & - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k)  &
-                      &         ) * ddzu(k+1)
+                      &            ) * ddzu(k+1)
        ENDDO
 
 !
 !--    Wall functions at all vertical walls, where necessary
-       IF ( wall_w_x(j,i) /= 0.0  .OR.  wall_w_y(j,i) /= 0.0 )  THEN
+       IF ( wall_w_x(j,i) /= 0.0_wp  .OR.  wall_w_y(j,i) /= 0.0_wp )  THEN
 
 !
 !--       Calculate the horizontal momentum fluxes w'u' and/or w'v'
-          IF ( wall_w_x(j,i) /= 0.0 )  THEN
+          IF ( wall_w_x(j,i) /= 0.0_wp )  THEN
              CALL wall_fluxes( i, j, nzb_w_inner(j,i)+1, nzb_w_outer(j,i),     &
                                wsus, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp )
           ELSE
-             wsus = 0.0
+             wsus = 0.0_wp
           ENDIF
 
-          IF ( wall_w_y(j,i) /= 0.0 )  THEN
+          IF ( wall_w_y(j,i) /= 0.0_wp )  THEN
              CALL wall_fluxes( i, j, nzb_w_inner(j,i)+1, nzb_w_outer(j,i),     &
                                wsvs, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp )
           ELSE
-             wsvs = 0.0
+             wsvs = 0.0_wp
           ENDIF
 
@@ -452,8 +452,8 @@
                                      + wall_w_y(j,i) * wsvs(k)                 &
                                    ) * ddy                                     &
-                                 + 2.0 * (                                     &
+                                 + 2.0_wp * (                                  &
                            km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) &
                          - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k) &
-                                         ) * ddzu(k+1)
+                                            ) * ddzu(k+1)
           ENDDO
        ENDIF
