Index: palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3126)
+++ palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3127)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Some adjustments for pavement parameters
+! Limit magnus formula to avoid negative q_s (leads to model crash)
+! 
+! 3091 2018-06-28 16:20:35Z suehring
 ! Add check for local roughness length not exceeding surface-layer height and
 ! limit roughness length where necessary.
@@ -865,7 +869,7 @@
 !--   0.0-0.01, 0.01-0.03, 0.03-0.07, 0.07-0.15, 0.15-0.30, 0.30-0.50,    0.50-1.25,    1.25-3.00
     REAL(wp), DIMENSION(0:7,1:15), PARAMETER :: pavement_subsurface_pars_1 = RESHAPE( (/ &
-       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  1
-       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  2
-       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  3
+       0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp, 9999999.9_wp, 9999999.9_wp, & !  1
+       0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp, 9999999.9_wp, 9999999.9_wp, & !  2
+       0.89_wp,   0.89_wp,   0.89_wp,   0.89_wp,   0.89_wp,   0.89_wp, 9999999.9_wp, 9999999.9_wp, & !  3
        1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  4
        1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  5
@@ -873,5 +877,5 @@
        1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  7
        1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  8
-       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  9
+       0.70_wp,   0.70_wp,   0.70_wp,   0.70_wp,   0.70_wp,   0.70_wp, 9999999.9_wp, 9999999.9_wp, & !  9
        1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 10
        1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 11
@@ -888,5 +892,5 @@
        1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  1
        1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  2
-       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  3
+       1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 9999999.9_wp, 9999999.9_wp, & !  3
        1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  4
        1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  5
@@ -1923,5 +1927,7 @@
 !
 !--    Calculate water vapour pressure at saturation and convert to hPa
-       e_s = 0.01_wp * magnus( surf_t_surface%var_1d(m) )
+!--    The magnus formula is limited to temperatures up to 333.15 K to
+!--    avoid negative values of q_s
+       e_s = 0.01_wp * magnus( MIN(surf_t_surface%var_1d(m), 333.15_wp) )
 
 !
@@ -2279,5 +2285,5 @@
 !
 !--       Calculate water vapour pressure at saturation and convert to hPa
-          e_s = 0.01_wp * magnus( surf_t_surface_p%var_1d(m) )                   
+          e_s = 0.01_wp * magnus( MIN(surf_t_surface%var_1d(m), 333.15_wp) )                   
 
 !
Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3126)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3127)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! A few pavement parameters updated.
+! 
+! 3123 2018-07-12 16:21:53Z suehring
 ! Correct working precision for INTEGER number
 ! 
@@ -566,5 +569,5 @@
                                    0.17_wp, 0.17_wp, 0.17_wp,            & ! 18
                                    0.17_wp, 0.17_wp, 0.17_wp,            & ! 19
-                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 20
+                                   0.30_wp, 0.30_wp, 0.30_wp,            & ! 20
                                    0.17_wp, 0.17_wp, 0.17_wp,            & ! 21
                                    0.17_wp, 0.17_wp, 0.17_wp,            & ! 22
