Index: /palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 4601)
+++ /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 4602)
@@ -20,9 +20,15 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+!
+!
 ! Former revisions:
 ! -----------------
 ! $Id$
+! - Bugfix in level 3 initialization of pavements - wrongly assumed existence of
+!   pavement_subsurface_pars
+! - Add missing initialization of albedo type with values given from static input
+!   file
+! 
+! 4581 2020-06-29 08:49:58Z suehring
 ! Minor formatting of error message
 ! 
@@ -264,5 +270,6 @@
 
     USE netcdf_data_input_mod,                                                 &
-        ONLY :  building_type_f,                                               &
+        ONLY :  albedo_type_f,                                                 &
+                building_type_f,                                               &
                 char_fill,                                                     &
                 char_lod,                                                      &
@@ -4036,4 +4043,75 @@
                    surf_lsm_h%z0q(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
                 ENDIF
+                IF ( pavement_pars_f%pars_xy(ind_p_at,j,i) /=                  &
+                     pavement_pars_f%fill )                                    &
+                   surf_lsm_h%albedo_type(m,ind_pav_green) =                   &
+                                   INT( pavement_pars_f%pars_xy(ind_p_at,j,i) )
+                IF ( pavement_pars_f%pars_xy(ind_p_emis,j,i) /=                &
+                     pavement_pars_f%fill )                                    &
+                   surf_lsm_h%emissivity(m,ind_pav_green)  =                   &
+                                   pavement_pars_f%pars_xy(ind_p_emis,j,i)
+             ENDIF
+
+          ENDDO
+!
+!--       Vertical surfaces
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) )
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) )
+!
+!--             If surface element is not a pavement surface and any value in
+!--             pavement_pars is given, neglect this information and give an
+!--             informative message that this value will not be used.
+                IF ( .NOT. surf_lsm_v(l)%pavement_surface(m)  .AND.            &
+                      ANY( pavement_pars_f%pars_xy(:,j,i) /=                   &
+                      pavement_pars_f%fill ) )  THEN
+                   WRITE( message_string, * )                                  &
+                                 'surface element at grid point (j,i) = (',    &
+                                 j, i, ') is not a pavement surface, ',        &
+                                 'so that information given in ',              &
+                                 'pavement_pars at this point is neglected.'
+                   CALL message( 'land_surface_model_mod', 'PA0647', 0, 0, myid, 6, 0 )
+                ELSE
+                   IF ( pavement_pars_f%pars_xy(ind_p_z0,j,i) /=               &
+                        pavement_pars_f%fill )                                 &
+                      surf_lsm_v(l)%z0(m) = pavement_pars_f%pars_xy(ind_p_z0,j,i)
+                   IF ( pavement_pars_f%pars_xy(ind_p_z0h,j,i) /=              &
+                        pavement_pars_f%fill )  THEN
+                      surf_lsm_v(l)%z0h(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+                      surf_lsm_v(l)%z0q(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+                   ENDIF
+                   IF ( pavement_pars_f%pars_xy(ind_p_at,j,i) /=               &
+                        pavement_pars_f%fill )                                 &
+                      surf_lsm_v(l)%albedo_type(m,ind_pav_green) =             &
+                                   INT( pavement_pars_f%pars_xy(ind_p_at,j,i) )
+
+                   IF ( pavement_pars_f%pars_xy(ind_p_emis,j,i) /=             &
+                        pavement_pars_f%fill )                                 &
+                      surf_lsm_v(l)%emissivity(m,ind_pav_green)  =             &
+                                   pavement_pars_f%pars_xy(ind_p_emis,j,i)
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Moreover, for grid points which are flagged with pavement-type 0 or whre
+!--    pavement_subsurface_pars_f is provided, soil heat conductivity and
+!--    capacity are initialized with parameters given in
+!--    pavement_subsurface_pars read from file.
+       IF ( pavement_subsurface_pars_f%from_file )  THEN
+!
+!--       Set pavement depth to nzt_soil. Please note, this is just a
+!--       workaround at the moment.
+          DO  m = 1, surf_lsm_h%ns
+             IF ( surf_lsm_h%pavement_surface(m) )  THEN
+
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+
+                surf_lsm_h%nzt_pavement(m) = nzt_soil
+
                 IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i) &
                      /= pavement_subsurface_pars_f%fill )  THEN
@@ -4054,99 +4132,16 @@
                                                   * 0.25_wp
                 ENDIF
-                IF ( pavement_pars_f%pars_xy(ind_p_at,j,i) /=                  &
-                     pavement_pars_f%fill )                                    &
-                   surf_lsm_h%albedo_type(m,ind_pav_green) =                   &
-                                   INT( pavement_pars_f%pars_xy(ind_p_at,j,i) )
-                IF ( pavement_pars_f%pars_xy(ind_p_emis,j,i) /=                &
-                     pavement_pars_f%fill )                                    &
-                   surf_lsm_h%emissivity(m,ind_pav_green)  =                   &
-                                   pavement_pars_f%pars_xy(ind_p_emis,j,i)
-             ENDIF
-
-          ENDDO
-!
-!--       Vertical surfaces
-          DO  l = 0, 3
-             DO  m = 1, surf_lsm_v(l)%ns
-                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
-                                                surf_lsm_v(l)%building_covered(m) )
-                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
-                                                surf_lsm_v(l)%building_covered(m) )
-!
-!--             If surface element is not a pavement surface and any value in
-!--             pavement_pars is given, neglect this information and give an
-!--             informative message that this value will not be used.
-                IF ( .NOT. surf_lsm_v(l)%pavement_surface(m)  .AND.            &
-                      ANY( pavement_pars_f%pars_xy(:,j,i) /=                   &
-                      pavement_pars_f%fill ) )  THEN
-                   WRITE( message_string, * )                                  &
-                                 'surface element at grid point (j,i) = (',    &
-                                 j, i, ') is not a pavement surface, ',        &
-                                 'so that information given in ',              &
-                                 'pavement_pars at this point is neglected.'
-                   CALL message( 'land_surface_model_mod', 'PA0647', 0, 0, myid, 6, 0 )
-                ELSE
-
-                   IF ( pavement_pars_f%pars_xy(ind_p_z0,j,i) /=               &
-                        pavement_pars_f%fill )                                 &
-                      surf_lsm_v(l)%z0(m) = pavement_pars_f%pars_xy(ind_p_z0,j,i)
-                   IF ( pavement_pars_f%pars_xy(ind_p_z0h,j,i) /=              &
-                        pavement_pars_f%fill )  THEN
-                      surf_lsm_v(l)%z0h(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
-                      surf_lsm_v(l)%z0q(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+
+                DO  k = nzb_soil, nzt_soil
+                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i) /= &
+                        pavement_subsurface_pars_f%fill )  THEN
+                      surf_lsm_h%lambda_h_def(k,m) =                              &
+                          pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i)
                    ENDIF
-                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
-                        /= pavement_subsurface_pars_f%fill )  THEN
-                      surf_lsm_v(l)%lambda_surface_s(m) =                      &
-                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
-                                                  * ddz_soil(nzb_soil)         &
-                                                  * 2.0_wp
-                      surf_lsm_v(l)%lambda_surface_u(m) =                      &
-                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
-                                                  * ddz_soil(nzb_soil)         &
-                                                  * 2.0_wp
+                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i) /= &
+                        pavement_subsurface_pars_f%fill )  THEN
+                      surf_lsm_h%rho_c_total_def(k,m) =                           &
+                          pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i)
                    ENDIF
-                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i) &
-                        /= pavement_subsurface_pars_f%fill )  THEN
-                      surf_lsm_v(l)%c_surface(m)    =                          &
-                         pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i)&
-                                                  * dz_soil(nzb_soil)          &
-                                                  * 0.25_wp
-                   ENDIF
-                   IF ( pavement_pars_f%pars_xy(ind_p_at,j,i) /=               &
-                        pavement_pars_f%fill )                                 &
-                      surf_lsm_v(l)%albedo_type(m,ind_pav_green) =             &
-                                   INT( pavement_pars_f%pars_xy(ind_p_at,j,i) )
-
-                   IF ( pavement_pars_f%pars_xy(ind_p_emis,j,i) /=             &
-                        pavement_pars_f%fill )                                 &
-                      surf_lsm_v(l)%emissivity(m,ind_pav_green)  =             &
-                                   pavement_pars_f%pars_xy(ind_p_emis,j,i)
-                ENDIF
-             ENDDO
-          ENDDO
-       ENDIF
-!
-!--    Moreover, for grid points which are flagged with pavement-type 0 or whre
-!--    pavement_subsurface_pars_f is provided, soil heat conductivity and
-!--    capacity are initialized with parameters given in
-!--    pavement_subsurface_pars read from file.
-       IF ( pavement_subsurface_pars_f%from_file )  THEN
-!
-!--       Set pavement depth to nzt_soil. Please note, this is just a
-!--       workaround at the moment.
-          DO  m = 1, surf_lsm_h%ns
-             IF ( surf_lsm_h%pavement_surface(m) )  THEN
-
-                i = surf_lsm_h%i(m)
-                j = surf_lsm_h%j(m)
-
-                surf_lsm_h%nzt_pavement(m) = nzt_soil
-
-                DO  k = nzb_soil, nzt_soil
-                   surf_lsm_h%lambda_h_def(k,m) =                              &
-                       pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i)
-                   surf_lsm_h%rho_c_total_def(k,m) =                           &
-                       pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i)
                 ENDDO
 
@@ -4164,9 +4159,34 @@
                    surf_lsm_v(l)%nzt_pavement(m) = nzt_soil
 
+                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)                  &
+                        /= pavement_subsurface_pars_f%fill )  THEN
+                      surf_lsm_v(l)%lambda_surface_s(m) =                                          &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)                    &
+                                                  * ddz_soil(nzb_soil)                             &
+                                                  * 2.0_wp
+                      surf_lsm_v(l)%lambda_surface_u(m) =                                          &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)                    &
+                                                  * ddz_soil(nzb_soil)                             &
+                                                  * 2.0_wp
+                   ENDIF
+                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i)                     &
+                        /= pavement_subsurface_pars_f%fill )  THEN
+                      surf_lsm_v(l)%c_surface(m)    =                                              &
+                         pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i)                    &
+                                                  * dz_soil(nzb_soil)                              &
+                                                  * 0.25_wp
+                   ENDIF
+
                    DO  k = nzb_soil, nzt_soil
-                      surf_lsm_v(l)%lambda_h_def(k,m) =                        &
-                       pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i)
-                      surf_lsm_v(l)%rho_c_total_def(k,m) =                     &
-                       pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i)
+                      IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)               &
+                           /= pavement_subsurface_pars_f%fill )  THEN
+                         surf_lsm_v(l)%lambda_h_def(k,m) =                                         &
+                            pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i)
+                      ENDIF
+                      IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i)                  &
+                           /= pavement_subsurface_pars_f%fill )  THEN
+                         surf_lsm_v(l)%rho_c_total_def(k,m) =                                      &
+                            pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i)
+                      ENDIF
                    ENDDO
 
@@ -4175,5 +4195,25 @@
           ENDDO
        ENDIF
-
+!
+!--    Initialize albedo type via given type from static input file. Please note, even though
+!--    the albedo type has been already given by the pars, albedo_type overwrites these values.
+       IF ( albedo_type_f%from_file )  THEN
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+             IF ( albedo_type_f%var(j,i) /= albedo_type_f%fill )                                   &
+                surf_lsm_h%albedo_type(m,:) = albedo_type_f%var(j,i)
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,                             &
+                                                surf_lsm_v(l)%building_covered(m) )
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,                             &
+                                                surf_lsm_v(l)%building_covered(m) )
+                IF ( albedo_type_f%var(j,i) /= albedo_type_f%fill )                                &
+                   surf_lsm_v(l)%albedo_type(m,:) = albedo_type_f%var(j,i)
+             ENDDO
+          ENDDO
+       ENDIF
 !
 !--    Initial run actions
Index: /palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4601)
+++ /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4602)
@@ -22,9 +22,12 @@
 ! Current revisions:
 ! -----------------
-! 
-! 
+!
+!
 ! Former revisions:
 ! -----------------
 ! $Id$
+! Add missing initialization of albedo type with values given from static input file
+! 
+! 4581 2020-06-29 08:49:58Z suehring
 ! Missing initialization in case of cyclic_fill runs
 ! 
@@ -3513,5 +3516,6 @@
 
     USE netcdf_data_input_mod,                                                                     &
-        ONLY:  building_pars_f,                                                                    &
+        ONLY:  albedo_type_f,                                                                      &
+               building_pars_f,                                                                    &
                building_surface_pars_f,                                                            &
                building_type_f,                                                                    &
@@ -4340,196 +4344,196 @@
 
 !
-!--              In order to distinguish between ground floor level and above-ground-floor level
-!--              surfaces, set input indices.
-                 ind_wall_frac    = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl,                  &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl,            &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_win_frac     = MERGE( ind_win_frac_gfl, ind_win_frac_agfl,                    &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_lai_w        = MERGE( ind_lai_w_gfl, ind_lai_w_agfl,                          &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_z0           = MERGE( ind_z0_gfl, ind_z0_agfl,                                &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_z0qh         = MERGE( ind_z0qh_gfl, ind_z0qh_agfl,                            &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_hc1          = MERGE( ind_hc1_gfl, ind_hc1_agfl,                              &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_hc2          = MERGE( ind_hc2_gfl, ind_hc2_agfl,                              &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_hc3          = MERGE( ind_hc3_gfl, ind_hc3_agfl,                              &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_tc1          = MERGE( ind_tc1_gfl, ind_tc1_agfl,                              &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_tc2          = MERGE( ind_tc2_gfl, ind_tc2_agfl,                              &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_tc3          = MERGE( ind_tc3_gfl, ind_tc3_agfl,                              &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_emis_wall    = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl,                  &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_emis_green   = MERGE( ind_emis_green_gfl, ind_emis_green_agfl,                &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_emis_win     = MERGE( ind_emis_win_gfl, ind_emis_win_agfl,                    &
-                                           surf_usm_v(l)%ground_level(m) )
-                 ind_trans        = MERGE( ind_trans_gfl, ind_trans_agfl,                          &
-                                           surf_usm_v(l)%ground_level(m) )
-
-!
-!--              Initialize relatvie wall- (0), green- (1) and window (2) fractions
-                 IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= building_pars_f%fill )         &
-                    surf_usm_v(l)%frac(m,ind_veg_wall) = building_pars_f%pars_xy(ind_wall_frac,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%frac(m,ind_pav_green) =                                          &
-                    building_pars_f%pars_xy(ind_green_frac_w,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= building_pars_f%fill )          &
-                    surf_usm_v(l)%frac(m,ind_wat_win) = building_pars_f%pars_xy(ind_win_frac,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill )             &
-                    surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN
-                    surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i)
-                    surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i)
-                 ENDIF
-
-
-                 IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN
-                    surf_usm_v(l)%rho_c_green(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i)
-                    surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i)
-                 ENDIF
-                 IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN
-                    surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i)
-                    surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i)
-                 ENDIF
-                 IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
-                    surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i)
-                    surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i)
-                 ENDIF
-                 IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
-                    surf_usm_v(l)%lambda_h_green(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i)
-                    surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) =                                   &
-                    building_pars_f%pars_xy(ind_tc1,j,i)
-                 ENDIF
-                 IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) =                                   &
-                    building_pars_f%pars_xy(ind_tc2,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) =                                   &
-                    building_pars_f%pars_xy(ind_tc3,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
-                    surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i)
-                    surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) =                                  &
-                    building_pars_f%pars_xy(ind_tc1,j,i)
-                 ENDIF
-                 IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) =                                  &
-                    building_pars_f%pars_xy(ind_tc2,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )               &
-                    surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) =                                  &
-                    building_pars_f%pars_xy(ind_tc3,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_indoor_target_temp_summer,j,i) /=                &
-                      building_pars_f%fill )                                                       &
-                    surf_usm_v(l)%target_temp_summer(m) =                                          &
-                    building_pars_f%pars_xy(ind_indoor_target_temp_summer,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_indoor_target_temp_winter,j,i) /=                &
-                      building_pars_f%fill )                                                       &
-                    surf_usm_v(l)%target_temp_winter(m) =                                          &
-                    building_pars_f%pars_xy(ind_indoor_target_temp_winter,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill )         &
-                    surf_usm_v(l)%emissivity(m,ind_veg_wall) =                                     &
-                    building_pars_f%pars_xy(ind_emis_wall,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )        &
-                    surf_usm_v(l)%emissivity(m,ind_pav_green) =                                    &
-                    building_pars_f%pars_xy(ind_emis_green,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill )          &
-                    surf_usm_v(l)%emissivity(m,ind_wat_win)   =                                    &
-                    building_pars_f%pars_xy(ind_emis_win,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill )             &
-                    surf_usm_v(l)%transmissivity(m) =                                              &
-                    building_pars_f%pars_xy(ind_trans,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill )                &
-                    surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )              &
-                    surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )              &
-                    surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_alb_wall_agfl,j,i) /= building_pars_f%fill )     &
-                    surf_usm_v(l)%albedo_type(m,ind_veg_wall)  =                                   &
-                    building_pars_f%pars_xy(ind_alb_wall_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_alb_green_agfl,j,i) /= building_pars_f%fill )    &
-                    surf_usm_v(l)%albedo_type(m,ind_pav_green) =                                   &
-                    building_pars_f%pars_xy(ind_alb_green_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_alb_win_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%albedo_type(m,ind_wat_win)   =                                   &
-                    building_pars_f%pars_xy(ind_alb_win_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_1_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_2_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_3_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_4_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_1_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw_green(nzb_wall,m) =                                           &
-                    building_pars_f%pars_xy(ind_thick_1_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_2_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw_green(nzb_wall+1,m) =                                         &
-                    building_pars_f%pars_xy(ind_thick_2_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_3_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw_green(nzb_wall+2,m) =                                         &
-                    building_pars_f%pars_xy(ind_thick_3_agfl,j,i)
-
-                 IF ( building_pars_f%pars_xy(ind_thick_4_agfl,j,i) /= building_pars_f%fill )      &
-                    surf_usm_v(l)%zw_green(nzb_wall+3,m) =                                         &
-                    building_pars_f%pars_xy(ind_thick_4_agfl,j,i)
+!--           In order to distinguish between ground floor level and above-ground-floor level
+!--           surfaces, set input indices.
+              ind_wall_frac    = MERGE( ind_wall_frac_gfl, ind_wall_frac_agfl,                     &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl,               &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_win_frac     = MERGE( ind_win_frac_gfl, ind_win_frac_agfl,                       &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_lai_w        = MERGE( ind_lai_w_gfl, ind_lai_w_agfl,                             &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_z0           = MERGE( ind_z0_gfl, ind_z0_agfl,                                   &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_z0qh         = MERGE( ind_z0qh_gfl, ind_z0qh_agfl,                               &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc1          = MERGE( ind_hc1_gfl, ind_hc1_agfl,                                 &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc2          = MERGE( ind_hc2_gfl, ind_hc2_agfl,                                 &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc3          = MERGE( ind_hc3_gfl, ind_hc3_agfl,                                 &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc1          = MERGE( ind_tc1_gfl, ind_tc1_agfl,                                 &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc2          = MERGE( ind_tc2_gfl, ind_tc2_agfl,                                 &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc3          = MERGE( ind_tc3_gfl, ind_tc3_agfl,                                 &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_emis_wall    = MERGE( ind_emis_wall_gfl, ind_emis_wall_agfl,                     &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_emis_green   = MERGE( ind_emis_green_gfl, ind_emis_green_agfl,                   &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_emis_win     = MERGE( ind_emis_win_gfl, ind_emis_win_agfl,                       &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_trans        = MERGE( ind_trans_gfl, ind_trans_agfl,                             &
+                                        surf_usm_v(l)%ground_level(m) )
+
+!
+!--           Initialize relatvie wall- (0), green- (1) and window (2) fractions
+              IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /= building_pars_f%fill )            &
+                 surf_usm_v(l)%frac(m,ind_veg_wall) = building_pars_f%pars_xy(ind_wall_frac,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%frac(m,ind_pav_green) =                                             &
+                 building_pars_f%pars_xy(ind_green_frac_w,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /= building_pars_f%fill )             &
+                 surf_usm_v(l)%frac(m,ind_wat_win) = building_pars_f%pars_xy(ind_win_frac,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill )                &
+                 surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_v(l)%rho_c_wall(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i)
+                 surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i)
+              ENDIF
+
+
+              IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_v(l)%rho_c_green(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i)
+                 surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_v(l)%rho_c_window(nzb_wall,m) = building_pars_f%pars_xy(ind_hc1,j,i)
+                 surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_v(l)%lambda_h(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i)
+                 surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_v(l)%lambda_h_green(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i)
+                 surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) =                                      &
+                 building_pars_f%pars_xy(ind_tc1,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) =                                      &
+                 building_pars_f%pars_xy(ind_tc2,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) =                                      &
+                 building_pars_f%pars_xy(ind_tc3,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_v(l)%lambda_h_window(nzb_wall,m) = building_pars_f%pars_xy(ind_tc1,j,i)
+                 surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) =                                     &
+                 building_pars_f%pars_xy(ind_tc1,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) =                                     &
+                 building_pars_f%pars_xy(ind_tc2,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )                  &
+                 surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) =                                     &
+                 building_pars_f%pars_xy(ind_tc3,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_indoor_target_temp_summer,j,i) /=                   &
+                   building_pars_f%fill )                                                          &
+                 surf_usm_v(l)%target_temp_summer(m) =                                             &
+                 building_pars_f%pars_xy(ind_indoor_target_temp_summer,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_indoor_target_temp_winter,j,i) /=                   &
+                   building_pars_f%fill )                                                          &
+                 surf_usm_v(l)%target_temp_winter(m) =                                             &
+                 building_pars_f%pars_xy(ind_indoor_target_temp_winter,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill )            &
+                 surf_usm_v(l)%emissivity(m,ind_veg_wall) =                                        &
+                 building_pars_f%pars_xy(ind_emis_wall,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )           &
+                 surf_usm_v(l)%emissivity(m,ind_pav_green) =                                       &
+                 building_pars_f%pars_xy(ind_emis_green,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill )             &
+                 surf_usm_v(l)%emissivity(m,ind_wat_win)   =                                       &
+                 building_pars_f%pars_xy(ind_emis_win,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill )                &
+                 surf_usm_v(l)%transmissivity(m) =                                                 &
+                 building_pars_f%pars_xy(ind_trans,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill )                   &
+                 surf_usm_v(l)%z0(m) = building_pars_f%pars_xy(ind_z0,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )                 &
+                 surf_usm_v(l)%z0h(m) = building_pars_f%pars_xy(ind_z0qh,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )                 &
+                 surf_usm_v(l)%z0q(m) = building_pars_f%pars_xy(ind_z0qh,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_alb_wall_agfl,j,i) /= building_pars_f%fill )        &
+                 surf_usm_v(l)%albedo_type(m,ind_veg_wall)  =                                      &
+                 building_pars_f%pars_xy(ind_alb_wall_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_alb_green_agfl,j,i) /= building_pars_f%fill )       &
+                 surf_usm_v(l)%albedo_type(m,ind_pav_green) =                                      &
+                 building_pars_f%pars_xy(ind_alb_green_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_alb_win_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%albedo_type(m,ind_wat_win)   =                                      &
+                 building_pars_f%pars_xy(ind_alb_win_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_1_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_2_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_3_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_4_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_1_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw_green(nzb_wall,m) =                                              &
+                 building_pars_f%pars_xy(ind_thick_1_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_2_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw_green(nzb_wall+1,m) =                                            &
+                 building_pars_f%pars_xy(ind_thick_2_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_3_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw_green(nzb_wall+2,m) =                                            &
+                 building_pars_f%pars_xy(ind_thick_3_agfl,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_4_agfl,j,i) /= building_pars_f%fill )         &
+                 surf_usm_v(l)%zw_green(nzb_wall+3,m) =                                            &
+                 building_pars_f%pars_xy(ind_thick_4_agfl,j,i)
 
            ENDDO
@@ -4822,4 +4826,24 @@
         ENDDO
      ENDIF
+!
+!--    Initialize albedo type via given type from static input file. Please note, even though
+!--    the albedo type has been already given by the pars, albedo_type overwrites these values.
+       IF ( albedo_type_f%from_file )  THEN
+          DO  m = 1, surf_usm_h%ns
+             i = surf_usm_h%i(m)
+             j = surf_usm_h%j(m)
+             IF ( albedo_type_f%var(j,i) /= albedo_type_f%fill )                                   &
+                surf_usm_h%albedo_type(m,:) = albedo_type_f%var(j,i)
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_usm_v(l)%ns
+                i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff
+                j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff
+
+                IF ( albedo_type_f%var(j,i) /= albedo_type_f%fill )                                &
+                   surf_usm_v(l)%albedo_type(m,:) = albedo_type_f%var(j,i)
+             ENDDO
+          ENDDO
+       ENDIF
 !
 !--  Run further checks to ensure that the respecitve material fractions are prescribed properly.
