Index: /palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui
===================================================================
--- /palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 3195)
+++ /palm/trunk/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 3196)
@@ -84,5 +84,5 @@
      <property name="geometry">
       <rect>
-       <x>120</x>
+       <x>150</x>
        <y>20</y>
        <width>90</width>
@@ -102,5 +102,5 @@
        <x>10</x>
        <y>20</y>
-       <width>91</width>
+       <width>131</width>
        <height>21</height>
       </rect>
@@ -122,5 +122,5 @@
      <property name="geometry">
       <rect>
-       <x>210</x>
+       <x>250</x>
        <y>20</y>
        <width>90</width>
@@ -345,12 +345,4 @@
        </property>
       </widget>
-      <zorder>line_jobname</zorder>
-      <zorder>pushButton</zorder>
-      <zorder>label</zorder>
-      <zorder>list_jobname</zorder>
-      <zorder>drop_job</zorder>
-      <zorder>label_usercode</zorder>
-      <zorder>palm_logo</zorder>
-      <zorder>label_8</zorder>
      </widget>
      <widget class="QGroupBox" name="group_execution">
@@ -1136,10 +1128,10 @@
       <x>341</x>
       <y>82</y>
-      <width>128</width>
+      <width>129</width>
       <height>189</height>
      </rect>
     </property>
     <property name="title">
-     <string>St&amp;art</string>
+     <string>Sta&amp;rt</string>
     </property>
     <property name="separatorsCollapsible">
Index: /palm/trunk/SOURCE/land_surface_model_mod.f90
===================================================================
--- /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3195)
+++ /palm/trunk/SOURCE/land_surface_model_mod.f90	(revision 3196)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! Added maximum aerodynamic resistance of 300.
+! 
+! 3161 2018-07-23 09:30:10Z maronga
 ! Increased roughness of asphalt surfaces to account for turbulence production
 ! by traffic and other obstacles
@@ -1915,6 +1918,8 @@
 !
 !--    Make sure that the resistance does not drop to zero for neutral 
-!--    stratification. 
-       IF ( surf%r_a(m) < 1.0_wp )  surf%r_a(m) = 1.0_wp
+!--    stratification. Also, set a maximum resistance to avoid the breakdown of
+!--    MOST for locations with zero wind speed
+       IF ( surf%r_a(m) <   1.0_wp )  surf%r_a(m) =   1.0_wp
+       IF ( surf%r_a(m) > 300.0_wp )  surf%r_a(m) = 300.0_wp       
 !
 !--    Second step: calculate canopy resistance r_canopy
Index: /palm/trunk/SOURCE/urban_surface_mod.f90
===================================================================
--- /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3195)
+++ /palm/trunk/SOURCE/urban_surface_mod.f90	(revision 3196)
@@ -28,4 +28,7 @@
 ! -----------------
 ! $Id$
+! Added maximum aerodynamic resistance of 300 for horiztonal surfaces.
+! 
+! 3176 2018-07-26 17:12:48Z suehring
 ! Bugfix, update virtual potential surface temparture, else heat fluxes on 
 ! roofs might become unphysical
@@ -7373,5 +7376,5 @@
 !                  ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp )
                 
-!--        make sure that the resistance does not drop to zero
+!--        Make sure that the resistance does not drop to zero
            IF ( surf_usm_h%r_a(m)        < 1.0_wp )                            &
                surf_usm_h%r_a(m)        = 1.0_wp
@@ -7380,4 +7383,15 @@
            IF ( surf_usm_h%r_a_window(m) < 1.0_wp )                            &
                surf_usm_h%r_a_window(m) = 1.0_wp
+              
+!
+!--        Make sure that the resistacne does not exceed a maxmium value in case
+!--        of zero velocities
+           IF ( surf_usm_h%r_a(m)        > 300.0_wp )                          &
+               surf_usm_h%r_a(m)        = 300.0_wp
+           IF ( surf_usm_h%r_a_green(m)  > 300.0_wp )                          &
+               surf_usm_h%r_a_green(m) = 300.0_wp
+           IF ( surf_usm_h%r_a_window(m) > 300.0_wp )                          &
+               surf_usm_h%r_a_window(m) = 300.0_wp                
+                
                 
 !--        factor for shf_eb
@@ -7579,6 +7593,6 @@
 !
 !--          Limit aerodynamic resistance
-             IF ( surf_usm_v(l)%r_a(m) < 1.0_wp )                              &
-                surf_usm_v(l)%r_a(m)        = 1.0_wp          
+             IF ( surf_usm_v(l)%r_a(m) < 1.0_wp )  surf_usm_v(l)%r_a(m) = 1.0_wp   
+             
                            
              f_shf         = rho_cp / surf_usm_v(l)%r_a(m)
