Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4304)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4305)
@@ -23,6 +23,8 @@
 ! Current revisions:
 ! ------------------
-! 
-! 
+! - Bugfix, include m_liq into restarts
+! - Remove unused arrays for liquid water and saturation moisture at vertical
+!   walls
+!
 ! Former revisions:
 ! -----------------
@@ -548,16 +550,5 @@
                                       m_liq_usm_h_2          !<
 
-    TYPE(surf_type_usm), DIMENSION(:), POINTER  ::        &
-                                      m_liq_usm_v,        &  !< liquid water reservoir (m), vertical surface elements 
-                                      m_liq_usm_v_p          !< progn. liquid water reservoir (m), vertical surface elements 
-
-    TYPE(surf_type_usm), DIMENSION(0:3), TARGET   ::      &
-                                      m_liq_usm_v_1,      &  !<
-                                      m_liq_usm_v_2          !<
-
     TYPE(surf_type_usm), TARGET ::  tm_liq_usm_h_m      !< liquid water reservoir tendency (m), horizontal surface elements 
-    TYPE(surf_type_usm), DIMENSION(0:3), TARGET ::  tm_liq_usm_v_m      !< liquid water reservoir tendency (m),
-                                                                        !< vertical surface elements
-
 !
 !-- anthropogenic heat sources
@@ -647,7 +638,4 @@
     TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_green_v, t_green_v_p
     TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_1, t_green_v_2
-    TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: swc_v, swc_v_p
-    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: swc_v_1, swc_v_2
-
 !
 !-- Surface and material parameters classes (surface_type)
@@ -1077,12 +1065,4 @@
            IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) )                          &           
               ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )  
-           IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) )               &
-              ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) )
-           IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) )               &
-              ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) )
-           IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) )                              &           
-              ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) 
-           IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) )                              &           
-              ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )  
         ENDDO
 !
@@ -1094,6 +1074,4 @@
         t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2
         t_surf_green_v  => t_surf_green_v_1;  t_surf_green_v_p  => t_surf_green_v_2
-        m_liq_usm_v     => m_liq_usm_v_1;     m_liq_usm_v_p     => m_liq_usm_v_2
-        swc_v           => swc_v_1;           swc_v_p           => swc_v_2
 
 !
@@ -1110,10 +1088,5 @@
 !--    Horizontal surfaces
        ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns)                   )
-!
-!--    Horizontal surfaces
-       DO  l = 0, 3
-          ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns)          )
-       ENDDO 
-        
+       tm_liq_usm_h_m%var_usm_1d = 0.0_wp
 !
 !--     Set inital values for prognostic quantities
@@ -1819,15 +1792,10 @@
 !--                 soil water content for  iwl layer of walls and land
                     IF ( l == -1 ) THEN
-                    DO  m = 1, surf_usm_h%ns
-                       surf_usm_h%swc_av(iwl,m) =                           &
-                                          surf_usm_h%swc_av(iwl,m) +        &
-                                          swc_h(iwl,m)
-                    ENDDO
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%swc_av(iwl,m) =                           &
+                                          surf_usm_h%swc_av(iwl,m) +           &
+                                             swc_h(iwl,m)
+                       ENDDO
                     ELSE
-                       DO  m = 1, surf_usm_v(l)%ns
-                          surf_usm_v(l)%swc_av(iwl,m) =                     &
-                                          surf_usm_v(l)%swc_av(iwl,m) +     &
-                                          swc_v(l)%t(iwl,m)
-                       ENDDO
                     ENDIF
 
@@ -3167,11 +3135,5 @@
                     ENDDO
                  ELSE
-                    l = idsidx
-                    DO  m = 1, surf_usm_v(l)%ns
-                       i = surf_usm_v(l)%i(m)
-                       j = surf_usm_v(l)%j(m)
-                       k = surf_usm_v(l)%k(m)
-                       temp_pf(k,j,i) = swc_v(l)%t(iwl,m)
-                    ENDDO
+
                  ENDIF
               ELSE
@@ -5284,5 +5246,4 @@
                      t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin
                      t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m)
-                     swc_v(l)%t(k,m) = 0.5_wp
                   ENDDO
                ENDDO
@@ -5315,17 +5276,13 @@
 
 !
-!--     Adjust radiative fluxes for urban surface at model start
-        !CALL radiation_interaction
-!--     TODO: interaction should be called once before first output,
-!--     that is not yet possible.
-        
-        m_liq_usm_h_p     = m_liq_usm_h
-        m_liq_usm_v_p     = m_liq_usm_v
+!--    Set initial values for prognostic soil quantities
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+          m_liq_usm_h%var_usm_1d  = 0.0_wp
+       ENDIF
+       m_liq_usm_h_p     = m_liq_usm_h
 !
 !--    Set initial values for prognostic quantities
 !--    Horizontal surfaces
-       tm_liq_usm_h_m%var_usm_1d  = 0.0_wp
-       surf_usm_h%c_liq = 0.0_wp
-
+       surf_usm_h%c_liq     = 0.0_wp
        surf_usm_h%qsws_liq  = 0.0_wp
        surf_usm_h%qsws_veg  = 0.0_wp
@@ -5334,20 +5291,10 @@
 !--    Do the same for vertical surfaces
        DO  l = 0, 3
-          tm_liq_usm_v_m(l)%var_usm_1d  = 0.0_wp
-          surf_usm_v(l)%c_liq = 0.0_wp
-
+          surf_usm_v(l)%c_liq     = 0.0_wp
           surf_usm_v(l)%qsws_liq  = 0.0_wp
           surf_usm_v(l)%qsws_veg  = 0.0_wp
        ENDDO
 
-!
-!--    Set initial values for prognostic soil quantities
-       IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
-          m_liq_usm_h%var_usm_1d  = 0.0_wp
-
-          DO  l = 0, 3
-             m_liq_usm_v(l)%var_usm_1d  = 0.0_wp
-          ENDDO
-       ENDIF
+
 
         CALL cpu_log( log_point_s(78), 'usm_init', 'stop' )
@@ -6359,14 +6306,18 @@
        
        INTEGER(iwp)       ::  ns_v_on_file_usm(0:3)  !< number of vertical surface elements (urban type) on file
-       
+!
+!--    Note, the save attribute in the following array declaration is necessary, 
+!--    in order to keep the number of urban surface elements on file during
+!--    rrd_local calls. 
        INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  start_index_on_file 
        INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  end_index_on_file
 
        LOGICAL, INTENT(OUT)  ::  found 
-!!!    suehring: Why the SAVE attribute?       
-       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE   ::  tmp_surf_wall_h
-       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE   ::  tmp_surf_window_h
-       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE   ::  tmp_surf_green_h
-       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE   ::  tmp_surf_waste_h
+! MS: Why are there individual temporary arrays that all have the same size?
+       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  tmp_surf_wall_h
+       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  tmp_surf_window_h
+       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  tmp_surf_green_h
+       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  tmp_surf_mliq_h
+       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  tmp_surf_waste_h
        
        REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  tmp_wall_h
@@ -6387,707 +6338,726 @@
 
 
-          SELECT CASE ( restart_string(1:length) ) 
-
-             CASE ( 'ns_h_on_file_usm') 
-                IF ( k == 1 )  THEN
-                   READ ( 13 ) ns_h_on_file_usm
+       SELECT CASE ( restart_string(1:length) ) 
+
+          CASE ( 'ns_h_on_file_usm') 
+             IF ( k == 1 )  THEN
+                READ ( 13 ) ns_h_on_file_usm
+             
+                IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h )
+                IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) 
+                IF ( ALLOCATED( tmp_surf_window_h ) )                       &
+                   DEALLOCATE( tmp_surf_window_h ) 
+                IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) 
+                IF ( ALLOCATED( tmp_surf_green_h) )                         &
+                   DEALLOCATE( tmp_surf_green_h ) 
+                IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h )
+                IF ( ALLOCATED( tmp_surf_mliq_h) )                         &
+                   DEALLOCATE( tmp_surf_mliq_h )
+                IF ( ALLOCATED( tmp_surf_waste_h) )                         &
+                   DEALLOCATE( tmp_surf_waste_h )
+  
+!
+!--             Allocate temporary arrays for reading data on file. Note,
+!--             the size of allocated surface elements do not necessarily
+!--             need  to match the size of present surface elements on 
+!--             current processor, as the number of processors between 
+!--             restarts can change. 
+                ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1,                   &
+                                     1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1,                 &
+                                       1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1,                  &
+                                      1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_surf_mliq_h(1:ns_h_on_file_usm) )
+                ALLOCATE( tmp_surf_waste_h(1:ns_h_on_file_usm) )
+
+             ENDIF
+
+          CASE ( 'ns_v_on_file_usm')
+             IF ( k == 1 )  THEN
+                READ ( 13 ) ns_v_on_file_usm 
+
+                DO  l = 0, 3
+                   IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) )                 &
+                      DEALLOCATE( tmp_surf_wall_v(l)%t )
+                   IF ( ALLOCATED( tmp_wall_v(l)%t ) )                      &
+                      DEALLOCATE( tmp_wall_v(l)%t )
+                   IF ( ALLOCATED( tmp_surf_window_v(l)%t ) )               & 
+                      DEALLOCATE( tmp_surf_window_v(l)%t )
+                   IF ( ALLOCATED( tmp_window_v(l)%t ) )                    &
+                      DEALLOCATE( tmp_window_v(l)%t )
+                   IF ( ALLOCATED( tmp_surf_green_v(l)%t ) )                &
+                      DEALLOCATE( tmp_surf_green_v(l)%t )
+                   IF ( ALLOCATED( tmp_green_v(l)%t ) )                     &
+                      DEALLOCATE( tmp_green_v(l)%t )
+                   IF ( ALLOCATED( tmp_surf_waste_v(l)%t ) )                &
+                      DEALLOCATE( tmp_surf_waste_v(l)%t )
+                ENDDO 
+
+!
+!--             Allocate temporary arrays for reading data on file. Note,
+!--             the size of allocated surface elements do not necessarily
+!--             need to match the size of present surface elements on 
+!--             current processor, as the number of processors between 
+!--             restarts can change. 
+                DO  l = 0, 3
+                   ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) )
+                   ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1,           &
+                                             1:ns_v_on_file_usm(l) ) )
+                   ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) )
+                   ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1,         & 
+                                               1:ns_v_on_file_usm(l) ) )
+                   ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) )
+                   ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1,          &
+                                              1:ns_v_on_file_usm(l) ) )
+                   ALLOCATE( tmp_surf_waste_v(l)%t(1:ns_v_on_file_usm(l)) )
+                ENDDO
+
+             ENDIF    
+       
+          CASE ( 'usm_start_index_h', 'usm_start_index_v'  )   
+             IF ( k == 1 )  THEN
+
+                IF ( ALLOCATED( start_index_on_file ) )                     &
+                   DEALLOCATE( start_index_on_file )
+
+                ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file,     &
+                                               nxl_on_file:nxr_on_file) )
+
+                READ ( 13 )  start_index_on_file
+
+             ENDIF
+             
+          CASE ( 'usm_end_index_h', 'usm_end_index_v' )   
+             IF ( k == 1 )  THEN
+
+                IF ( ALLOCATED( end_index_on_file ) )                       &
+                   DEALLOCATE( end_index_on_file )
+
+                ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file,       &
+                                             nxl_on_file:nxr_on_file) )
+
+                READ ( 13 )  end_index_on_file
+
+             ENDIF
+       
+          CASE ( 't_surf_wall_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_wall_h_1 ) )                  &
+                   ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_surf_wall_h
+             ENDIF              
+             CALL surface_restore_elements(                                 &
+                                     t_surf_wall_h_1, tmp_surf_wall_h,      &
+                                     surf_usm_h%start_index,                &
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_wall_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(0)%t ) )             &
+                   ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_surf_wall_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t,      &
+                                     surf_usm_v(0)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+                   
+          CASE ( 't_surf_wall_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(1)%t ) )             &
+                   ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_surf_wall_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t,      &
+                                     surf_usm_v(1)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_wall_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(2)%t ) )             &
+                   ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_surf_wall_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t,      &
+                                     surf_usm_v(2)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+                   
+          CASE ( 't_surf_wall_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(3)%t ) )             &
+                   ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_surf_wall_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t,      &
+                                     surf_usm_v(3)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_green_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_green_h_1 ) )                 &
+                   ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_surf_green_h
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_green_h_1, tmp_surf_green_h,    &
+                                     surf_usm_h%start_index,                &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_green_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_green_v_1(0)%t ) )            &
+                   ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_surf_green_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_green_v_1(0)%t,                 &
+                                     tmp_surf_green_v(0)%t,                 &
+                                     surf_usm_v(0)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
                 
-                   IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h )
-                   IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) 
-                   IF ( ALLOCATED( tmp_surf_window_h ) )                       &
-                      DEALLOCATE( tmp_surf_window_h ) 
-                   IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) 
-                   IF ( ALLOCATED( tmp_surf_green_h) )                         &
-                      DEALLOCATE( tmp_surf_green_h ) 
-                   IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h )
-                   IF ( ALLOCATED( tmp_surf_waste_h) )                         &
-                      DEALLOCATE( tmp_surf_waste_h )
-  
-!
-!--                Allocate temporary arrays for reading data on file. Note,
-!--                the size of allocated surface elements do not necessarily
-!--                need  to match the size of present surface elements on 
-!--                current processor, as the number of processors between 
-!--                restarts can change. 
-                   ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) )
-                   ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1,                   &
-                                        1:ns_h_on_file_usm) )
-                   ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) )
-                   ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1,                 &
-                                          1:ns_h_on_file_usm) )
-                   ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) )
-                   ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1,                  &
-                                         1:ns_h_on_file_usm) )
-                   ALLOCATE( tmp_surf_waste_h(1:ns_h_on_file_usm) )
-
-                ENDIF
-
-             CASE ( 'ns_v_on_file_usm')
-                IF ( k == 1 )  THEN
-                   READ ( 13 ) ns_v_on_file_usm 
-
-                   DO  l = 0, 3
-                      IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) )                 &
-                         DEALLOCATE( tmp_surf_wall_v(l)%t )
-                      IF ( ALLOCATED( tmp_wall_v(l)%t ) )                      &
-                         DEALLOCATE( tmp_wall_v(l)%t )
-                      IF ( ALLOCATED( tmp_surf_window_v(l)%t ) )               & 
-                         DEALLOCATE( tmp_surf_window_v(l)%t )
-                      IF ( ALLOCATED( tmp_window_v(l)%t ) )                    &
-                         DEALLOCATE( tmp_window_v(l)%t )
-                      IF ( ALLOCATED( tmp_surf_green_v(l)%t ) )                &
-                         DEALLOCATE( tmp_surf_green_v(l)%t )
-                      IF ( ALLOCATED( tmp_green_v(l)%t ) )                     &
-                         DEALLOCATE( tmp_green_v(l)%t )
-                      IF ( ALLOCATED( tmp_surf_waste_v(l)%t ) )                &
-                         DEALLOCATE( tmp_surf_waste_v(l)%t )
-                   ENDDO 
-
-!
-!--                Allocate temporary arrays for reading data on file. Note,
-!--                the size of allocated surface elements do not necessarily
-!--                need to match the size of present surface elements on 
-!--                current processor, as the number of processors between 
-!--                restarts can change. 
-                   DO  l = 0, 3
-                      ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) )
-                      ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1,           &
-                                                1:ns_v_on_file_usm(l) ) )
-                      ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) )
-                      ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1,         & 
-                                                  1:ns_v_on_file_usm(l) ) )
-                      ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) )
-                      ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1,          &
-                                                 1:ns_v_on_file_usm(l) ) )
-                      ALLOCATE( tmp_surf_waste_v(l)%t(1:ns_v_on_file_usm(l)) )
-                   ENDDO
-
-                ENDIF    
-          
-             CASE ( 'usm_start_index_h', 'usm_start_index_v'  )   
-                IF ( k == 1 )  THEN
-
-                   IF ( ALLOCATED( start_index_on_file ) )                     &
-                      DEALLOCATE( start_index_on_file )
-
-                   ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file,     &
-                                                  nxl_on_file:nxr_on_file) )
-
-                   READ ( 13 )  start_index_on_file
-
-                ENDIF
+          CASE ( 't_surf_green_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_green_v_1(1)%t ) )            &
+                   ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_surf_green_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_green_v_1(1)%t,                 &
+                                     tmp_surf_green_v(1)%t,                 &
+                                     surf_usm_v(1)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_green_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_green_v_1(2)%t ) )            &
+                   ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_surf_green_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_green_v_1(2)%t,                 &
+                                     tmp_surf_green_v(2)%t,                 &
+                                     surf_usm_v(2)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
                 
-             CASE ( 'usm_end_index_h', 'usm_end_index_v' )   
-                IF ( k == 1 )  THEN
-
-                   IF ( ALLOCATED( end_index_on_file ) )                       &
-                      DEALLOCATE( end_index_on_file )
-
-                   ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file,       &
-                                                nxl_on_file:nxr_on_file) )
-
-                   READ ( 13 )  end_index_on_file
-
-                ENDIF
-          
-             CASE ( 't_surf_wall_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_wall_h_1 ) )                  &
-                      ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_surf_wall_h
-                ENDIF              
-                CALL surface_restore_elements(                                 &
-                                        t_surf_wall_h_1, tmp_surf_wall_h,      &
-                                        surf_usm_h%start_index,                &
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_wall_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(0)%t ) )             &
-                      ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_surf_wall_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t,      &
-                                        surf_usm_v(0)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-                      
-             CASE ( 't_surf_wall_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(1)%t ) )             &
-                      ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_surf_wall_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t,      &
-                                        surf_usm_v(1)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_wall_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(2)%t ) )             &
-                      ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_surf_wall_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t,      &
-                                        surf_usm_v(2)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-                      
-             CASE ( 't_surf_wall_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(3)%t ) )             &
-                      ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_surf_wall_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t,      &
-                                        surf_usm_v(3)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_green_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_green_h_1 ) )                 &
-                      ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_surf_green_h
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_green_h_1, tmp_surf_green_h,    &
-                                        surf_usm_h%start_index,                &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_green_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(0)%t ) )            &
-                      ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_surf_green_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_green_v_1(0)%t,                 &
-                                        tmp_surf_green_v(0)%t,                 &
-                                        surf_usm_v(0)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
+          CASE ( 't_surf_green_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_green_v_1(3)%t ) )            &
+                   ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_surf_green_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_green_v_1(3)%t,                 & 
+                                     tmp_surf_green_v(3)%t,                 &
+                                     surf_usm_v(3)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_window_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_window_h_1 ) )                &
+                   ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_surf_window_h
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_window_h_1,                     &
+                                     tmp_surf_window_h,                     &
+                                     surf_usm_h%start_index,                & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_window_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_window_v_1(0)%t ) )           &
+                   ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_surf_window_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_window_v_1(0)%t,                &
+                                     tmp_surf_window_v(0)%t,                &
+                                     surf_usm_v(0)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+                
+          CASE ( 't_surf_window_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_window_v_1(1)%t ) )           &
+                   ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_surf_window_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_window_v_1(1)%t,                &
+                                     tmp_surf_window_v(1)%t,                &
+                                     surf_usm_v(1)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_surf_window_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_window_v_1(2)%t ) )           &
+                   ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_surf_window_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_window_v_1(2)%t,                & 
+                                     tmp_surf_window_v(2)%t,                &
+                                     surf_usm_v(2)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+                
+          CASE ( 't_surf_window_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_surf_window_v_1(3)%t ) )           &
+                   ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_surf_window_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_surf_window_v_1(3)%t,                &  
+                                     tmp_surf_window_v(3)%t,                &
+                                     surf_usm_v(3)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 'm_liq_usm_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( m_liq_usm_h%var_usm_1d ) )           &
+                   ALLOCATE( m_liq_usm_h%var_usm_1d(1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_surf_mliq_h
+             ENDIF              
+             CALL surface_restore_elements(                                 &
+                                     m_liq_usm_h%var_usm_1d,                &
+                                     tmp_surf_mliq_h,                       &
+                                     surf_usm_h%start_index,                &
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 'waste_heat_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( surf_usm_h%waste_heat ) )            &
+                   ALLOCATE( surf_usm_h%waste_heat(1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_surf_waste_h
+             ENDIF              
+             CALL surface_restore_elements(                                 &
+                                     surf_usm_h%waste_heat,                 &
+                                     tmp_surf_waste_h,                      &
+                                     surf_usm_h%start_index,                &
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 'waste_heat_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( surf_usm_v(0)%waste_heat ) )         &
+                   ALLOCATE( surf_usm_v(0)%waste_heat(1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_surf_waste_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     surf_usm_v(0)%waste_heat,              &
+                                     tmp_surf_waste_v(0)%t,                 &
+                                     surf_usm_v(0)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
                    
-             CASE ( 't_surf_green_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(1)%t ) )            &
-                      ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_surf_green_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_green_v_1(1)%t,                 &
-                                        tmp_surf_green_v(1)%t,                 &
-                                        surf_usm_v(1)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_green_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(2)%t ) )            &
-                      ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_surf_green_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_green_v_1(2)%t,                 &
-                                        tmp_surf_green_v(2)%t,                 &
-                                        surf_usm_v(2)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
+          CASE ( 'waste_heat_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( surf_usm_v(1)%waste_heat ) )         &
+                   ALLOCATE( surf_usm_v(1)%waste_heat(1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_surf_waste_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     surf_usm_v(1)%waste_heat,              &
+                                     tmp_surf_waste_v(1)%t,                 &
+                                     surf_usm_v(1)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 'waste_heat_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( surf_usm_v(2)%waste_heat ) )         &
+                   ALLOCATE( surf_usm_v(2)%waste_heat(1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_surf_waste_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     surf_usm_v(2)%waste_heat,              &
+                                     tmp_surf_waste_v(2)%t,                 &
+                                     surf_usm_v(2)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
                    
-             CASE ( 't_surf_green_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(3)%t ) )            &
-                      ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_surf_green_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_green_v_1(3)%t,                 & 
-                                        tmp_surf_green_v(3)%t,                 &
-                                        surf_usm_v(3)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_window_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_window_h_1 ) )                &
-                      ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_surf_window_h
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_window_h_1,                     &
-                                        tmp_surf_window_h,                     &
-                                        surf_usm_h%start_index,                & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_window_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(0)%t ) )           &
-                      ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_surf_window_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_window_v_1(0)%t,                &
-                                        tmp_surf_window_v(0)%t,                &
-                                        surf_usm_v(0)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-                   
-             CASE ( 't_surf_window_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(1)%t ) )           &
-                      ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_surf_window_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_window_v_1(1)%t,                &
-                                        tmp_surf_window_v(1)%t,                &
-                                        surf_usm_v(1)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_surf_window_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(2)%t ) )           &
-                      ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_surf_window_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_window_v_1(2)%t,                & 
-                                        tmp_surf_window_v(2)%t,                &
-                                        surf_usm_v(2)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-                   
-             CASE ( 't_surf_window_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(3)%t ) )           &
-                      ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_surf_window_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_surf_window_v_1(3)%t,                &  
-                                        tmp_surf_window_v(3)%t,                &
-                                        surf_usm_v(3)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 'waste_heat_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( surf_usm_h%waste_heat ) )            &
-                      ALLOCATE( surf_usm_h%waste_heat(1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_surf_waste_h
-                ENDIF              
-                CALL surface_restore_elements(                                 &
-                                        surf_usm_h%waste_heat,                 &
-                                        tmp_surf_waste_h,                      &
-                                        surf_usm_h%start_index,                &
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )                 
-                                        
-             CASE ( 'waste_heat_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( surf_usm_v(0)%waste_heat ) )         &
-                      ALLOCATE( surf_usm_v(0)%waste_heat(1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_surf_waste_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        surf_usm_v(0)%waste_heat,              &
-                                        tmp_surf_waste_v(0)%t,                 &
-                                        surf_usm_v(0)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-                      
-             CASE ( 'waste_heat_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( surf_usm_v(1)%waste_heat ) )         &
-                      ALLOCATE( surf_usm_v(1)%waste_heat(1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_surf_waste_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        surf_usm_v(1)%waste_heat,              &
-                                        tmp_surf_waste_v(1)%t,                 &
-                                        surf_usm_v(1)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 'waste_heat_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( surf_usm_v(2)%waste_heat ) )         &
-                      ALLOCATE( surf_usm_v(2)%waste_heat(1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_surf_waste_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        surf_usm_v(2)%waste_heat,              &
-                                        tmp_surf_waste_v(2)%t,                 &
-                                        surf_usm_v(2)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-                      
-             CASE ( 'waste_heat_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( surf_usm_v(3)%waste_heat ) )         &
-                      ALLOCATE( surf_usm_v(3)%waste_heat(1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_surf_waste_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        surf_usm_v(3)%waste_heat,              &
-                                        tmp_surf_waste_v(3)%t,                 &
-                                        surf_usm_v(3)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_wall_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_wall_h_1 ) )                       &
-                      ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1,                &
-                                           1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_wall_h
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_wall_h_1, tmp_wall_h,                &
-                                        surf_usm_h%start_index,                & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_wall_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_wall_v_1(0)%t ) )                  &
-                      ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1,           &
-                                                1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_wall_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_wall_v_1(0)%t, tmp_wall_v(0)%t,      &
-                                        surf_usm_v(0)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_wall_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_wall_v_1(1)%t ) )                  &
-                      ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1,           &
-                                                1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_wall_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_wall_v_1(1)%t, tmp_wall_v(1)%t,      &
-                                        surf_usm_v(1)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_wall_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_wall_v_1(2)%t ) )                  &
-                      ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1,           &
-                                                1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_wall_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_wall_v_1(2)%t, tmp_wall_v(2)%t,      &
-                                        surf_usm_v(2)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file ,                    &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_wall_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_wall_v_1(3)%t ) )                  &
-                      ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1,           &
-                                                1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_wall_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_wall_v_1(3)%t, tmp_wall_v(3)%t,      &
-                                        surf_usm_v(3)%start_index,             &   
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_green_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_green_h_1 ) )                      &
-                      ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1,               &
-                                            1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_green_h
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_green_h_1, tmp_green_h,              &
-                                        surf_usm_h%start_index,                & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_green_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_green_v_1(0)%t ) )                 &
-                      ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1,          &
-                                                 1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_green_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_green_v_1(0)%t, tmp_green_v(0)%t,    &
-                                        surf_usm_v(0)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_green_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_green_v_1(1)%t ) )                 &
-                      ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1,          &
-                                                 1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_green_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_green_v_1(1)%t, tmp_green_v(1)%t,    &
-                                        surf_usm_v(1)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_green_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_green_v_1(2)%t ) )                 &
-                      ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1,          &
-                                                 1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_green_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_green_v_1(2)%t, tmp_green_v(2)%t,    &
-                                        surf_usm_v(2)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file ,                    &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_green_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_green_v_1(3)%t ) )                 &
-                      ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1,          &
-                                                 1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_green_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_green_v_1(3)%t, tmp_green_v(3)%t,    &
-                                        surf_usm_v(3)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_window_h' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_window_h_1 ) )                     &
-                      ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1,              &
-                                             1:surf_usm_h%ns) )
-                   READ ( 13 )  tmp_window_h
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_window_h_1, tmp_window_h,            &
-                                        surf_usm_h%start_index,                & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file, nxr_on_file )
-
-             CASE ( 't_window_v(0)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_window_v_1(0)%t ) )                &
-                      ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1,         &
-                                                  1:surf_usm_v(0)%ns) )
-                   READ ( 13 )  tmp_window_v(0)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_window_v_1(0)%t,                     & 
-                                        tmp_window_v(0)%t,                     &
-                                        surf_usm_v(0)%start_index,             &
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_window_v(1)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_window_v_1(1)%t ) )                &
-                      ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1,         &
-                                                  1:surf_usm_v(1)%ns) )
-                   READ ( 13 )  tmp_window_v(1)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_window_v_1(1)%t,                     & 
-                                        tmp_window_v(1)%t,                     &
-                                        surf_usm_v(1)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_window_v(2)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_window_v_1(2)%t ) )                &
-                      ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1,         &
-                                                  1:surf_usm_v(2)%ns) )
-                   READ ( 13 )  tmp_window_v(2)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_window_v_1(2)%t,                     & 
-                                        tmp_window_v(2)%t,                     &
-                                        surf_usm_v(2)%start_index,             &  
-                                        start_index_on_file,                   &
-                                        end_index_on_file ,                    &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE ( 't_window_v(3)' )
-                IF ( k == 1 )  THEN
-                   IF ( .NOT.  ALLOCATED( t_window_v_1(3)%t ) )                &
-                      ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) )
-                   READ ( 13 )  tmp_window_v(3)%t
-                ENDIF
-                CALL surface_restore_elements(                                 &
-                                        t_window_v_1(3)%t,                     & 
-                                        tmp_window_v(3)%t,                     &
-                                        surf_usm_v(3)%start_index,             & 
-                                        start_index_on_file,                   &
-                                        end_index_on_file,                     &
-                                        nxlc, nysc,                            &
-                                        nxlf, nxrf, nysf, nynf,                &
-                                        nys_on_file, nyn_on_file,              &
-                                        nxl_on_file,nxr_on_file )
-
-             CASE DEFAULT
-
-                   found = .FALSE.
-
-          END SELECT
-
-       
+          CASE ( 'waste_heat_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( surf_usm_v(3)%waste_heat ) )         &
+                   ALLOCATE( surf_usm_v(3)%waste_heat(1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_surf_waste_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     surf_usm_v(3)%waste_heat,              &
+                                     tmp_surf_waste_v(3)%t,                 &
+                                     surf_usm_v(3)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_wall_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_wall_h_1 ) )                       &
+                   ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1,                &
+                                        1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_wall_h
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_wall_h_1, tmp_wall_h,                &
+                                     surf_usm_h%start_index,                & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_wall_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_wall_v_1(0)%t ) )                  &
+                   ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1,           &
+                                             1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_wall_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_wall_v_1(0)%t, tmp_wall_v(0)%t,      &
+                                     surf_usm_v(0)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_wall_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_wall_v_1(1)%t ) )                  &
+                   ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1,           &
+                                             1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_wall_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_wall_v_1(1)%t, tmp_wall_v(1)%t,      &
+                                     surf_usm_v(1)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_wall_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_wall_v_1(2)%t ) )                  &
+                   ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1,           &
+                                             1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_wall_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_wall_v_1(2)%t, tmp_wall_v(2)%t,      &
+                                     surf_usm_v(2)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file ,                    &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_wall_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_wall_v_1(3)%t ) )                  &
+                   ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1,           &
+                                             1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_wall_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_wall_v_1(3)%t, tmp_wall_v(3)%t,      &
+                                     surf_usm_v(3)%start_index,             &   
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_green_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_green_h_1 ) )                      &
+                   ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1,               &
+                                         1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_green_h
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_green_h_1, tmp_green_h,              &
+                                     surf_usm_h%start_index,                & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_green_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_green_v_1(0)%t ) )                 &
+                   ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1,          &
+                                              1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_green_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_green_v_1(0)%t, tmp_green_v(0)%t,    &
+                                     surf_usm_v(0)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_green_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_green_v_1(1)%t ) )                 &
+                   ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1,          &
+                                              1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_green_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_green_v_1(1)%t, tmp_green_v(1)%t,    &
+                                     surf_usm_v(1)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_green_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_green_v_1(2)%t ) )                 &
+                   ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1,          &
+                                              1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_green_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_green_v_1(2)%t, tmp_green_v(2)%t,    &
+                                     surf_usm_v(2)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file ,                    &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_green_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_green_v_1(3)%t ) )                 &
+                   ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1,          &
+                                              1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_green_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_green_v_1(3)%t, tmp_green_v(3)%t,    &
+                                     surf_usm_v(3)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_window_h' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_window_h_1 ) )                     &
+                   ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1,              &
+                                          1:surf_usm_h%ns) )
+                READ ( 13 )  tmp_window_h
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_window_h_1, tmp_window_h,            &
+                                     surf_usm_h%start_index,                & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file, nxr_on_file )
+
+          CASE ( 't_window_v(0)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_window_v_1(0)%t ) )                &
+                   ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1,         &
+                                               1:surf_usm_v(0)%ns) )
+                READ ( 13 )  tmp_window_v(0)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_window_v_1(0)%t,                     & 
+                                     tmp_window_v(0)%t,                     &
+                                     surf_usm_v(0)%start_index,             &
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_window_v(1)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_window_v_1(1)%t ) )                &
+                   ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1,         &
+                                               1:surf_usm_v(1)%ns) )
+                READ ( 13 )  tmp_window_v(1)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_window_v_1(1)%t,                     & 
+                                     tmp_window_v(1)%t,                     &
+                                     surf_usm_v(1)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_window_v(2)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_window_v_1(2)%t ) )                &
+                   ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1,         &
+                                               1:surf_usm_v(2)%ns) )
+                READ ( 13 )  tmp_window_v(2)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_window_v_1(2)%t,                     & 
+                                     tmp_window_v(2)%t,                     &
+                                     surf_usm_v(2)%start_index,             &  
+                                     start_index_on_file,                   &
+                                     end_index_on_file ,                    &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE ( 't_window_v(3)' )
+             IF ( k == 1 )  THEN
+                IF ( .NOT.  ALLOCATED( t_window_v_1(3)%t ) )                &
+                   ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) )
+                READ ( 13 )  tmp_window_v(3)%t
+             ENDIF
+             CALL surface_restore_elements(                                 &
+                                     t_window_v_1(3)%t,                     & 
+                                     tmp_window_v(3)%t,                     &
+                                     surf_usm_v(3)%start_index,             & 
+                                     start_index_on_file,                   &
+                                     end_index_on_file,                     &
+                                     nxlc, nysc,                            &
+                                     nxlf, nxrf, nysf, nynf,                &
+                                     nys_on_file, nyn_on_file,              &
+                                     nxl_on_file,nxr_on_file )
+
+          CASE DEFAULT
+
+             found = .FALSE.
+
+       END SELECT
+
     END SUBROUTINE usm_rrd_local
 
@@ -8970,4 +8940,7 @@
         CALL wrd_write_string( 't_surf_green_h' )
         WRITE ( 14 )  t_surf_green_h
+
+        CALL wrd_write_string( 'm_liq_usm_h' )
+        WRITE ( 14 )  m_liq_usm_h%var_usm_1d
 !
 !--     Write restart data which is especially needed for the urban-surface 
