Index: /palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3350)
+++ /palm/trunk/SOURCE/radiation_model_mod.f90	(revision 3351)
@@ -28,4 +28,8 @@
 ! -----------------
 ! $Id$
+! Do not overwrite values of spectral and broadband albedo during initialization
+! if they are already initialized in the urban-surface model via ASCII input.
+! 
+! 3337 2018-10-12 15:17:09Z kanani
 ! - New RTM version 2.9: (Pavel Krc, Jaroslav Resler, ICS, Prague)
 !   added calculation of the MRT inside the RTM module
@@ -1753,5 +1757,5 @@
 !
 !--       Allocate arrays for broadband albedo, and level 1 initialization
-!--       via namelist paramter, unless already allocated.
+!--       via namelist paramter, unless not already allocated.
           IF ( .NOT. ALLOCATED(surf_lsm_h%albedo) )  THEN
              ALLOCATE( surf_lsm_h%albedo(0:2,1:surf_lsm_h%ns)     )
@@ -1775,5 +1779,7 @@
 !
 !--       Level 2 initialization of broadband albedo via given albedo_type. 
-!--       Only if albedo_type is non-zero
+!--       Only if albedo_type is non-zero. In case of urban surface and 
+!--       input data is read from ASCII file, albedo_type will be zero, so that
+!--       albedo won't be overwritten. 
           DO  m = 1, surf_lsm_h%ns
              IF ( surf_lsm_h%albedo_type(ind_veg_wall,m) /= 0 )                &
@@ -1969,9 +1975,16 @@
           ENDIF
           IF ( surf_usm_h%ns > 0 )  THEN
-             surf_usm_h%aldif  = albedo_lw_dif
-             surf_usm_h%aldir  = albedo_lw_dir
-             surf_usm_h%asdif  = albedo_sw_dif
-             surf_usm_h%asdir  = albedo_sw_dir
-             surf_usm_h%albedo = albedo_sw_dif
+             IF ( surf_usm_h%albedo_from_ascii )  THEN
+                surf_usm_h%aldif  = surf_usm_h%albedo
+                surf_usm_h%aldir  = surf_usm_h%albedo
+                surf_usm_h%asdif  = surf_usm_h%albedo
+                surf_usm_h%asdir  = surf_usm_h%albedo
+             ELSE
+                surf_usm_h%aldif  = albedo_lw_dif
+                surf_usm_h%aldir  = albedo_lw_dir
+                surf_usm_h%asdif  = albedo_sw_dif
+                surf_usm_h%asdir  = albedo_sw_dir
+                surf_usm_h%albedo = albedo_sw_dif
+             ENDIF
           ENDIF
 
@@ -1987,9 +2000,15 @@
 
              IF ( surf_usm_v(l)%ns > 0 )  THEN
-                surf_usm_v(l)%aldif  = albedo_lw_dif
-                surf_usm_v(l)%aldir  = albedo_lw_dir
-                surf_usm_v(l)%asdif  = albedo_sw_dif
-                surf_usm_v(l)%asdir  = albedo_sw_dir
-                surf_usm_v(l)%albedo = albedo_sw_dif
+                IF ( surf_usm_v(l)%albedo_from_ascii )  THEN
+                   surf_usm_v(l)%aldif  = surf_usm_v(l)%albedo
+                   surf_usm_v(l)%aldir  = surf_usm_v(l)%albedo
+                   surf_usm_v(l)%asdif  = surf_usm_v(l)%albedo
+                   surf_usm_v(l)%asdir  = surf_usm_v(l)%albedo
+                ELSE
+                   surf_usm_v(l)%aldif  = albedo_lw_dif
+                   surf_usm_v(l)%aldir  = albedo_lw_dir
+                   surf_usm_v(l)%asdif  = albedo_sw_dif
+                   surf_usm_v(l)%asdir  = albedo_sw_dir
+                ENDIF
              ENDIF
           ENDDO
@@ -2019,24 +2038,28 @@
 
           ENDDO
-
-          DO  m = 1, surf_usm_h%ns
-!
-!--          Spectral albedos for wall/green/window surfaces
-             DO  ind_type = 0, 2
-                IF ( surf_usm_h%albedo_type(ind_type,m) /= 0 )  THEN
-                   surf_usm_h%aldif(ind_type,m) =                              &
+!
+!--       For urban surface only if albedo has not been already initialized 
+!--       in the urban-surface model via the ASCII file.
+          IF ( .NOT. surf_usm_h%albedo_from_ascii )  THEN
+             DO  m = 1, surf_usm_h%ns
+!
+!--             Spectral albedos for wall/green/window surfaces
+                DO  ind_type = 0, 2
+                   IF ( surf_usm_h%albedo_type(ind_type,m) /= 0 )  THEN
+                      surf_usm_h%aldif(ind_type,m) =                           &
                                albedo_pars(0,surf_usm_h%albedo_type(ind_type,m))
-                   surf_usm_h%asdif(ind_type,m) =                              &
+                      surf_usm_h%asdif(ind_type,m) =                           &
                                albedo_pars(1,surf_usm_h%albedo_type(ind_type,m))
-                   surf_usm_h%aldir(ind_type,m) =                              &
+                      surf_usm_h%aldir(ind_type,m) =                           &
                                albedo_pars(0,surf_usm_h%albedo_type(ind_type,m))
-                   surf_usm_h%asdir(ind_type,m) =                              &
+                      surf_usm_h%asdir(ind_type,m) =                           &
                                albedo_pars(1,surf_usm_h%albedo_type(ind_type,m))
-                   surf_usm_h%albedo(ind_type,m) =                             &
+                      surf_usm_h%albedo(ind_type,m) =                          &
                                albedo_pars(2,surf_usm_h%albedo_type(ind_type,m))
-                ENDIF
+                   ENDIF
+                ENDDO
+
              ENDDO
-
-          ENDDO
+          ENDIF
 
           DO l = 0, 3
@@ -2060,24 +2083,28 @@
                 ENDDO
              ENDDO
-
-             DO  m = 1, surf_usm_v(l)%ns
-!
-!--             Spectral albedos for wall/green/window surfaces
-                DO  ind_type = 0, 2
-                   IF ( surf_usm_v(l)%albedo_type(ind_type,m) /= 0 )  THEN
-                      surf_usm_v(l)%aldif(ind_type,m) =                        &
+!
+!--          For urban surface only if albedo has not been already initialized 
+!--          in the urban-surface model via the ASCII file.
+             IF ( .NOT. surf_usm_v(l)%albedo_from_ascii )  THEN
+                DO  m = 1, surf_usm_v(l)%ns
+!
+!--                Spectral albedos for wall/green/window surfaces
+                   DO  ind_type = 0, 2
+                      IF ( surf_usm_v(l)%albedo_type(ind_type,m) /= 0 )  THEN
+                         surf_usm_v(l)%aldif(ind_type,m) =                     &
                             albedo_pars(0,surf_usm_v(l)%albedo_type(ind_type,m))
-                      surf_usm_v(l)%asdif(ind_type,m) =                        &
+                         surf_usm_v(l)%asdif(ind_type,m) =                     &
                             albedo_pars(1,surf_usm_v(l)%albedo_type(ind_type,m))
-                      surf_usm_v(l)%aldir(ind_type,m) =                        &
+                         surf_usm_v(l)%aldir(ind_type,m) =                     &
                             albedo_pars(0,surf_usm_v(l)%albedo_type(ind_type,m))
-                      surf_usm_v(l)%asdir(ind_type,m) =                        &
+                         surf_usm_v(l)%asdir(ind_type,m) =                     &
                             albedo_pars(1,surf_usm_v(l)%albedo_type(ind_type,m))
-                      surf_usm_v(l)%albedo(ind_type,m) =                       &
+                         surf_usm_v(l)%albedo(ind_type,m) =                    &
                             albedo_pars(2,surf_usm_v(l)%albedo_type(ind_type,m))
-                   ENDIF
+                      ENDIF
+                   ENDDO
+
                 ENDDO
-
-             ENDDO
+             ENDIF
           ENDDO
 !
@@ -2112,31 +2139,35 @@
                 ENDDO
              ENDDO
-
-             DO  m = 1, surf_usm_h%ns
-                i = surf_usm_h%i(m)
-                j = surf_usm_h%j(m)
-!
-!--             Spectral albedos for wall/green/window surfaces
-                DO  ind_type = 0, 2
-                   IF ( surf_usm_h%albedo_type(ind_type,m) == 0 )  THEN
-                      IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
-                         surf_usm_h%albedo(ind_type,m) =                       &
+!
+!--          For urban surface only if albedo has not been already initialized 
+!--          in the urban-surface model via the ASCII file.
+             IF ( .NOT. surf_usm_h%albedo_from_ascii )  THEN
+                DO  m = 1, surf_usm_h%ns
+                   i = surf_usm_h%i(m)
+                   j = surf_usm_h%j(m)
+!
+!--                Spectral albedos for wall/green/window surfaces
+                   DO  ind_type = 0, 2
+                      IF ( surf_usm_h%albedo_type(ind_type,m) == 0 )  THEN
+                         IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%albedo(ind_type,m) =                       &
                                                 albedo_pars_f%pars_xy(1,j,i)
-                      IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
-                         surf_usm_h%aldir(ind_type,m) =                        &
+                         IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%aldir(ind_type,m) =                        &
                                                 albedo_pars_f%pars_xy(1,j,i)
-                      IF ( albedo_pars_f%pars_xy(2,j,i) /= albedo_pars_f%fill )&
-                         surf_usm_h%aldif(ind_type,m) =                        &
+                         IF ( albedo_pars_f%pars_xy(2,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%aldif(ind_type,m) =                        &
                                                 albedo_pars_f%pars_xy(2,j,i)
-                      IF ( albedo_pars_f%pars_xy(3,j,i) /= albedo_pars_f%fill )&
-                         surf_usm_h%asdir(ind_type,m) =                        &
+                         IF ( albedo_pars_f%pars_xy(3,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%asdir(ind_type,m) =                        &
                                                 albedo_pars_f%pars_xy(3,j,i)
-                      IF ( albedo_pars_f%pars_xy(4,j,i) /= albedo_pars_f%fill )&
-                         surf_usm_h%asdif(ind_type,m) =                        &
+                         IF ( albedo_pars_f%pars_xy(4,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%asdif(ind_type,m) =                        &
                                                 albedo_pars_f%pars_xy(4,j,i)
-                   ENDIF
+                      ENDIF
+                   ENDDO
+
                 ENDDO
-
-             ENDDO
+             ENDIF
 !
 !--          Vertical
@@ -2175,39 +2206,43 @@
                    ENDDO
                 ENDDO
-
-                ioff = surf_usm_v(l)%ioff
-                joff = surf_usm_v(l)%joff
-
-                DO  m = 1, surf_usm_v(l)%ns
-                   i = surf_usm_v(l)%i(m)
-                   j = surf_usm_v(l)%j(m)
-!
-!--                Spectral albedos for wall/green/window surfaces
-                   DO  ind_type = 0, 2
-                      IF ( surf_usm_v(l)%albedo_type(ind_type,m) == 0 )  THEN
-                         IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_usm_v(l)%albedo(ind_type,m) =                 &
-                                          albedo_pars_f%pars_xy(1,j+joff,i+ioff)
-                         IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_usm_v(l)%aldir(ind_type,m) =                  &
-                                          albedo_pars_f%pars_xy(1,j+joff,i+ioff)
-                         IF ( albedo_pars_f%pars_xy(2,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_usm_v(l)%aldif(ind_type,m) =                  &
-                                          albedo_pars_f%pars_xy(2,j+joff,i+ioff)
-                         IF ( albedo_pars_f%pars_xy(3,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_usm_v(l)%asdir(ind_type,m) =                  &
-                                          albedo_pars_f%pars_xy(3,j+joff,i+ioff)
-                         IF ( albedo_pars_f%pars_xy(4,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_usm_v(l)%asdif(ind_type,m) =                  &
-                                          albedo_pars_f%pars_xy(4,j+joff,i+ioff)
-                      ENDIF
+!
+!--             For urban surface only if albedo has not been already initialized 
+!--             in the urban-surface model via the ASCII file.
+                IF ( .NOT. surf_usm_v(l)%albedo_from_ascii )  THEN
+                   ioff = surf_usm_v(l)%ioff
+                   joff = surf_usm_v(l)%joff
+
+                   DO  m = 1, surf_usm_v(l)%ns
+                      i = surf_usm_v(l)%i(m)
+                      j = surf_usm_v(l)%j(m)
+!
+!--                   Spectral albedos for wall/green/window surfaces
+                      DO  ind_type = 0, 2
+                         IF ( surf_usm_v(l)%albedo_type(ind_type,m) == 0 )  THEN
+                            IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%albedo(ind_type,m) =                 &
+                                             albedo_pars_f%pars_xy(1,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%aldir(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(1,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(2,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%aldif(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(2,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(3,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%asdir(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(3,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(4,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%asdif(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(4,j+joff,i+ioff)
+                         ENDIF
+                      ENDDO
+
                    ENDDO
-
-                ENDDO
+                ENDIF
              ENDDO
 
Index: /palm/trunk/SOURCE/surface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/surface_mod.f90	(revision 3350)
+++ /palm/trunk/SOURCE/surface_mod.f90	(revision 3351)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! New flag indication that albedo at urban surfaces is initialized via ASCII
+! file
+! 
+! 3298 2018-10-02 12:21:11Z kanani
 ! - Minor formatting/clean-up (kanani)
 ! - Removed initialization of cssws with surface_csflux values. Only the value 0 
@@ -260,4 +264,6 @@
     TYPE surf_type
 
+       LOGICAL ::  albedo_from_ascii = .FALSE. !< flag indicating that albedo for urban surfaces is input via ASCII format (just for a workaround)
+    
        INTEGER(iwp) :: ioff                                !< offset value in x-direction, used to determine index of surface element
        INTEGER(iwp) :: joff                                !< offset value in y-direction, used to determine index of surface element
Index: /palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3350)
+++ /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3351)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! Set flag indicating that albedo at urban surfaces is already initialized
+! 
+! 3347 2018-10-15 14:21:08Z suehring
 ! Enable USM initialization with default building parameters in case no static
 ! input file exist. 
@@ -7067,4 +7070,7 @@
 !--     Assign the surface types to the respective data type. 
 !--     First, for horizontal upward-facing surfaces. 
+!--     Further, set flag indicating that albedo is initialized via ASCII
+!--     format, else it would be overwritten in the radiation model.
+        surf_usm_h%albedo_from_ascii = .TRUE.
         DO  m = 1, surf_usm_h%ns
            iw = surf_usm_h%i(m)
@@ -7193,4 +7199,8 @@
 !--     2 -- eastward-facing, 3 -- westward-facing )
         DO  l = 0, 3
+!
+!--        Set flag indicating that albedo is initialized via ASCII format. 
+!--        Else it would be overwritten in the radiation model.
+           surf_usm_v(l)%albedo_from_ascii = .TRUE.
            DO  m = 1, surf_usm_v(l)%ns
               i  = surf_usm_v(l)%i(m)
@@ -7390,4 +7400,5 @@
            ENDDO
         ENDDO 
+
 !
 !--     Initialize wall layer thicknesses. Please note, this will be removed
