Index: palm/trunk/SOURCE/init_masks.f90
===================================================================
--- palm/trunk/SOURCE/init_masks.f90	(revision 1325)
+++ palm/trunk/SOURCE/init_masks.f90	(revision 1353)
@@ -20,4 +20,5 @@
 ! Current revisions:
 ! -----------------
+! REAL constants provided with KIND-attribute
 !
 ! Former revisions:
@@ -150,22 +151,22 @@
        mask      (mid,3,:) = mask_z(mid,:) 
        
-       IF ( mask_x_loop(mid,1) == -1.0  .AND.  mask_x_loop(mid,2) == -1.0  &
-            .AND.  mask_x_loop(mid,3) == -1.0 )  THEN
-          mask_loop(mid,1,1:2) = -1.0
-          mask_loop(mid,1,3) = 0.0
+       IF ( mask_x_loop(mid,1) == -1.0_wp  .AND.  mask_x_loop(mid,2) == -1.0_wp&
+            .AND.  mask_x_loop(mid,3) == -1.0_wp )  THEN
+          mask_loop(mid,1,1:2) = -1.0_wp
+          mask_loop(mid,1,3)   =  0.0_wp
        ELSE
           mask_loop(mid,1,:) = mask_x_loop(mid,:)
        ENDIF
-       IF ( mask_y_loop(mid,1) == -1.0  .AND.  mask_y_loop(mid,2) == -1.0  &
-            .AND.  mask_y_loop(mid,3) == -1.0 )  THEN
-          mask_loop(mid,2,1:2) = -1.0
-          mask_loop(mid,2,3) = 0.0
+       IF ( mask_y_loop(mid,1) == -1.0_wp  .AND.  mask_y_loop(mid,2) == -1.0_wp&
+            .AND.  mask_y_loop(mid,3) == -1.0_wp )  THEN
+          mask_loop(mid,2,1:2) = -1.0_wp
+          mask_loop(mid,2,3)   =  0.0_wp
        ELSE
           mask_loop(mid,2,:) = mask_y_loop(mid,:)
        ENDIF
-       IF ( mask_z_loop(mid,1) == -1.0  .AND.  mask_z_loop(mid,2) == -1.0  &
-            .AND.  mask_z_loop(mid,3) == -1.0 )  THEN
-          mask_loop(mid,3,1:2) = -1.0
-          mask_loop(mid,3,3) = 0.0
+       IF ( mask_z_loop(mid,1) == -1.0_wp  .AND.  mask_z_loop(mid,2) == -1.0_wp&
+            .AND.  mask_z_loop(mid,3) == -1.0_wp )  THEN
+          mask_loop(mid,3,1:2) = -1.0_wp
+          mask_loop(mid,3,3)   =  0.0_wp
        ELSE
           mask_loop(mid,3,:) = mask_z_loop(mid,:)
@@ -521,13 +522,16 @@
        REAL(wp)      ::  tmp2  !:
 
-       count = 0;  count_l = 0;  ddxyz = 1.0 / dxyz;  tmp1 = 0.0;  tmp2 = 0.0
-
-       IF ( mask(mid,dim,1) >= 0.0 )  THEN
+       count = 0;  count_l = 0  
+       ddxyz = 1.0_wp / dxyz  
+       tmp1  = 0.0_wp
+       tmp2  = 0.0_wp
+
+       IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
 !
 !--       use predefined mask_* array
-          DO  WHILE ( mask(mid,dim,count+1) >= 0.0 )
+          DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
              count = count + 1
              IF ( dim == 1 .OR. dim == 2 )  THEN
-                m = NINT( mask(mid,dim,count) * mask_scale(dim) * ddxyz - 0.5 )
+                m = NINT( mask(mid,dim,count) * mask_scale(dim) * ddxyz - 0.5_wp )
              ELSEIF ( dim == 3 )  THEN
                 ind_array =  &
@@ -561,10 +565,10 @@
 !--       use predefined mask_loop_* array, or use the default (all grid points
 !--       along this direction)
-          IF ( mask_loop(mid,dim,1) < 0.0 )  THEN
+          IF ( mask_loop(mid,dim,1) < 0.0_wp )  THEN
              tmp1 = mask_loop(mid,dim,1)
              mask_loop(mid,dim,1) = zw(nzb)  !   lowest level  (default)
           ENDIF
           IF ( dim == 1 .OR. dim == 2 )  THEN
-             IF ( mask_loop(mid,dim,2) < 0.0 )  THEN
+             IF ( mask_loop(mid,dim,2) < 0.0_wp )  THEN
                 tmp2 = mask_loop(mid,dim,2)
                 mask_loop(mid,dim,2) = nxyz*dxyz / mask_scale(dim)   ! (default)
@@ -581,11 +585,11 @@
              ENDIF
              loop_begin  = NINT( mask_loop(mid,dim,1) * mask_scale(dim) &
-                  * ddxyz - 0.5 )
+                  * ddxyz - 0.5_wp )
              loop_end    = NINT( mask_loop(mid,dim,2) * mask_scale(dim) &
-                  * ddxyz - 0.5 )
+                  * ddxyz - 0.5_wp )
              loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim) &
                   * ddxyz )
           ELSEIF ( dim == 3 )  THEN
-             IF ( mask_loop(mid,dim,2) < 0.0 )  THEN
+             IF ( mask_loop(mid,dim,2) < 0.0_wp )  THEN
                 tmp2 = mask_loop(mid,dim,2)
                 mask_loop(mid,dim,2) = zu(nz) / mask_scale(dim)   ! (default)
@@ -627,6 +631,6 @@
 !
 !--       If necessary, reset mask_loop(mid,dim,1) and mask_loop(mid,dim,2).
-          IF ( tmp1 < 0.0 )  mask_loop(mid,dim,1) = tmp1
-          IF ( tmp2 < 0.0 )  mask_loop(mid,dim,2) = tmp2
+          IF ( tmp1 < 0.0_wp )  mask_loop(mid,dim,1) = tmp1
+          IF ( tmp2 < 0.0_wp )  mask_loop(mid,dim,2) = tmp2
 !
 !--       The default stride +/-1 (every grid point) applies if 
