Index: palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- palm/trunk/SOURCE/data_output_2d.f90	(revision 3175)
+++ palm/trunk/SOURCE/data_output_2d.f90	(revision 3176)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Remove output of latent heat flux at urban-surfaces and set fill values 
+! instead 
+! 
+! 3052 2018-05-31 06:11:20Z raasch
 ! Do not open FORTRAN binary files in case of parallel netCDF I/O
 ! 
@@ -933,7 +937,8 @@
              CASE ( 'qsws*_xy' )        ! 2d-array
                 IF ( av == 0 ) THEN
+                   local_pf(:,:,nzb+1) = REAL( fill_value, KIND = wp )
 !
 !--                In case of default surfaces, clean-up flux by density.
-!--                In case of land- and urban-surfaces, convert fluxes into
+!--                In case of land-surfaces, convert fluxes into
 !--                dynamic units
                    DO  m = 1, surf_def_h(0)%ns
@@ -949,10 +954,4 @@
                       k = surf_lsm_h%k(m)
                       local_pf(i,j,nzb+1) = surf_lsm_h%qsws(m) * l_v
-                   ENDDO
-                   DO  m = 1, surf_usm_h%ns
-                      i = surf_usm_h%i(m)
-                      j = surf_usm_h%j(m)
-                      k = surf_usm_h%k(m)
-                      local_pf(i,j,nzb+1) = surf_usm_h%qsws(m) * l_v
                    ENDDO
                 ELSE
Index: palm/trunk/SOURCE/sum_up_3d_data.f90
===================================================================
--- palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 3175)
+++ palm/trunk/SOURCE/sum_up_3d_data.f90	(revision 3176)
@@ -25,4 +25,8 @@
 ! -----------------
 ! $Id$
+! Remove output of latent heat flux at urban-surfaces and set fill values 
+! instead 
+! 
+! 3173 2018-07-26 12:55:23Z suehring
 ! Bugfix for last commit
 ! 
@@ -894,8 +898,4 @@
                          qsws_av(j,i) = qsws_av(j,i) +                         &
                                          surf_lsm_h%qsws(m) * l_v
-                      ELSEIF ( match_usm )  THEN
-                         m = surf_usm_h%end_index(j,i)
-                         qsws_av(j,i) = qsws_av(j,i) +                         &
-                                         surf_usm_h%qsws(m) * l_v
                       ENDIF
                    ENDDO
Index: palm/trunk/SOURCE/surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/surface_mod.f90	(revision 3175)
+++ palm/trunk/SOURCE/surface_mod.f90	(revision 3176)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Bugfix in restarts for surface elements.
+! 
+! 3152 2018-07-19 13:26:52Z suehring
 ! q_surface added
 ! 
@@ -2690,7 +2693,7 @@
                          surf_h(l)%pt_surface(mm(l)) = surf_lsm_h%pt_surface(m)
                       IF ( ALLOCATED( surf_def_h(l)%q_surface ) )              &
-                         surf_h(l)%q_surface(mm(l)) = surf_def_h(l)%q_surface(m)
+                         surf_h(l)%q_surface(mm(l)) = surf_lsm_h%q_surface(m)
                       IF ( ALLOCATED( surf_def_h(l)%vpt_surface ) )            &
-                         surf_h(l)%vpt_surface(mm(l)) = surf_def_h(l)%vpt_surface(m)
+                         surf_h(l)%vpt_surface(mm(l)) = surf_lsm_h%vpt_surface(m)
                       IF ( ALLOCATED( surf_lsm_h%usws ) )                      &
                          surf_h(0)%usws(mm(0))    = surf_lsm_h%usws(m)
Index: palm/trunk/SOURCE/time_integration.f90
===================================================================
--- palm/trunk/SOURCE/time_integration.f90	(revision 3175)
+++ palm/trunk/SOURCE/time_integration.f90	(revision 3176)
@@ -1015,4 +1015,5 @@
              IF (urban_surface) THEN
                 CALL cpu_log( log_point(74), 'urban_surface', 'start' )
+                
                 CALL usm_surface_energy_balance
                 IF ( usm_material_model )  THEN
Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3175)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3176)
@@ -28,4 +28,8 @@
 ! -----------------
 ! $Id$
+! Bugfix, update virtual potential surface temparture, else heat fluxes on 
+! roofs might become unphysical
+! 
+! 3152 2018-07-19 13:26:52Z suehring
 ! Initialize q_surface, which might be used in surface_layer_fluxes
 ! 
@@ -7438,9 +7442,14 @@
                            surf_usm_h%tt_surface_green_m(m)
 !
-!--        Store surface temperature        
+!--        Store surface temperature on pt_surface. Further, in case humidity is used
+!--        store also vpt_surface, which is, due to the lack of moisture on roofs simply
+!--        assumed to be the surface temperature.
            surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_h_p(m)   &
                                + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m)   &
                                + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) )  &
                                / exn(k)
+                               
+           IF ( humidity )  surf_usm_h%vpt_surface(m) =                        &
+                                                   surf_usm_h%pt_surface(m)
                        
 !--        calculate true tendency
@@ -7637,9 +7646,14 @@
                                 surf_usm_v(l)%tt_surface_green_m(m)
 !
-!--           Store surface temperature        
+!--           Store surface temperature. Further, in case humidity is used
+!--           store also vpt_surface, which is, due to the lack of moisture on roofs simply
+!--           assumed to be the surface temperature.     
               surf_usm_v(l)%pt_surface(m) =  ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_v_p(l)%t(m)  &
                                       + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m)  &
                                       + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) &
                                       / exn(k) 
+                                      
+              IF ( humidity )  surf_usm_v(l)%vpt_surface(m) =                  &
+                                                    surf_usm_v(l)%pt_surface(m)
             
 !--           calculate true tendency
