Index: palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4732)
+++ palm/trunk/SOURCE/urban_surface_mod.f90	(revision 4733)
@@ -22,5 +22,6 @@
 ! Current revisions:
 ! -----------------
-!
+! Bugfix in calculation of absored radiation by windows (reflected radiation was not taken into
+! account)
 !
 ! Former revisions:
@@ -5262,5 +5263,5 @@
                                 + surf%rad_sw_in(m)                                               &
                                 * ( 1.0_wp - exp( -win_absorp                                     &
-                                    * surf%zw_window(nzb_wall,m) ) )                              &
+                                    * surf%zw_window(nzb_wall,m) ) ) - surf%rad_sw_out(m)         &
                               ) * surf%ddz_window_stag(nzb_wall,m)
 
@@ -5284,5 +5285,5 @@
                            * ( exp( -win_absorp * surf%zw_window(kw-1,m) )                        &
                            - exp(-win_absorp * surf%zw_window(kw,m) )                             &
-                             )                                                                    &
+                             ) - surf%rad_sw_out(m)                                               &
                              ) * surf%ddz_window_stag(kw,m)
 
@@ -5299,5 +5300,5 @@
                                  - exp( -win_absorp                                               &
                                  * surf%zw_window(nzt_wall,m) )                                   &
-                                   )                                                              &
+                                   ) - surf%rad_sw_out(m)                                         &
                                    ) * surf%ddz_window_stag(nzt_wall,m)
 
@@ -7541,7 +7542,7 @@
        0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
        0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-       27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-       5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-       27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+       27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+       5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+       27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
        0.005_wp,       &  !< parameter 41  - 1st wall layer thickness above ground floor level
        0.01_wp,        &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -7569,5 +7570,5 @@
        0.39_wp,        &  !< parameter 64  - 3rd wall layer thickness ground floor level
        0.63_wp,        &  !< parameter 65  - 4th wall layer thickness ground floor level
-       27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+       27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
        0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
        0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -7580,6 +7581,6 @@
        0.57_wp,        &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
        0.57_wp,        &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-       27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-       5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+       27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+       5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
        0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
        0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -7604,5 +7605,5 @@
        2.1_wp,         &  !< parameter 99  - thermal conductivity 4th wall layer roof
        0.93_wp,        &  !< parameter 100 - wall emissivity roof
-       27.0_wp,        &  !< parameter 101 - wall albedo roof
+       27.0_wp,        &  !< parameter 101 - wall albedo_type roof
        0.0_wp,         &  !< parameter 102 - window fraction roof
        0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -7618,7 +7619,7 @@
        0.91_wp,        &  !< parameter 113 - window emissivity roof
        0.75_wp,        &  !< parameter 114 - window transmissivity roof
-       27.0_wp,        &  !< parameter 115 - window albedo roof
+       27.0_wp,        &  !< parameter 115 - window albedo_type roof
        0.86_wp,        &  !< parameter 116 - green emissivity roof
-       5.0_wp,         &  !< parameter 117 - green albedo roof
+       5.0_wp,         &  !< parameter 117 - green albedo_type roof
        0.0_wp,         &  !< parameter 118 - green type roof
        0.8_wp,         &  !< parameter 119 - shading factor
@@ -7680,7 +7681,7 @@
           0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
           0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-          27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-          5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-          27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+          27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+          5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+          27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
           0.005_wp,       &  !< parameter 41  - 1st wall layer thickness above ground floor level
           0.01_wp,        &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -7708,5 +7709,5 @@
           0.31_wp,        &  !< parameter 64  - 3rd wall layer thickness ground floor level
           0.43_wp,        &  !< parameter 65  - 4th wall layer thickness ground floor level
-          27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+          27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
           0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
           0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -7719,6 +7720,6 @@
           0.11_wp,        &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
           0.11_wp,        &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-          27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-          5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+          27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+          5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
           0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
           0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -7743,5 +7744,5 @@
           0.04_wp,        &  !< parameter 99  - thermal conductivity 4th wall layer roof
           0.93_wp,        &  !< parameter 100 - wall emissivity roof
-          27.0_wp,        &  !< parameter 101 - wall albedo roof
+          27.0_wp,        &  !< parameter 101 - wall albedo_type roof
           0.0_wp,         &  !< parameter 102 - window fraction roof
           0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -7757,7 +7758,7 @@
           0.87_wp,        &  !< parameter 113 - window emissivity roof
           0.7_wp,         &  !< parameter 114 - window transmissivity roof
-          27.0_wp,        &  !< parameter 115 - window albedo roof
+          27.0_wp,        &  !< parameter 115 - window albedo_type roof
           0.86_wp,        &  !< parameter 116 - green emissivity roof
-          5.0_wp,         &  !< parameter 117 - green albedo roof
+          5.0_wp,         &  !< parameter 117 - green albedo_type roof
           0.0_wp,         &  !< parameter 118 - green type roof
           0.8_wp,         &  !< parameter 119 - shading factor
@@ -7820,7 +7821,7 @@
              0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
              0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-             27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-             5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-             27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+             27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+             5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+             27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
              0.005_wp,       &  !< parameter 41  - 1st wall layer thickness above ground floor level
              0.01_wp,        &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -7848,5 +7849,5 @@
              0.41_wp,        &  !< parameter 64  - 3rd wall layer thickness ground floor level
              0.7_wp,         &  !< parameter 65  - 4th wall layer thickness ground floor level
-             27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+             27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
              0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
              0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -7859,6 +7860,6 @@
              0.037_wp,       &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
              0.037_wp,       &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-             27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-             5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+             27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+             5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
              0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
              0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -7883,5 +7884,5 @@
              0.035_wp,       &  !< parameter 99  - thermal conductivity 4th wall layer roof
              0.93_wp,        &  !< parameter 100 - wall emissivity roof
-             27.0_wp,        &  !< parameter 101 - wall albedo roof
+             27.0_wp,        &  !< parameter 101 - wall albedo_type roof
              0.0_wp,         &  !< parameter 102 - window fraction roof
              0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -7897,7 +7898,7 @@
              0.8_wp,         &  !< parameter 113 - window emissivity roof
              0.6_wp,         &  !< parameter 114 - window transmissivity roof
-             27.0_wp,        &  !< parameter 115 - window albedo roof
+             27.0_wp,        &  !< parameter 115 - window albedo_type roof
              0.86_wp,        &  !< parameter 116 - green emissivity roof
-             5.0_wp,         &  !< parameter 117 - green albedo roof
+             5.0_wp,         &  !< parameter 117 - green albedo_type roof
              0.0_wp,         &  !< parameter 118 - green type roof
              0.3_wp,         &  !< parameter 119 - shading factor
@@ -7960,7 +7961,7 @@
       0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
       0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-      27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-      5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-      27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+      27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+      5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+      27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
       0.005_wp,       &  !< parameter 41  - 1st wall layer thickness above ground floor level
       0.01_wp,        &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -7988,5 +7989,5 @@
       0.39_wp,        &  !< parameter 64  - 3rd wall layer thickness ground floor level
       0.63_wp,        &  !< parameter 65  - 4th wall layer thickness ground floor level
-      27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+      27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
       0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
       0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -7999,6 +8000,6 @@
       0.57_wp,        &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
       0.57_wp,        &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-      27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-      5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+      27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+      5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
       0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
       0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -8023,5 +8024,5 @@
       2.1_wp,         &  !< parameter 99  - thermal conductivity 4th wall layer roof
       0.93_wp,        &  !< parameter 100 - wall emissivity roof
-      27.0_wp,        &  !< parameter 101 - wall albedo roof
+      27.0_wp,        &  !< parameter 101 - wall albedo_type roof
       0.0_wp,         &  !< parameter 102 - window fraction roof
       0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -8037,7 +8038,7 @@
       0.91_wp,        &  !< parameter 113 - window emissivity roof
       0.75_wp,        &  !< parameter 114 - window transmissivity roof
-      27.0_wp,        &  !< parameter 115 - window albedo roof
+      27.0_wp,        &  !< parameter 115 - window albedo_type roof
       0.86_wp,        &  !< parameter 116 - green emissivity roof
-      5.0_wp,         &  !< parameter 117 - green albedo roof
+      5.0_wp,         &  !< parameter 117 - green albedo_type roof
       0.0_wp,         &  !< parameter 118 - green type roof
       0.25_wp,        &  !< parameter 119 - shading factor
@@ -8099,7 +8100,7 @@
       0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
       0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-      27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-      5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-      27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+      27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+      5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+      27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
       0.005_wp,       &  !< parameter 41  - 1st wall layer thickness above ground floor level
       0.01_wp,        &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -8127,5 +8128,5 @@
       0.31_wp,        &  !< parameter 64  - 3rd wall layer thickness ground floor level
       0.43_wp,        &  !< parameter 65  - 4th wall layer thickness ground floor level
-      27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+      27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
       0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
       0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -8138,6 +8139,6 @@
       0.11_wp,        &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
       0.11_wp,        &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-      27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-      5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+      27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+      5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
       0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
       0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -8162,5 +8163,5 @@
       0.04_wp,        &  !< parameter 99  - thermal conductivity 4th wall layer roof
       0.91_wp,        &  !< parameter 100 - wall emissivity roof
-      27.0_wp,        &  !< parameter 101 - wall albedo roof
+      27.0_wp,        &  !< parameter 101 - wall albedo_type roof
       0.0_wp,         &  !< parameter 102 - window fraction roof
       0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -8176,7 +8177,7 @@
       0.87_wp,        &  !< parameter 113 - window emissivity roof
       0.7_wp,         &  !< parameter 114 - window transmissivity roof
-      27.0_wp,        &  !< parameter 115 - window albedo roof
+      27.0_wp,        &  !< parameter 115 - window albedo_type roof
       0.86_wp,        &  !< parameter 116 - green emissivity roof
-      5.0_wp,         &  !< parameter 117 - green albedo roof
+      5.0_wp,         &  !< parameter 117 - green albedo_type roof
       0.0_wp,         &  !< parameter 118 - green type roof
       0.25_wp,        &  !< parameter 119 - shading factor
@@ -8238,7 +8239,7 @@
       0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
       0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-      27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-      5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-      27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+      27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+      5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+      27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
       0.005_wp,       &  !< parameter 41  - 1st wall layer thickness above ground floor level
       0.01_wp,        &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -8266,5 +8267,5 @@
       0.41_wp,        &  !< parameter 64  - 3rd wall layer thickness ground floor level
       0.7_wp,         &  !< parameter 65  - 4th wall layer thickness ground floor level
-      27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+      27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
       0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
       0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -8277,6 +8278,6 @@
       0.037_wp,       &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
       0.037_wp,       &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-      27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-      5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+      27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+      5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
       0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
       0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -8301,5 +8302,5 @@
       0.035_wp,       &  !< parameter 99  - thermal conductivity 4th wall layer roof
       0.91_wp,        &  !< parameter 100 - wall emissivity roof
-      27.0_wp,        &  !< parameter 101 - wall albedo roof
+      27.0_wp,        &  !< parameter 101 - wall albedo_type roof
       0.0_wp,         &  !< parameter 102 - window fraction roof
       0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -8315,7 +8316,7 @@
       0.8_wp,         &  !< parameter 113 - window emissivity roof
       0.6_wp,         &  !< parameter 114 - window transmissivity roof
-      27.0_wp,        &  !< parameter 115 - window albedo roof
+      27.0_wp,        &  !< parameter 115 - window albedo_type roof
       0.86_wp,        &  !< parameter 116 - green emissivity roof
-      5.0_wp,         &  !< parameter 117 - green albedo roof
+      5.0_wp,         &  !< parameter 117 - green albedo_type roof
       0.0_wp,         &  !< parameter 118 - green type roof
       0.25_wp,        &  !< parameter 119 - shading factor
@@ -8377,7 +8378,7 @@
       0.001_wp,       &  !< parameter 36  - z0 roughness ground floor level
       0.0001_wp,      &  !< parameter 37  - z0h/z0q roughness heat/humidity
-      27.0_wp,        &  !< parameter 38  - wall albedo above ground floor level
-      5.0_wp,         &  !< parameter 39  - green albedo above ground floor level
-      27.0_wp,        &  !< parameter 40  - window albedo above ground floor level
+      27.0_wp,        &  !< parameter 38  - wall albedo_type above ground floor level
+      5.0_wp,         &  !< parameter 39  - green albedo_type above ground floor level
+      27.0_wp,        &  !< parameter 40  - window albedo_type above ground floor level
       0.29_wp,        &  !< parameter 41  - 1st wall layer thickness above ground floor level
       0.295_wp,       &  !< parameter 42  - 2nd wall layer thickness above ground floor level
@@ -8405,5 +8406,5 @@
       0.695_wp,       &  !< parameter 64  - 3rd wall layer thickness ground floor level
       0.985_wp,       &  !< parameter 65  - 4th wall layer thickness ground floor level
-      27.0_wp,        &  !< parameter 66  - wall albedo ground floor level
+      27.0_wp,        &  !< parameter 66  - wall albedo_type ground floor level
       0.003_wp,       &  !< parameter 67  - 1st window layer thickness ground floor level
       0.006_wp,       &  !< parameter 68  - 2nd window layer thickness ground floor level
@@ -8416,6 +8417,6 @@
       0.57_wp,        &  !< parameter 75  - thermal conductivity 3rd window layer ground floor level
       0.57_wp,        &  !< parameter 76  - thermal conductivity 4th window layer ground floor level
-      27.0_wp,        &  !< parameter 77  - window albedo ground floor level
-      5.0_wp,         &  !< parameter 78  - green albedo ground floor level
+      27.0_wp,        &  !< parameter 77  - window albedo_type ground floor level
+      5.0_wp,         &  !< parameter 78  - green albedo_type ground floor level
       0.003_wp,       &  !< parameter 79  - 1st window layer thickness above ground floor level
       0.006_wp,       &  !< parameter 80  - 2nd thickness window layer above ground floor level
@@ -8440,5 +8441,5 @@
       1.0_wp,         &  !< parameter 99  - thermal conductivity 4th wall layer roof
       0.9_wp,         &  !< parameter 100 - wall emissivity roof
-      27.0_wp,        &  !< parameter 101 - wall albedo roof
+      27.0_wp,        &  !< parameter 101 - wall albedo_type roof
       0.0_wp,         &  !< parameter 102 - window fraction roof
       0.003_wp,       &  !< parameter 103 - window 1st layer thickness roof
@@ -8454,7 +8455,7 @@
       0.8_wp,         &  !< parameter 113 - window emissivity roof
       0.6_wp,         &  !< parameter 114 - window transmissivity roof
-      27.0_wp,        &  !< parameter 115 - window albedo roof
+      27.0_wp,        &  !< parameter 115 - window albedo_type roof
       0.86_wp,        &  !< parameter 116 - green emissivity roof
-      5.0_wp,         &  !< parameter 117 - green albedo roof
+      5.0_wp,         &  !< parameter 117 - green albedo_type roof
       0.0_wp,         &  !< parameter 118 - green type roof
       0.8_wp,         &  !< parameter 119 - shading factor
