Index: /palm/trunk/SOURCE/data_output_2d.f90
===================================================================
--- /palm/trunk/SOURCE/data_output_2d.f90	(revision 2804)
+++ /palm/trunk/SOURCE/data_output_2d.f90	(revision 2805)
@@ -913,5 +913,4 @@
                                    surf_usm_h%frac(2,m) * surf_usm_h%r_a_window(m) )
                    ENDDO
-
                 ELSE
                    DO  i = nxl, nxr
Index: /palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 2804)
+++ /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 2805)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Bugfix in initialization of roughness over water surfaces
+! 
+! 2798 2018-02-09 17:16:39Z suehring
 ! Minor bugfix for initialization of pt_surface
 ! 
@@ -3382,5 +3385,4 @@
                    surf_lsm_h%z0q(m)    = water_pars_f%pars_xy(ind_w_z0h,j,i)
                 ENDIF
-
                 IF ( water_pars_f%pars_xy(ind_w_lambda_s,j,i) /=               &
                      water_pars_f%fill )                                       &
@@ -3864,4 +3866,5 @@
           ENDDO
        ENDIF
+
 !
 !--    Initial run actions
@@ -4264,5 +4267,5 @@
 !--    Calculate new roughness lengths (for water surfaces only, i.e. only 
 !-     horizontal surfaces)
-       CALL calc_z0_water_surface
+       IF ( .NOT. constant_roughness )  CALL calc_z0_water_surface
 
        t_soil_h_p    = t_soil_h
@@ -4307,4 +4310,5 @@
           ENDIF
        ENDDO
+
 
 
@@ -5897,5 +5901,4 @@
       ENDIF
       READ ( 13 ) ns_v_on_file_lsm
-
 !
 !--   Allocate temporary arrays to store surface data
Index: /palm/trunk/SOURCE/surface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/surface_mod.f90	(revision 2804)
+++ /palm/trunk/SOURCE/surface_mod.f90	(revision 2805)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Bugfix in re-mapping surface elements in case of restart runs 
+! 
+! 2766 2018-01-22 17:17:47Z kanani
 ! Removed preprocessor directive __chem
 ! 
@@ -875,4 +878,5 @@
        ENDDO
 
+
     END SUBROUTINE init_surface_arrays
 
@@ -1610,5 +1614,4 @@
        ENDDO
 
-
        CONTAINS
 
@@ -2181,15 +2184,17 @@
        IMPLICIT NONE
 
-       CHARACTER(LEN=1)             ::  dum  !< dummy string to create output-variable name
-
-       INTEGER(iwp)                 ::  i    !< running index x-direction
-       INTEGER(iwp)                 ::  j    !< running index y-direction
-       INTEGER(iwp)                 ::  l    !< index surface type orientation
-       INTEGER(iwp)                 ::  lsp  !< running index chemical species
-       INTEGER(iwp)                 ::  m    !< running index for surface elements on individual surface array
-       INTEGER(iwp), DIMENSION(0:3) ::  mm   !< running index for surface elements on gathered surface array
-
-       TYPE(surf_type), DIMENSION(0:2) ::  surf_h !< gathered horizontal surfaces, contains all surface types
-       TYPE(surf_type), DIMENSION(0:3) ::  surf_v !< gathered vertical surfaces, contains all surface types
+       CHARACTER(LEN=1)             ::  dum           !< dummy string to create output-variable name
+
+       INTEGER(iwp)                 ::  i             !< running index x-direction
+       INTEGER(iwp)                 ::  j             !< running index y-direction
+       INTEGER(iwp)                 ::  l             !< index surface type orientation
+       INTEGER(iwp)                 ::  lsp           !< running index chemical species
+       INTEGER(iwp)                 ::  m             !< running index for surface elements on individual surface array
+       INTEGER(iwp)                 ::  start_index_h !< start index for horizontal surface elements on gathered surface array
+       INTEGER(iwp), DIMENSION(0:3) ::  mm            !< running index for surface elements on gathered surface array
+       INTEGER(iwp), DIMENSION(0:3) ::  start_index_v !< start index for vertical surface elements on gathered surface array
+
+       TYPE(surf_type), DIMENSION(0:2) ::  surf_h     !< gathered horizontal surfaces, contains all surface types
+       TYPE(surf_type), DIMENSION(0:3) ::  surf_v     !< gathered vertical surfaces, contains all surface types
 
 !
@@ -2396,24 +2401,24 @@
           ENDDO
 !
-!--       Gather start- and end indices                                        
+!--       Gather start- and end indices
+          start_index_h = 1                                        
           DO  i = nxl, nxr
              DO  j = nys, nyn
+
+                surf_h(l)%start_index(j,i) = start_index_h
+                surf_h(l)%end_index(j,i)   = surf_h(l)%start_index(j,i) -1
+
                 IF ( surf_def_h(l)%start_index(j,i) <=                         &
-                     surf_def_h(l)%end_index(j,i) )  THEN
-                   surf_h(l)%start_index(j,i) = surf_def_h(l)%start_index(j,i)
-                   surf_h(l)%end_index(j,i)   = surf_def_h(l)%end_index(j,i)
-                ENDIF
+                     surf_def_h(l)%end_index(j,i) )                            &
+                   surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1
                 IF ( l == 0 )  THEN
                    IF ( surf_lsm_h%start_index(j,i) <=                         &
-                        surf_lsm_h%end_index(j,i) )  THEN
-                      surf_h(l)%start_index(j,i) = surf_lsm_h%start_index(j,i)
-                      surf_h(l)%end_index(j,i)   = surf_lsm_h%end_index(j,i)
-                   ENDIF
+                        surf_lsm_h%end_index(j,i) )                            &
+                      surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1
                    IF ( surf_usm_h%start_index(j,i) <=                         &
-                        surf_usm_h%end_index(j,i) )  THEN
-                      surf_h(l)%start_index(j,i) = surf_usm_h%start_index(j,i)
-                      surf_h(l)%end_index(j,i)   = surf_usm_h%end_index(j,i)
-                   ENDIF
+                        surf_usm_h%end_index(j,i) )                            &
+                      surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1
                 ENDIF
+                start_index_h = surf_h(l)%start_index(j,i) + 1
              ENDDO
           ENDDO
@@ -2611,4 +2616,28 @@
                                        surf_lsm_v(l)%end_index,                &
                                        surf_usm_v(l)%end_index   )
+
+!
+!--       Gather start- and end indices
+          start_index_v(l) = 1                                        
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                surf_v(l)%start_index(j,i) = start_index_v(l)
+                surf_v(l)%end_index(j,i)   = surf_v(l)%start_index(j,i) -1
+
+                IF ( surf_def_v(l)%start_index(j,i) <=                         &
+                     surf_def_v(l)%end_index(j,i) )                            &
+                   surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1
+                IF ( l == 0 )  THEN
+                   IF ( surf_lsm_v(l)%start_index(j,i) <=                      &
+                        surf_lsm_v(l)%end_index(j,i) )                         &
+                      surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1
+                   IF ( surf_usm_v(l)%start_index(j,i) <=                      &
+                        surf_usm_v(l)%end_index(j,i) )                         &
+                      surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1
+                ENDIF
+                start_index_v(l) = surf_v(l)%start_index(j,i) + 1
+             ENDDO
+          ENDDO
        ENDDO
 
@@ -2628,94 +2657,94 @@
           WRITE ( 14 )   surf_h(l)%end_index
 
-          WRITE ( 14 )  'surf_h(' // dum // ')%us                  ' 
           IF ( ALLOCATED ( surf_h(l)%us ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%us                  ' 
              WRITE ( 14 )  surf_h(l)%us
-          ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%ts                  '  
+          ENDIF 
           IF ( ALLOCATED ( surf_h(l)%ts ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%ts                  ' 
              WRITE ( 14 )  surf_h(l)%ts
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%qs                  '  
           IF ( ALLOCATED ( surf_h(l)%qs ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%qs                  '  
              WRITE ( 14 )  surf_h(l)%qs
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%ss                  '  
           IF ( ALLOCATED ( surf_h(l)%ss ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%ss                  '  
              WRITE ( 14 )  surf_h(l)%ss
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%qcs                 '
           IF ( ALLOCATED ( surf_h(l)%qcs ) )  THEN  
+             WRITE ( 14 )  'surf_h(' // dum // ')%qcs                 '
              WRITE ( 14 )  surf_h(l)%qcs
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%ncs                 '  
           IF ( ALLOCATED ( surf_h(l)%ncs ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%ncs                 ' 
              WRITE ( 14 )  surf_h(l)%ncs
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%qrs                 '
           IF ( ALLOCATED ( surf_h(l)%qrs ) )  THEN  
+             WRITE ( 14 )  'surf_h(' // dum // ')%qrs                 '
              WRITE ( 14 )  surf_h(l)%qrs
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%nrs                 '  
           IF ( ALLOCATED ( surf_h(l)%nrs ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%nrs                 '  
              WRITE ( 14 )  surf_h(l)%nrs
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%ol                  '  
           IF ( ALLOCATED ( surf_h(l)%ol ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%ol                  '  
              WRITE ( 14 )  surf_h(l)%ol
-          ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%rib                 '  
+          ENDIF 
           IF ( ALLOCATED ( surf_h(l)%rib ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%rib                 ' 
              WRITE ( 14 )  surf_h(l)%rib
-          ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%pt_surface          '  
+          ENDIF 
           IF ( ALLOCATED ( surf_h(l)%pt_surface ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%pt_surface          ' 
              WRITE ( 14 )  surf_h(l)%pt_surface
-          ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%usws                '  
+          ENDIF 
           IF ( ALLOCATED ( surf_h(l)%usws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%usws                ' 
              WRITE ( 14 )  surf_h(l)%usws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%vsws                '  
           IF ( ALLOCATED ( surf_h(l)%vsws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%vsws                '  
              WRITE ( 14 )  surf_h(l)%vsws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%shf                 ' 
           IF ( ALLOCATED ( surf_h(l)%shf ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%shf                 ' 
              WRITE ( 14 )  surf_h(l)%shf
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%qsws                '  
           IF ( ALLOCATED ( surf_h(l)%qsws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%qsws                '  
              WRITE ( 14 )  surf_h(l)%qsws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%ssws                '  
           IF ( ALLOCATED ( surf_h(l)%ssws ) )  THEN 
+             WRITE ( 14 )  'surf_h(' // dum // ')%ssws                '  
              WRITE ( 14 )  surf_h(l)%ssws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%css                 '
           IF ( ALLOCATED ( surf_h(l)%css ) )  THEN 
+             WRITE ( 14 )  'surf_h(' // dum // ')%css                 '
              WRITE ( 14 )  surf_h(l)%css
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%cssws               '
           IF ( ALLOCATED ( surf_h(l)%cssws ) )  THEN 
+             WRITE ( 14 )  'surf_h(' // dum // ')%cssws               '
              WRITE ( 14 )  surf_h(l)%cssws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%qcsws               '  
           IF ( ALLOCATED ( surf_h(l)%qcsws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%qcsws               '  
              WRITE ( 14 )  surf_h(l)%qcsws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%ncsws               '  
           IF ( ALLOCATED ( surf_h(l)%ncsws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%ncsws               '  
              WRITE ( 14 )  surf_h(l)%ncsws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%qrsws               '  
           IF ( ALLOCATED ( surf_h(l)%qrsws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%qrsws               '  
              WRITE ( 14 )  surf_h(l)%qrsws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%nrsws               '  
           IF ( ALLOCATED ( surf_h(l)%nrsws ) )  THEN
+             WRITE ( 14 )  'surf_h(' // dum // ')%nrsws               '  
              WRITE ( 14 )  surf_h(l)%nrsws
           ENDIF
-          WRITE ( 14 )  'surf_h(' // dum // ')%sasws               ' 
           IF ( ALLOCATED ( surf_h(l)%sasws ) )  THEN 
+             WRITE ( 14 )  'surf_h(' // dum // ')%sasws               ' 
              WRITE ( 14 )  surf_h(l)%sasws
           ENDIF
@@ -2731,98 +2760,98 @@
           WRITE ( 14 )   surf_v(l)%end_index
 
-          WRITE ( 14 )  'surf_v(' // dum // ')%us                  '  
           IF ( ALLOCATED ( surf_v(l)%us ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%us                  '  
              WRITE ( 14 )  surf_v(l)%us
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%ts                  ' 
           IF ( ALLOCATED ( surf_v(l)%ts ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%ts                  ' 
              WRITE ( 14 )  surf_v(l)%ts
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%qs                  '  
           IF ( ALLOCATED ( surf_v(l)%qs ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%qs                  '  
              WRITE ( 14 )  surf_v(l)%qs
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%ss                  '  
           IF ( ALLOCATED ( surf_v(l)%ss ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%ss                  '  
              WRITE ( 14 )  surf_v(l)%ss
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%qcs                 '  
           IF ( ALLOCATED ( surf_v(l)%qcs ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%qcs                 '  
              WRITE ( 14 )  surf_v(l)%qcs
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%ncs                 ' 
           IF ( ALLOCATED ( surf_v(l)%ncs ) )  THEN 
+             WRITE ( 14 )  'surf_v(' // dum // ')%ncs                 ' 
              WRITE ( 14 )  surf_v(l)%ncs
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%qrs                 '  
           IF ( ALLOCATED ( surf_v(l)%qrs ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%qrs                 '  
              WRITE ( 14 )  surf_v(l)%qrs
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%nrs                 ' 
           IF ( ALLOCATED ( surf_v(l)%nrs ) )  THEN 
+             WRITE ( 14 )  'surf_v(' // dum // ')%nrs                 ' 
              WRITE ( 14 )  surf_v(l)%nrs
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%ol                  '  
           IF ( ALLOCATED ( surf_v(l)%ol ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%ol                  '  
              WRITE ( 14 )  surf_v(l)%ol
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%rib                 '  
           IF ( ALLOCATED ( surf_v(l)%rib ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%rib                 '  
              WRITE ( 14 )  surf_v(l)%rib
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%pt_surface          '  
           IF ( ALLOCATED ( surf_v(l)%pt_surface ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%pt_surface          '  
              WRITE ( 14 )  surf_v(l)%pt_surface
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%shf                 '  
           IF ( ALLOCATED ( surf_v(l)%shf ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%shf                 '  
              WRITE ( 14 )  surf_v(l)%shf
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%qsws                '  
           IF ( ALLOCATED ( surf_v(l)%qsws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%qsws                '  
              WRITE ( 14 )  surf_v(l)%qsws
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%ssws                '  
           IF ( ALLOCATED ( surf_v(l)%ssws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%ssws                '  
              WRITE ( 14 )  surf_v(l)%ssws
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%css                 '  
           IF ( ALLOCATED ( surf_v(l)%css ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%css                 '  
              WRITE ( 14 )  surf_v(l)%css
-          ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%cssws               '  
+          ENDIF 
           IF ( ALLOCATED ( surf_v(l)%cssws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%cssws               ' 
              WRITE ( 14 )  surf_v(l)%cssws
-          ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%qcsws               '  
+          ENDIF 
           IF ( ALLOCATED ( surf_v(l)%qcsws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%qcsws               ' 
              WRITE ( 14 )  surf_v(l)%qcsws
-          ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%ncsws               '  
+          ENDIF 
           IF ( ALLOCATED ( surf_v(l)%ncsws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%ncsws               ' 
              WRITE ( 14 )  surf_v(l)%ncsws
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%qrsws               '  
           IF ( ALLOCATED ( surf_v(l)%qrsws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%qrsws               '  
              WRITE ( 14 )  surf_v(l)%qrsws
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%nrsws               '  
           IF ( ALLOCATED ( surf_v(l)%nrsws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%nrsws               '  
              WRITE ( 14 )  surf_v(l)%nrsws
-          ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%sasws               '  
+          ENDIF 
           IF ( ALLOCATED ( surf_v(l)%sasws ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%sasws               ' 
              WRITE ( 14 )  surf_v(l)%sasws
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%mom_uv              '  
           IF ( ALLOCATED ( surf_v(l)%mom_flux_uv ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%mom_uv              '  
              WRITE ( 14 )  surf_v(l)%mom_flux_uv
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%mom_w               '  
           IF ( ALLOCATED ( surf_v(l)%mom_flux_w ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%mom_w               '  
              WRITE ( 14 )  surf_v(l)%mom_flux_w
           ENDIF
-          WRITE ( 14 )  'surf_v(' // dum // ')%mom_tke             '  
           IF ( ALLOCATED ( surf_v(l)%mom_flux_tke ) )  THEN
+             WRITE ( 14 )  'surf_v(' // dum // ')%mom_tke             '  
              WRITE ( 14 )  surf_v(l)%mom_flux_tke
           ENDIF
@@ -3536,8 +3565,10 @@
                          surf_match_def  = surf_def_h(l)%end_index(jc,ic) >=   &
                                            surf_def_h(l)%start_index(jc,ic)
-                         surf_match_lsm  = surf_lsm_h%end_index(jc,ic)    >=   &
-                                           surf_lsm_h%start_index(jc,ic)
-                         surf_match_usm  = surf_usm_h%end_index(jc,ic)    >=   &
-                                           surf_usm_h%start_index(jc,ic)
+                         surf_match_lsm  = ( surf_lsm_h%end_index(jc,ic)  >=   &
+                                             surf_lsm_h%start_index(jc,ic) )   &
+                                     .AND.  l == 0 
+                         surf_match_usm  = ( surf_usm_h%end_index(jc,ic)  >=   &
+                                             surf_usm_h%start_index(jc,ic) )   &
+                                     .AND.  l == 0 
 
                          IF ( surf_match_def )  THEN
@@ -3587,6 +3618,4 @@
                          surf_match_usm  = surf_usm_v(l)%end_index(jc,ic) >=   &
                                            surf_usm_v(l)%start_index(jc,ic)
-
-
 
                          IF ( surf_match_def )  THEN
@@ -3634,5 +3663,4 @@
        ENDIF
 
-
        CONTAINS
 !------------------------------------------------------------------------------!
Index: /palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 2804)
+++ /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 2805)
@@ -26,4 +26,7 @@
 ! -----------------
 ! $Id$
+! Initialization of resistances.
+! 
+! 2797 2018-02-08 13:24:35Z suehring
 ! Comment concerning output of ground-heat flux added.
 ! 
@@ -3473,4 +3476,18 @@
                  surf_usm_v(l)%ground_level(m) = .TRUE.
 
+           ENDDO
+        ENDDO
+!
+!--     Initialization of resistances. 
+        DO  m = 1, surf_usm_h%ns
+           surf_usm_h%r_a(m)        = 50.0_wp
+           surf_usm_h%r_a_green(m)  = 50.0_wp
+           surf_usm_h%r_a_window(m) = 50.0_wp
+        ENDDO
+        DO  l = 0, 3
+           DO  m = 1, surf_usm_v(l)%ns
+              surf_usm_v(l)%r_a(m)        = 50.0_wp
+              surf_usm_v(l)%r_a_green(m)  = 50.0_wp
+              surf_usm_v(l)%r_a_window(m) = 50.0_wp
            ENDDO
         ENDDO
