Index: palm/trunk/SOURCE/radiation_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4196)
+++ palm/trunk/SOURCE/radiation_model_mod.f90	(revision 4197)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! Revise steering of surface albedo initialization when albedo_pars is provided
+! 
+! 4190 2019-08-27 15:42:37Z suehring
 ! Implement external radiation forcing also for level-of-detail = 2 
 ! (horizontally 2D radiation)
@@ -1798,10 +1801,7 @@
                 j = surf_lsm_h%j(m)
                 IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
-                   IF ( surf_lsm_h%albedo_type(ind_veg_wall,m) == 0 )          &
-                      surf_lsm_h%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
-                   IF ( surf_lsm_h%albedo_type(ind_pav_green,m) == 0 )         &
-                      surf_lsm_h%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
-                   IF ( surf_lsm_h%albedo_type(ind_wat_win,m) == 0 )           &
-                      surf_lsm_h%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                   surf_lsm_h%albedo(ind_veg_wall,m)  = albedo_pars_f%pars_xy(0,j,i)
+                   surf_lsm_h%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                   surf_lsm_h%albedo(ind_wat_win,m)   = albedo_pars_f%pars_xy(0,j,i)
                 ENDIF
              ENDDO
@@ -1810,10 +1810,7 @@
                 j = surf_usm_h%j(m)
                 IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
-                   IF ( surf_usm_h%albedo_type(ind_veg_wall,m) == 0 )          &
-                      surf_usm_h%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
-                   IF ( surf_usm_h%albedo_type(ind_pav_green,m) == 0 )         &
-                      surf_usm_h%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
-                   IF ( surf_usm_h%albedo_type(ind_wat_win,m) == 0 )           &
-                      surf_usm_h%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                   surf_usm_h%albedo(ind_veg_wall,m)  = albedo_pars_f%pars_xy(0,j,i)
+                   surf_usm_h%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                   surf_usm_h%albedo(ind_wat_win,m)   = albedo_pars_f%pars_xy(0,j,i)
                 ENDIF
              ENDDO 
@@ -1828,10 +1825,7 @@
                    j = surf_lsm_v(l)%j(m) + joff
                    IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
-                      IF ( surf_lsm_v(l)%albedo_type(ind_veg_wall,m) == 0 )    &
-                         surf_lsm_v(l)%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
-                      IF ( surf_lsm_v(l)%albedo_type(ind_pav_green,m) == 0 )   &
-                         surf_lsm_v(l)%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
-                      IF ( surf_lsm_v(l)%albedo_type(ind_wat_win,m) == 0 )     &
-                         surf_lsm_v(l)%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                      surf_lsm_v(l)%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
+                      surf_lsm_v(l)%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                      surf_lsm_v(l)%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
                    ENDIF
                 ENDDO
@@ -1843,10 +1837,7 @@
                    j = surf_usm_v(l)%j(m) + joff
                    IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
-                      IF ( surf_usm_v(l)%albedo_type(ind_veg_wall,m) == 0 )    &
-                         surf_usm_v(l)%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
-                      IF ( surf_usm_v(l)%albedo_type(ind_pav_green,m) == 0 )   &
-                         surf_usm_v(l)%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
-                      IF ( surf_usm_v(l)%albedo_type(ind_wat_win,m) == 0 )     &
-                         surf_usm_v(l)%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                      surf_usm_v(l)%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
+                      surf_usm_v(l)%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                      surf_usm_v(l)%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
                    ENDIF
                 ENDDO
@@ -2077,21 +2068,19 @@
 !--             Spectral albedos for vegetation/pavement/water surfaces
                 DO  ind_type = 0, 2
-                   IF ( surf_lsm_h%albedo_type(ind_type,m) == 0 )  THEN
-                      IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )&
-                         surf_lsm_h%albedo(ind_type,m) =                       &
-                                                albedo_pars_f%pars_xy(0,j,i)
-                      IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
-                         surf_lsm_h%aldir(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_lsm_h%aldif(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_lsm_h%asdir(ind_type,m) =                        &
-                                                albedo_pars_f%pars_xy(2,j,i)
-                      IF ( albedo_pars_f%pars_xy(2,j,i) /= albedo_pars_f%fill )&
-                         surf_lsm_h%asdif(ind_type,m) =                        &
-                                                albedo_pars_f%pars_xy(2,j,i)
-                   ENDIF
+                   IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )   &
+                      surf_lsm_h%albedo(ind_type,m) =                          &
+                                             albedo_pars_f%pars_xy(0,j,i)      
+                   IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )   &
+                      surf_lsm_h%aldir(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_lsm_h%aldif(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_lsm_h%asdir(ind_type,m) =                           &
+                                             albedo_pars_f%pars_xy(2,j,i)      
+                   IF ( albedo_pars_f%pars_xy(2,j,i) /= albedo_pars_f%fill )   &
+                      surf_lsm_h%asdif(ind_type,m) =                           &
+                                             albedo_pars_f%pars_xy(2,j,i)
                 ENDDO
              ENDDO
@@ -2106,9 +2095,7 @@
 !--                Broadband 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(0,j,i) /= albedo_pars_f%fill )&
-                            surf_usm_h%albedo(ind_type,m) =                       &
-                                                albedo_pars_f%pars_xy(0,j,i)
-                      ENDIF
+                      IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )&
+                         surf_usm_h%albedo(ind_type,m) =                       &
+                                             albedo_pars_f%pars_xy(0,j,i)
                    ENDDO
 !
@@ -2169,26 +2156,24 @@
 !--                Spectral albedos for vegetation/pavement/water surfaces
                    DO  ind_type = 0, 2
-                      IF ( surf_lsm_v(l)%albedo_type(ind_type,m) == 0 )  THEN
-                         IF ( albedo_pars_f%pars_xy(0,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_lsm_v(l)%albedo(ind_type,m) =                 &
-                                          albedo_pars_f%pars_xy(0,j+joff,i+ioff)
-                         IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_lsm_v(l)%aldir(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_lsm_v(l)%aldif(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_lsm_v(l)%asdir(ind_type,m) =                  &
-                                          albedo_pars_f%pars_xy(2,j+joff,i+ioff)
-                         IF ( albedo_pars_f%pars_xy(2,j+joff,i+ioff) /=        &
-                              albedo_pars_f%fill )                             &
-                            surf_lsm_v(l)%asdif(ind_type,m) =                  &
-                                          albedo_pars_f%pars_xy(2,j+joff,i+ioff)
-                      ENDIF
+                      IF ( albedo_pars_f%pars_xy(0,j+joff,i+ioff) /=           &
+                           albedo_pars_f%fill )                                &
+                         surf_lsm_v(l)%albedo(ind_type,m) =                    &
+                                       albedo_pars_f%pars_xy(0,j+joff,i+ioff)
+                      IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=           &
+                           albedo_pars_f%fill )                                &
+                         surf_lsm_v(l)%aldir(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_lsm_v(l)%aldif(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_lsm_v(l)%asdir(ind_type,m) =                     &
+                                       albedo_pars_f%pars_xy(2,j+joff,i+ioff)
+                      IF ( albedo_pars_f%pars_xy(2,j+joff,i+ioff) /=           &
+                           albedo_pars_f%fill )                                &
+                         surf_lsm_v(l)%asdif(ind_type,m) =                     &
+                                       albedo_pars_f%pars_xy(2,j+joff,i+ioff)
                    ENDDO
                 ENDDO
@@ -2206,10 +2191,8 @@
 !--                   Broadband 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(0,j+joff,i+ioff) /=     &
-                                 albedo_pars_f%fill )                          &
-                               surf_usm_v(l)%albedo(ind_type,m) =              &
-                                             albedo_pars_f%pars_xy(0,j+joff,i+ioff)
-                         ENDIF
+                         IF ( albedo_pars_f%pars_xy(0,j+joff,i+ioff) /=        &
+                              albedo_pars_f%fill )                             &
+                            surf_usm_v(l)%albedo(ind_type,m) =                 &
+                                          albedo_pars_f%pars_xy(0,j+joff,i+ioff)
                       ENDDO
 !
