Index: palm/trunk/SOURCE/indoor_model_mod.f90
===================================================================
--- palm/trunk/SOURCE/indoor_model_mod.f90 (revision 4298)
+++ palm/trunk/SOURCE/indoor_model_mod.f90 (revision 4299)
@@ -26,4 +26,8 @@
! -----------------
! $Id$
+! Output of indoor temperature revised (to avoid non-defined values within
+! buildings)
+!
+! 4267 2019-10-16 18:58:49Z suehring
! Bugfix in initialization, some indices to access building_pars where wrong.
! Introduction of seasonal parameters.
@@ -1669,6 +1673,5 @@
!-- Average indoor temperature. Note, in case a building is completely
!-- surrounded by higher buildings, it may have no facade elements
-!-- at some height levels, will will lead to a divide by zero. If this
-!-- is the case, indoor temperature will be set to -1.0.
+!-- at some height levels, which will lead to a divide by zero.
DO k = buildings(nb)%kb_min, buildings(nb)%kb_max
IF ( buildings(nb)%num_facade_h(k) + &
@@ -1677,6 +1680,16 @@
REAL( buildings(nb)%num_facade_h(k) + &
buildings(nb)%num_facade_v(k), KIND = wp )
- ELSE
- buildings(nb)%t_in(k) = -1.0_wp
+ ENDIF
+ ENDDO
+!
+!-- If indoor temperature is not defined because of missing facade
+!-- elements, the values from the above-lying level will be taken.
+!-- At least at the top of the buildings facades are defined, so that
+!-- at least there an indoor temperature is defined. This information
+!-- will propagate downwards the building.
+ DO k = buildings(nb)%kb_max-1, buildings(nb)%kb_min, -1
+ IF ( buildings(nb)%num_facade_h(k) + &
+ buildings(nb)%num_facade_v(k) <= 0 ) THEN
+ buildings(nb)%t_in(k) = buildings(nb)%t_in(k+1)
ENDIF
ENDDO