Index: /palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3255)
+++ /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3256)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Enable initialization of z0q for vegetation, pavement and water surfaces via
+! namelist input. 
+! 
+! 3248 2018-09-14 09:42:06Z sward
 ! Minor formating changes
 ! 
@@ -3140,5 +3144,9 @@
           IF ( z0h_vegetation == 9999999.9_wp )  THEN
              z0h_vegetation = vegetation_pars(ind_v_z0qh,vegetation_type)
-          ENDIF   
+          ENDIF 
+          
+          IF ( z0q_vegetation == 9999999.9_wp )  THEN
+             z0q_vegetation = vegetation_pars(ind_v_z0qh,vegetation_type)
+          ENDIF
           
           IF ( lambda_surface_stable == 9999999.9_wp )  THEN
@@ -3177,5 +3185,5 @@
              surf_lsm_h%z0(m)               = z0_vegetation
              surf_lsm_h%z0h(m)              = z0h_vegetation
-             surf_lsm_h%z0q(m)              = z0h_vegetation
+             surf_lsm_h%z0q(m)              = z0q_vegetation
              surf_lsm_h%lambda_surface_s(m) = lambda_surface_stable
              surf_lsm_h%lambda_surface_u(m) = lambda_surface_unstable
@@ -3206,5 +3214,5 @@
                 surf_lsm_v(l)%z0(m)               = z0_vegetation
                 surf_lsm_v(l)%z0h(m)              = z0h_vegetation
-                surf_lsm_v(l)%z0q(m)              = z0h_vegetation
+                surf_lsm_v(l)%z0q(m)              = z0q_vegetation
                 surf_lsm_v(l)%lambda_surface_s(m) = lambda_surface_stable
                 surf_lsm_v(l)%lambda_surface_u(m) = lambda_surface_unstable
@@ -3461,4 +3469,8 @@
              z0h_water = water_pars(ind_w_z0h,water_type)       
           ENDIF  
+          
+          IF ( z0q_water == 9999999.9_wp )  THEN
+             z0q_water = water_pars(ind_w_z0h,water_type)       
+          ENDIF 
 
           IF ( albedo_type == 9999999  .AND.  albedo == 9999999.9_wp )  THEN
@@ -3479,5 +3491,5 @@
              surf_lsm_h%z0(m)               = z0_water
              surf_lsm_h%z0h(m)              = z0h_water
-             surf_lsm_h%z0q(m)              = z0h_water
+             surf_lsm_h%z0q(m)              = z0q_water
              surf_lsm_h%lambda_surface_s(m) = 1.0E10_wp
              surf_lsm_h%lambda_surface_u(m) = 1.0E10_wp               
@@ -3500,5 +3512,5 @@
                 surf_lsm_v(l)%z0(m)               = z0_water
                 surf_lsm_v(l)%z0h(m)              = z0h_water
-                surf_lsm_v(l)%z0q(m)              = z0h_water
+                surf_lsm_v(l)%z0q(m)              = z0q_water
                 surf_lsm_v(l)%lambda_surface_s(m) = 1.0E10_wp
                 surf_lsm_v(l)%lambda_surface_u(m) = 1.0E10_wp               
@@ -3712,4 +3724,8 @@
              z0h_pavement = pavement_pars(ind_p_z0h,pavement_type)
           ENDIF
+          
+          IF ( z0q_pavement == 9999999.9_wp )  THEN
+             z0q_pavement = pavement_pars(ind_p_z0h,pavement_type)
+          ENDIF
 
           IF ( pavement_heat_conduct == 9999999.9_wp )  THEN
@@ -3755,5 +3771,5 @@
              surf_lsm_h%z0(m)                  = z0_pavement
              surf_lsm_h%z0h(m)                 = z0h_pavement
-             surf_lsm_h%z0q(m)                 = z0h_pavement
+             surf_lsm_h%z0q(m)                 = z0q_pavement
              surf_lsm_h%lambda_surface_s(m)    = pavement_heat_conduct         &
                                                   * ddz_soil(nzb_soil)         &
@@ -3793,5 +3809,5 @@
                 surf_lsm_v(l)%z0(m)                  = z0_pavement
                 surf_lsm_v(l)%z0h(m)                 = z0h_pavement
-                surf_lsm_v(l)%z0q(m)                 = z0h_pavement
+                surf_lsm_v(l)%z0q(m)                 = z0q_pavement
                 surf_lsm_v(l)%lambda_surface_s(m)    = pavement_heat_conduct   &
                                                   * ddz_soil(nzb_soil)         &
