Index: palm/trunk/SOURCE/flow_statistics.f90
===================================================================
--- palm/trunk/SOURCE/flow_statistics.f90	(revision 1570)
+++ palm/trunk/SOURCE/flow_statistics.f90	(revision 1571)
@@ -21,5 +21,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Bugfix: output of rad_net and rad_sw_in
 ! 
 ! Former revisions:
@@ -1480,6 +1480,6 @@
 !--    Collect radiation model timeseries
        IF ( radiation )  THEN
-          ts_value(dots_rad,sr)   = hom(nzb,1,99,sr)           ! rad_net
-          ts_value(dots_rad+1,sr) = hom(nzb,1,100,sr)          ! rad_sw_in
+          ts_value(dots_rad,sr)   = hom(nzb,1,101,sr)           ! rad_net
+          ts_value(dots_rad+1,sr) = hom(nzb,1,102,sr)          ! rad_sw_in
        ENDIF
 
@@ -3285,6 +3285,6 @@
 !--    Collect radiation model timeseries
        IF ( radiation )  THEN
-          ts_value(dots_rad,sr)   = hom(nzb,1,99,sr)           ! rad_net
-          ts_value(dots_rad+1,sr) = hom(nzb,1,100,sr)          ! rad_sw_in
+          ts_value(dots_rad,sr)   = hom(nzb,1,101,sr)           ! rad_net
+          ts_value(dots_rad+1,sr) = hom(nzb,1,102,sr)          ! rad_sw_in
        ENDIF
 
Index: palm/trunk/SOURCE/land_surface_model.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model.f90	(revision 1570)
+++ palm/trunk/SOURCE/land_surface_model.f90	(revision 1571)
@@ -20,5 +20,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! Removed upper-case variable names. Corrected distribution of precipitation to 
+! the liquid water reservoir and the bare soil fractions.
 ! 
 ! Former revisions:
@@ -69,4 +70,5 @@
 ! - Implement surface runoff model (required when performing long-term LES with
 !   considerable precipitation
+!
 ! Notes:
 ! ------
@@ -96,5 +98,5 @@
 
      USE radiation_model_mod,                                                  &
-         ONLY:  irad_scheme, rad_net, rad_sw_in, sigma_SB
+         ONLY:  irad_scheme, rad_net, rad_sw_in, sigma_sb
 
      USE statistics,                                                           &
@@ -934,7 +936,7 @@
                    e,           & !: water vapour pressure
                    e_s,         & !: water vapour saturation pressure
-                   e_s_dT,      & !: derivate of e_s with respect to T
+                   e_s_dt,      & !: derivate of e_s with respect to T
                    tend,        & !: tendency
-                   dq_s_dT,     & !: derivate of q_s with respect to T
+                   dq_s_dt,     & !: derivate of q_s with respect to T
                    coef_1,      & !: coef. for prognostic equation
                    coef_2,      & !: coef. for prognostic equation
@@ -1097,9 +1099,9 @@
 !
 !--          Calculate derivative of q_s for Taylor series expansion
-             e_s_dT = e_s * ( 17.269_wp / (t_surface(j,i) - 35.86_wp) -        &
+             e_s_dt = e_s * ( 17.269_wp / (t_surface(j,i) - 35.86_wp) -        &
                               17.269_wp*(t_surface(j,i) - 273.16_wp)           &
                               / (t_surface(j,i) - 35.86_wp)**2 )
 
-             dq_s_dT = 0.622_wp * e_s_dT / surface_pressure
+             dq_s_dt = 0.622_wp * e_s_dt / surface_pressure
 
              T_1 = pt_p(k+1,j,i) * exn
@@ -1107,5 +1109,5 @@
 !
 !--          Add LW up so that it can be removed in prognostic equation
-             rad_net(j,i) = rad_net(j,i) + sigma_SB * t_surface(j,i) ** 4
+             rad_net(j,i) = rad_net(j,i) + sigma_sb * t_surface(j,i) ** 4
 
              IF ( humidity )  THEN
@@ -1113,13 +1115,13 @@
 !
 !--             Numerator of the prognostic equation
-                coef_1 = rad_net(j,i) + 3.0_wp * sigma_SB * t_surface(j,i) ** 4&
+                coef_1 = rad_net(j,i) + 3.0_wp * sigma_sb * t_surface(j,i) ** 4&
                          + f_shf / exn * T_1 + f_qsws * ( q_p(k+1,j,i) - q_s   &
-                         + dq_s_dT * t_surface(j,i) ) + lambda_surface         &
+                         + dq_s_dt * t_surface(j,i) ) + lambda_surface         &
                          * t_soil(nzb_soil,j,i)
 
 !
 !--             Denominator of the prognostic equation
-                coef_2 = 4.0_wp * sigma_SB * t_surface(j,i) ** 3 + f_qsws      &
-                         * dq_s_dT + lambda_surface + f_shf / exn
+                coef_2 = 4.0_wp * sigma_sb * t_surface(j,i) ** 3 + f_qsws      &
+                         * dq_s_dt + lambda_surface + f_shf / exn
 
              ELSE
@@ -1127,5 +1129,5 @@
 !
 !--             Numerator of the prognostic equation
-                coef_1 = rad_net(j,i) + 3.0_wp * sigma_SB * t_surface(j,i) ** 4&
+                coef_1 = rad_net(j,i) + 3.0_wp * sigma_sb * t_surface(j,i) ** 4&
                          + f_shf / exn * T_1 + lambda_surface                  &
                          * t_soil(nzb_soil,j,i)
@@ -1133,5 +1135,5 @@
 !
 !--             Denominator of the prognostic equation
-                coef_2 = 4.0_wp * sigma_SB * t_surface(j,i) ** 3               &
+                coef_2 = 4.0_wp * sigma_sb * t_surface(j,i) ** 3               &
                          + lambda_surface + f_shf / exn
 
@@ -1170,6 +1172,6 @@
 !
 !--          Calculate fluxes
-             rad_net(j,i)   = rad_net(j,i) + 3.0_wp * sigma_SB                 &
-                              * t_surface(j,i)**4 - 4.0_wp * sigma_SB          &
+             rad_net(j,i)   = rad_net(j,i) + 3.0_wp * sigma_sb                 &
+                              * t_surface(j,i)**4 - 4.0_wp * sigma_sb          &
                               * t_surface(j,i)**3 * t_surface_p(j,i)
              ghf_eb(j,i)    = lambda_surface * (t_surface_p(j,i)               &
@@ -1178,17 +1180,17 @@
 
              IF ( humidity )  THEN
-                qsws_eb(j,i)  = - f_qsws    * ( q_p(k+1,j,i) - q_s + dq_s_dT   &
-                                * t_surface(j,i) - dq_s_dT * t_surface_p(j,i) )
+                qsws_eb(j,i)  = - f_qsws    * ( q_p(k+1,j,i) - q_s + dq_s_dt   &
+                                * t_surface(j,i) - dq_s_dt * t_surface_p(j,i) )
 
                 qsws_veg_eb(j,i)  = - f_qsws_veg  * ( q_p(k+1,j,i) - q_s       &
-                                    + dq_s_dT * t_surface(j,i) - dq_s_dT       &
+                                    + dq_s_dt * t_surface(j,i) - dq_s_dt       &
                                     * t_surface_p(j,i) )
 
                 qsws_soil_eb(j,i) = - f_qsws_soil * ( q_p(k+1,j,i) - q_s       &
-                                    + dq_s_dT * t_surface(j,i) - dq_s_dT       &
+                                    + dq_s_dt * t_surface(j,i) - dq_s_dt       &
                                     * t_surface_p(j,i) )
 
                 qsws_liq_eb(j,i)  = - f_qsws_liq  * ( q_p(k+1,j,i) - q_s       &
-                                    + dq_s_dT * t_surface(j,i) - dq_s_dT       &
+                                    + dq_s_dt * t_surface(j,i) - dq_s_dt       &
                                     * t_surface_p(j,i) )
              ENDIF
@@ -1199,6 +1201,6 @@
                 r_s(j,i) = 1.0E10_wp
              ELSE
-                r_s(j,i) = - rho_lv * ( q_p(k+1,j,i) - q_s + dq_s_dT           &
-                           * t_surface(j,i) - dq_s_dT * t_surface_p(j,i) )     &
+                r_s(j,i) = - rho_lv * ( q_p(k+1,j,i) - q_s + dq_s_dt           &
+                           * t_surface(j,i) - dq_s_dt * t_surface_p(j,i) )     &
                            / qsws_eb(j,i) - r_a(j,i)
              ENDIF
@@ -1209,10 +1211,27 @@
              IF ( humidity )  THEN
 !
-!--             If precipitation is activated, add rain water to qsws_liq_eb.
+!--             If precipitation is activated, add rain water to qsws_liq_eb
+!--             and qsws_soil_eb according the the vegetation coverage.
 !--             precipitation_rate is given in mm.
                 IF ( precipitation )  THEN
-                   qsws_liq_eb(j,i) = qsws_liq_eb(j,i)                         &
-                                       + precipitation_rate(j,i) * 0.001_wp    &
-                                       * rho_l * l_v
+
+!
+!--                Add precipitation to liquid water reservoir, if possible.
+!--                Otherwise, add the water to bare soil fraction.
+                   IF ( m_liq_eb(j,i) .EQ. m_liq_eb_max )  THEN
+                      qsws_liq_eb(j,i) = qsws_liq_eb(j,i)                      &
+                                       + c_veg(j,i) * precipitation_rate(j,i)  &
+                                       * 0.001_wp * rho_l * l_v
+                   ELSE
+                      qsws_soil_eb(j,i) = qsws_soil_eb(j,i)                    &
+                                        + c_veg(j,i) * precipitation_rate(j,i) &
+                                        * 0.001_wp * rho_l * l_v
+                   ENDIF
+
+!--                Add precipitation to bare soil according to the bare soil
+!--                coverage.
+                   qsws_soil_eb(j,i) = qsws_soil_eb(j,i) * (1.0_wp             &
+                                       - c_veg(j,i)) * precipitation_rate(j,i) &
+                                       * 0.001_wp * rho_l * l_v
                 ENDIF
 !
Index: palm/trunk/SOURCE/radiation_model.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model.f90	(revision 1570)
+++ palm/trunk/SOURCE/radiation_model.f90	(revision 1571)
@@ -20,5 +20,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Added missing KIND attribute. Removed upper-case variable names
 ! 
 ! Former revisions:
@@ -68,7 +68,7 @@
     LOGICAL :: radiation = .FALSE.  !: flag parameter indicating wheather the radiation model is used
 
-    REAL(wp), PARAMETER :: SW_0 = 1368.0, &       !: solar constant  
+    REAL(wp), PARAMETER :: sw_0 = 1368.0_wp, &    !: solar constant  
                            pi = 3.14159265358979323_wp, &
-                           sigma_SB  = 5.67E-8_wp !: Stefan-Boltzmann constant
+                           sigma_sb  = 5.67E-8_wp !: Stefan-Boltzmann constant
  
     REAL(wp) :: albedo = 0.2_wp,             & !: NAMELIST alpha
@@ -126,5 +126,5 @@
            irad_scheme, lambda, net_radiation, rad_net, rad_net_av, radiation, &
            radiation_clearsky, radiation_constant, radiation_rrtm,             &
-           radiation_scheme, rad_sw_in, rad_sw_in_av, sigma_SB,                &
+           radiation_scheme, rad_sw_in, rad_sw_in_av, sigma_sb,                &
            time_radiation, time_utc_init 
 
@@ -231,8 +231,8 @@
 
              k = nzb_s_inner(j,i)
-             rad_sw_in(j,i)  = SW_0 * sky_trans * zenith
+             rad_sw_in(j,i)  = sw_0 * sky_trans * zenith
              rad_sw_out(j,i) = - alpha(j,i) * rad_sw_in(j,i)
-             rad_lw_out(j,i) = - sigma_SB * (pt(k,j,i) * exn)**4
-             rad_lw_in(j,i)  = 0.8_wp * sigma_SB * (pt(k+1,j,i) * exn)**4
+             rad_lw_out(j,i) = - sigma_sb * (pt(k,j,i) * exn)**4
+             rad_lw_in(j,i)  = 0.8_wp * sigma_sb * (pt(k+1,j,i) * exn)**4
              rad_net(j,i)    = rad_sw_in(j,i) + rad_sw_out(j,i)                &
                                 + rad_lw_in(j,i) + rad_lw_out(j,i)
