Index: /palm/trunk/SOURCE/prognostic_equations.f90
===================================================================
--- /palm/trunk/SOURCE/prognostic_equations.f90	(revision 1336)
+++ /palm/trunk/SOURCE/prognostic_equations.f90	(revision 1337)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Bugfix: REAL constants provided with KIND-attribute
 ! 
 ! Former revisions:
@@ -299,5 +299,5 @@
           IF ( .NOT. outflow_l  .OR.  i > nxl )  THEN
 
-             tend(:,j,i) = 0.0
+             tend(:,j,i) = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge' )  THEN
                 IF ( ws_scheme_mom )  THEN
@@ -354,5 +354,5 @@
                          intermediate_timestep_count_max )  THEN
                    DO  k = nzb_u_inner(j,i)+1, nzt
-                      tu_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tu_m(k,j,i)
+                      tu_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tu_m(k,j,i)
                    ENDDO
                 ENDIF
@@ -365,5 +365,5 @@
           IF ( .NOT. outflow_s  .OR.  j > nys )  THEN
 
-             tend(:,j,i) = 0.0
+             tend(:,j,i) = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge' )  THEN
                 IF ( ws_scheme_mom )  THEN
@@ -413,5 +413,5 @@
                          intermediate_timestep_count_max )  THEN
                    DO  k = nzb_v_inner(j,i)+1, nzt
-                      tv_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tv_m(k,j,i)
+                      tv_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tv_m(k,j,i)
                    ENDDO
                 ENDIF
@@ -422,5 +422,5 @@
 !
 !--       Tendency terms for w-velocity component
-          tend(:,j,i) = 0.0
+          tend(:,j,i) = 0.0_wp
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_mom )  THEN
@@ -471,5 +471,5 @@
                       intermediate_timestep_count_max )  THEN
                 DO  k = nzb_w_inner(j,i)+1, nzt-1
-                   tw_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tw_m(k,j,i)
+                   tw_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tw_m(k,j,i)
                 ENDDO
              ENDIF
@@ -484,5 +484,5 @@
 !
 !--          Tendency terms for potential temperature
-             tend(:,j,i) = 0.0
+             tend(:,j,i) = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge' )  THEN
                    IF ( ws_scheme_sca )  THEN
@@ -516,5 +516,5 @@
 !
 !--          Consideration of heat sources within the plant canopy
-             IF ( plant_canopy  .AND.  cthf /= 0.0 )  THEN
+             IF ( plant_canopy  .AND.  cthf /= 0.0_wp )  THEN
                 CALL plant_canopy_model( i, j, 4 )
              ENDIF
@@ -551,6 +551,6 @@
                          intermediate_timestep_count_max )  THEN
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      tpt_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                      5.3125 * tpt_m(k,j,i)
+                      tpt_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                      5.3125_wp * tpt_m(k,j,i)
                    ENDDO
                 ENDIF
@@ -565,5 +565,5 @@
 !
 !--          Tendency-terms for salinity
-             tend(:,j,i) = 0.0
+             tend(:,j,i) = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge' ) &
              THEN
@@ -588,5 +588,5 @@
                                         - tsc(5) * rdf_sc(k) *                 &
                                           ( sa(k,j,i) - sa_init(k) )
-                IF ( sa_p(k,j,i) < 0.0 )  sa_p(k,j,i) = 0.1 * sa(k,j,i)
+                IF ( sa_p(k,j,i) < 0.0_wp )  sa_p(k,j,i) = 0.1_wp * sa(k,j,i)
              ENDDO
 
@@ -601,6 +601,6 @@
                          intermediate_timestep_count_max )  THEN
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      tsa_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                      5.3125 * tsa_m(k,j,i)
+                      tsa_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                      5.3125_wp * tsa_m(k,j,i)
                    ENDDO
                 ENDIF
@@ -620,5 +620,5 @@
 !
 !--          Tendency-terms for total water content / scalar
-             tend(:,j,i) = 0.0
+             tend(:,j,i) = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge' ) &
              THEN
@@ -666,5 +666,5 @@
                                       - tsc(5) * rdf_sc(k) *                   &
                                         ( q(k,j,i) - q_init(k) )
-                IF ( q_p(k,j,i) < 0.0 )  q_p(k,j,i) = 0.1 * q(k,j,i)
+                IF ( q_p(k,j,i) < 0.0_wp )  q_p(k,j,i) = 0.1_wp * q(k,j,i)
              ENDDO
 
@@ -679,6 +679,6 @@
                          intermediate_timestep_count_max )  THEN
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      tq_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                     5.3125 * tq_m(k,j,i)
+                      tq_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                     5.3125_wp * tq_m(k,j,i)
                    ENDDO
                 ENDIF
@@ -692,5 +692,5 @@
 !
 !--             Calculate prognostic equation for rain water content
-                tend(:,j,i) = 0.0
+                tend(:,j,i) = 0.0_wp
                 IF ( timestep_scheme(1:5) == 'runge' ) &
                 THEN
@@ -718,5 +718,5 @@
                                                        tsc(3) * tqr_m(k,j,i) ) &
                                            - tsc(5) * rdf_sc(k) * qr(k,j,i)
-                   IF ( qr_p(k,j,i) < 0.0 )  qr_p(k,j,i) = 0.0
+                   IF ( qr_p(k,j,i) < 0.0_wp )  qr_p(k,j,i) = 0.0_wp
                 ENDDO
 !
@@ -730,6 +730,6 @@
                             intermediate_timestep_count_max )  THEN
                       DO  k = nzb_s_inner(j,i)+1, nzt
-                         tqr_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                        5.3125 * tqr_m(k,j,i)
+                         tqr_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                        5.3125_wp * tqr_m(k,j,i)
                       ENDDO
                    ENDIF
@@ -738,5 +738,5 @@
 !
 !--             Calculate prognostic equation for rain drop concentration.
-                tend(:,j,i) = 0.0
+                tend(:,j,i) = 0.0_wp
                 IF ( timestep_scheme(1:5) == 'runge' )  THEN
                    IF ( ws_scheme_sca )  THEN
@@ -764,5 +764,5 @@
                                                        tsc(3) * tnr_m(k,j,i) ) &
                                            - tsc(5) * rdf_sc(k) * nr(k,j,i)
-                   IF ( nr_p(k,j,i) < 0.0 )  nr_p(k,j,i) = 0.0
+                   IF ( nr_p(k,j,i) < 0.0_wp )  nr_p(k,j,i) = 0.0_wp
                 ENDDO
 !
@@ -776,6 +776,6 @@
                             intermediate_timestep_count_max )  THEN
                       DO  k = nzb_s_inner(j,i)+1, nzt
-                         tnr_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                        5.3125 * tnr_m(k,j,i)
+                         tnr_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                        5.3125_wp * tnr_m(k,j,i)
                       ENDDO
                    ENDIF
@@ -793,5 +793,5 @@
 !
 !--          Tendency-terms for TKE
-             tend(:,j,i) = 0.0
+             tend(:,j,i) = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge'  &
                  .AND.  .NOT. use_upstream_for_tke )  THEN 
@@ -830,5 +830,5 @@
                 e_p(k,j,i) = e(k,j,i) + dt_3d * ( tsc(2) * tend(k,j,i) +       &
                                                   tsc(3) * te_m(k,j,i) )
-                IF ( e_p(k,j,i) < 0.0 )  e_p(k,j,i) = 0.1 * e(k,j,i)
+                IF ( e_p(k,j,i) < 0.0_wp )  e_p(k,j,i) = 0.1_wp * e(k,j,i)
              ENDDO
 
@@ -843,6 +843,6 @@
                          intermediate_timestep_count_max )  THEN
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      te_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                     5.3125 * te_m(k,j,i)
+                      te_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                     5.3125_wp * te_m(k,j,i)
                    ENDDO
                 ENDIF
@@ -880,5 +880,5 @@
     CALL cpu_log( log_point(5), 'u-equation', 'start' )
 
-    tend = 0.0
+    tend = 0.0_wp
     IF ( timestep_scheme(1:5) == 'runge' )  THEN
        IF ( ws_scheme_mom )  THEN
@@ -946,5 +946,5 @@
              DO  j = nys, nyn
                 DO  k = nzb_u_inner(j,i)+1, nzt
-                   tu_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tu_m(k,j,i)
+                   tu_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tu_m(k,j,i)
                 ENDDO
              ENDDO
@@ -959,5 +959,5 @@
     CALL cpu_log( log_point(6), 'v-equation', 'start' )
 
-    tend = 0.0
+    tend = 0.0_wp
     IF ( timestep_scheme(1:5) == 'runge' )  THEN
        IF ( ws_scheme_mom )  THEN
@@ -1022,5 +1022,5 @@
              DO  j = nysv, nyn
                 DO  k = nzb_v_inner(j,i)+1, nzt
-                   tv_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tv_m(k,j,i)
+                   tv_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tv_m(k,j,i)
                 ENDDO
              ENDDO
@@ -1094,5 +1094,5 @@
              DO  j = nys, nyn
                 DO  k = nzb_w_inner(j,i)+1, nzt-1
-                   tw_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tw_m(k,j,i)
+                   tw_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tw_m(k,j,i)
                 ENDDO
              ENDDO
@@ -1120,5 +1120,5 @@
              sbt = 1.0
           ENDIF
-          tend = 0.0
+          tend = 0.0_wp
           CALL advec_s_bc( pt, 'pt' )
 
@@ -1128,5 +1128,5 @@
 !--    pt-tendency terms with no communication
        IF ( scalar_advec /= 'bc-scheme' )  THEN
-          tend = 0.0
+          tend = 0.0_wp
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_sca )  THEN
@@ -1156,5 +1156,5 @@
 !
 !--    Consideration of heat sources within the plant canopy
-       IF ( plant_canopy .AND. ( cthf /= 0.0 ) ) THEN
+       IF ( plant_canopy .AND. ( cthf /= 0.0_wp ) ) THEN
           CALL plant_canopy_model( 4 )
        ENDIF
@@ -1201,6 +1201,6 @@
                 DO  j = nys, nyn
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      tpt_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                      5.3125 * tpt_m(k,j,i)
+                      tpt_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                      5.3125_wp * tpt_m(k,j,i)
                    ENDDO
                 ENDDO
@@ -1229,5 +1229,5 @@
              sbt = 1.0
           ENDIF
-          tend = 0.0
+          tend = 0.0_wp
           CALL advec_s_bc( sa, 'sa' )
 
@@ -1262,5 +1262,5 @@
                                         - tsc(5) * rdf_sc(k) *                 &
                                           ( sa(k,j,i) - sa_init(k) )
-                IF ( sa_p(k,j,i) < 0.0 )  sa_p(k,j,i) = 0.1 * sa(k,j,i)
+                IF ( sa_p(k,j,i) < 0.0_wp )  sa_p(k,j,i) = 0.1_wp * sa(k,j,i)
              ENDDO
           ENDDO
@@ -1283,6 +1283,6 @@
                 DO  j = nys, nyn
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      tsa_m(k,j,i) = -9.5625 * tend(k,j,i) + &
-                                      5.3125 * tsa_m(k,j,i)
+                      tsa_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                                      5.3125_wp * tsa_m(k,j,i)
                    ENDDO
                 ENDDO
@@ -1315,7 +1315,7 @@
 !
 !--          Bott-Chlond scheme always uses Euler time step. Thus:
-             sbt = 1.0
-          ENDIF
-          tend = 0.0
+             sbt = 1.0_wp
+          ENDIF
+          tend = 0.0_wp
           CALL advec_s_bc( q, 'q' )
 
@@ -1325,5 +1325,5 @@
 !--    Scalar/q-tendency terms with no communication
        IF ( scalar_advec /= 'bc-scheme' )  THEN
-          tend = 0.0
+          tend = 0.0_wp
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_sca )  THEN
@@ -1371,5 +1371,5 @@
                                       - tsc(5) * rdf_sc(k) *                   &
                                         ( q(k,j,i) - q_init(k) )
-                IF ( q_p(k,j,i) < 0.0 )  q_p(k,j,i) = 0.1 * q(k,j,i)
+                IF ( q_p(k,j,i) < 0.0_wp )  q_p(k,j,i) = 0.1_wp * q(k,j,i)
              ENDDO
           ENDDO
@@ -1392,5 +1392,5 @@
                 DO  j = nys, nyn
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      tq_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tq_m(k,j,i)
+                      tq_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tq_m(k,j,i)
                    ENDDO
                 ENDDO
@@ -1417,7 +1417,7 @@
 !
 !--             Bott-Chlond scheme always uses Euler time step. Thus:
-                sbt = 1.0
-             ENDIF
-             tend = 0.0
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
              CALL advec_s_bc( e, 'e' )
 
@@ -1429,8 +1429,8 @@
        IF ( scalar_advec /= 'bc-scheme'  .OR.  use_upstream_for_tke )  THEN
           IF ( use_upstream_for_tke )  THEN
-             tend = 0.0
+             tend = 0.0_wp
              CALL advec_s_up( e )
           ELSE
-             tend = 0.0
+             tend = 0.0_wp
              IF ( timestep_scheme(1:5) == 'runge' )  THEN
                 IF ( ws_scheme_sca )  THEN
@@ -1472,5 +1472,5 @@
                 e_p(k,j,i) = e(k,j,i) + dt_3d * ( sbt * tend(k,j,i) +          &
                                                   tsc(3) * te_m(k,j,i) )
-                IF ( e_p(k,j,i) < 0.0 )  e_p(k,j,i) = 0.1 * e(k,j,i)
+                IF ( e_p(k,j,i) < 0.0_wp )  e_p(k,j,i) = 0.1_wp * e(k,j,i)
              ENDDO
           ENDDO
@@ -1493,5 +1493,5 @@
                 DO  j = nys, nyn
                    DO  k = nzb_s_inner(j,i)+1, nzt
-                      te_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * te_m(k,j,i)
+                      te_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * te_m(k,j,i)
                    ENDDO
                 ENDDO
@@ -1545,5 +1545,5 @@
           CALL advec_u_ws_acc
        ELSE
-          tend = 0.0    ! to be removed later??
+          tend = 0.0_wp   ! to be removed later??
           CALL advec_u_pw
        ENDIF
@@ -1597,5 +1597,5 @@
                    tu_m(k,j,i) = tend(k,j,i)
                 ELSEIF ( runge_step == 2 )  THEN
-                   tu_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tu_m(k,j,i)
+                   tu_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tu_m(k,j,i)
                 ENDIF
              ENDIF
@@ -1615,5 +1615,5 @@
           CALL advec_v_ws_acc
        ELSE
-          tend = 0.0    ! to be removed later??
+          tend = 0.0_wp    ! to be removed later??
           CALL advec_v_pw
        END IF
@@ -1664,5 +1664,5 @@
                    tv_m(k,j,i) = tend(k,j,i)
                 ELSEIF ( runge_step == 2 )  THEN
-                   tv_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tv_m(k,j,i)
+                   tv_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tv_m(k,j,i)
                 ENDIF
              ENDIF
@@ -1682,5 +1682,5 @@
           CALL advec_w_ws_acc
        ELSE
-          tend = 0.0    ! to be removed later??
+          tend = 0.0_wp    ! to be removed later??
           CALL advec_w_pw
        ENDIF
@@ -1727,5 +1727,5 @@
                    tw_m(k,j,i) = tend(k,j,i)
                 ELSEIF ( runge_step == 2 )  THEN
-                   tw_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tw_m(k,j,i)
+                   tw_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tw_m(k,j,i)
                 ENDIF
              ENDIF
@@ -1754,5 +1754,5 @@
              sbt = 1.0
           ENDIF
-          tend = 0.0
+          tend = 0.0_wp
           CALL advec_s_bc( pt, 'pt' )
 
@@ -1762,10 +1762,10 @@
 !--    pt-tendency terms with no communication
        IF ( scalar_advec /= 'bc-scheme' )  THEN
-          tend = 0.0
+          tend = 0.0_wp
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_sca )  THEN
                 CALL advec_s_ws_acc( pt, 'pt' )
              ELSE
-                tend = 0.0    ! to be removed later??
+                tend = 0.0_wp    ! to be removed later??
                 CALL advec_s_pw( pt )
              ENDIF
@@ -1791,5 +1791,5 @@
 !
 !--    Consideration of heat sources within the plant canopy
-       IF ( plant_canopy .AND. ( cthf /= 0.0 ) ) THEN
+       IF ( plant_canopy .AND. ( cthf /= 0.0_wp ) ) THEN
           CALL plant_canopy_model( 4 )
        ENDIF
@@ -1827,5 +1827,5 @@
                       tpt_m(k,j,i) = tend(k,j,i)
                    ELSEIF ( runge_step == 2 )  THEN
-                      tpt_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tpt_m(k,j,i)
+                      tpt_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tpt_m(k,j,i)
                    ENDIF
                 ENDIF
@@ -1853,7 +1853,7 @@
 !
 !--          Bott-Chlond scheme always uses Euler time step. Thus:
-             sbt = 1.0
-          ENDIF
-          tend = 0.0
+             sbt = 1.0_wp
+          ENDIF
+          tend = 0.0_wp
           CALL advec_s_bc( sa, 'sa' )
 
@@ -1863,5 +1863,5 @@
 !--    sa-tendency terms with no communication
        IF ( scalar_advec /= 'bc-scheme' )  THEN
-          tend = 0.0
+          tend = 0.0_wp
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_sca )  THEN
@@ -1888,5 +1888,5 @@
                                         - tsc(5) * rdf_sc(k) *                 &
                                           ( sa(k,j,i) - sa_init(k) )
-                IF ( sa_p(k,j,i) < 0.0 )  sa_p(k,j,i) = 0.1 * sa(k,j,i)
+                IF ( sa_p(k,j,i) < 0.0_wp )  sa_p(k,j,i) = 0.1_wp * sa(k,j,i)
 !
 !--             Tendencies for the next Runge-Kutta step
@@ -1894,5 +1894,5 @@
                    tsa_m(k,j,i) = tend(k,j,i)
                 ELSEIF ( runge_step == 2 )  THEN
-                   tsa_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tsa_m(k,j,i)
+                   tsa_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tsa_m(k,j,i)
                 ENDIF
              ENDDO
@@ -1924,7 +1924,7 @@
 !
 !--          Bott-Chlond scheme always uses Euler time step. Thus:
-             sbt = 1.0
-          ENDIF
-          tend = 0.0
+             sbt = 1.0_wp
+          ENDIF
+          tend = 0.0_wp
           CALL advec_s_bc( q, 'q' )
 
@@ -1934,5 +1934,5 @@
 !--    Scalar/q-tendency terms with no communication
        IF ( scalar_advec /= 'bc-scheme' )  THEN
-          tend = 0.0
+          tend = 0.0_wp
           IF ( timestep_scheme(1:5) == 'runge' )  THEN
              IF ( ws_scheme_sca )  THEN
@@ -1980,5 +1980,5 @@
                                       - tsc(5) * rdf_sc(k) *                   &
                                         ( q(k,j,i) - q_init(k) )
-                IF ( q_p(k,j,i) < 0.0 )  q_p(k,j,i) = 0.1 * q(k,j,i)
+                IF ( q_p(k,j,i) < 0.0_wp )  q_p(k,j,i) = 0.1_wp * q(k,j,i)
 !
 !--             Tendencies for the next Runge-Kutta step
@@ -1986,5 +1986,5 @@
                    tq_m(k,j,i) = tend(k,j,i)
                 ELSEIF ( runge_step == 2 )  THEN
-                   tq_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * tq_m(k,j,i)
+                   tq_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * tq_m(k,j,i)
                 ENDIF
              ENDDO
@@ -2010,7 +2010,7 @@
 !
 !--             Bott-Chlond scheme always uses Euler time step. Thus:
-                sbt = 1.0
-             ENDIF
-             tend = 0.0
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
              CALL advec_s_bc( e, 'e' )
 
@@ -2022,5 +2022,5 @@
        IF ( scalar_advec /= 'bc-scheme'  .OR.  use_upstream_for_tke )  THEN
           IF ( use_upstream_for_tke )  THEN
-             tend = 0.0
+             tend = 0.0_wp
              CALL advec_s_up( e )
           ELSE
@@ -2029,9 +2029,9 @@
                    CALL advec_s_ws_acc( e, 'e' )
                 ELSE
-                   tend = 0.0    ! to be removed later??
+                   tend = 0.0_wp    ! to be removed later??
                    CALL advec_s_pw( e )
                 ENDIF
              ELSE
-                tend = 0.0    ! to be removed later??
+                tend = 0.0_wp    ! to be removed later??
                 CALL advec_s_up( e )
              ENDIF
@@ -2071,5 +2071,5 @@
                    e_p(k,j,i) = e(k,j,i) + dt_3d * ( sbt * tend(k,j,i) +          &
                                                      tsc(3) * te_m(k,j,i) )
-                   IF ( e_p(k,j,i) < 0.0 )  e_p(k,j,i) = 0.1 * e(k,j,i)
+                   IF ( e_p(k,j,i) < 0.0_wp )  e_p(k,j,i) = 0.1_wp * e(k,j,i)
 !
 !--                Tendencies for the next Runge-Kutta step
@@ -2077,5 +2077,5 @@
                       te_m(k,j,i) = tend(k,j,i)
                    ELSEIF ( runge_step == 2 )  THEN
-                      te_m(k,j,i) = -9.5625 * tend(k,j,i) + 5.3125 * te_m(k,j,i)
+                      te_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * te_m(k,j,i)
                    ENDIF
                 ENDIF
