Changeset 4850 for palm/trunk/SOURCE/indoor_model_mod.f90
- Timestamp:
- Jan 21, 2021 5:59:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/indoor_model_mod.f90
r4843 r4850 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Enable restart mechanism for previous indoor temperature 28 ! 29 ! 4843 2021-01-15 15:22:11Z raasch 27 30 ! local namelist parameter added to switch off the module although the respective module namelist 28 31 ! appears in the namelist file … … 590 593 INTEGER(iwp) :: bt !< local building type 591 594 INTEGER(iwp) :: day_of_year !< day of the year 595 INTEGER(iwp) :: fa !< running index for facade elements of each building 592 596 INTEGER(iwp) :: i !< running index along x-direction 593 597 INTEGER(iwp) :: j !< running index along y-direction … … 1185 1189 ! 1186 1190 !-- Initialize indoor temperature. Actually only for output at initial state. 1187 DO nb = 1, num_build 1188 IF ( buildings(nb)%on_pe ) THEN 1189 buildings(nb)%t_in(:) = initial_indoor_temperature 1190 1191 ! 1192 !-- (after first loop, use theta_m_t as theta_m_t_prev) 1193 buildings(nb)%theta_m_t_prev_h(:) = initial_indoor_temperature 1194 buildings(nb)%theta_m_t_prev_v(:) = initial_indoor_temperature 1195 1196 ENDIF 1197 ENDDO 1191 IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN 1192 DO nb = 1, num_build 1193 IF ( buildings(nb)%on_pe ) THEN 1194 buildings(nb)%t_in(:) = initial_indoor_temperature 1195 1196 ! 1197 !-- (after first loop, use theta_m_t as theta_m_t_prev) 1198 buildings(nb)%theta_m_t_prev_h(:) = initial_indoor_temperature 1199 buildings(nb)%theta_m_t_prev_v(:) = initial_indoor_temperature 1200 1201 ENDIF 1202 ENDDO 1203 ! 1204 !-- Initialize indoor temperature at previous timestep. 1205 ELSE 1206 DO nb = 1, num_build 1207 IF ( buildings(nb)%on_pe ) THEN 1208 ! 1209 !-- Mean indoor temperature can be initialized with initial value. This is just 1210 !-- used for output. 1211 buildings(nb)%t_in(:) = initial_indoor_temperature 1212 ! 1213 !-- Initialize theta_m_t_prev arrays. The respective data during the restart mechanism 1214 !-- is stored on the surface-data array. 1215 DO fa = 1, buildings(nb)%num_facades_per_building_h_l 1216 ! 1217 !-- Determine indices where corresponding surface-type information is stored. 1218 l = buildings(nb)%l_h(fa) 1219 m = buildings(nb)%m_h(fa) 1220 buildings(nb)%theta_m_t_prev_h(fa) = surf_usm_h(l)%t_prev(m) 1221 ENDDO 1222 DO fa = 1, buildings(nb)%num_facades_per_building_v_l 1223 ! 1224 !-- Determine indices where corresponding surface-type information is stored. 1225 l = buildings(nb)%l_v(fa) 1226 m = buildings(nb)%m_v(fa) 1227 buildings(nb)%theta_m_t_prev_v(fa) = surf_usm_v(l)%t_prev(m) 1228 ENDDO 1229 ENDIF 1230 ENDDO 1231 ENDIF 1198 1232 1199 1233 CALL location_message( 'initializing indoor model', 'finished' ) … … 1303 1337 ENDIF 1304 1338 ! 1305 !-- Initialize/reset indoor temperature 1339 !-- Initialize/reset indoor temperature - note, this is only for output 1306 1340 buildings(nb)%t_in_l = 0.0_wp 1307 1341 ! … … 1548 1582 buildings(nb)%params_waste_heat_h * heating_on + & 1549 1583 buildings(nb)%params_waste_heat_c * cooling_on ) & 1550 ) / facade_element_area !< [W/m2] , observe the directional 1551 !< convention in PALM! 1584 ) / facade_element_area !< [W/m2] , observe the directional convention in PALM! 1585 ! 1586 !-- Store waste heat and previous previous indoor temperature on surface-data type. 1587 !-- These will be used in the urban-surface model. 1588 surf_usm_h(l)%t_prev(m) = buildings(nb)%theta_m_t_prev_h(fa) 1552 1589 surf_usm_h(l)%waste_heat(m) = q_waste_heat 1553 1590 ENDDO !< Horizontal surfaces loop … … 1559 1596 l = buildings(nb)%l_v(fa) 1560 1597 m = buildings(nb)%m_v(fa) 1598 1561 1599 ! 1562 1600 !-- During spinup set window fraction to zero and add these to wall fraction. … … 1805 1843 q_waste_heat = ( phi_hc_nd * ( buildings(nb)%params_waste_heat_h * heating_on + & 1806 1844 buildings(nb)%params_waste_heat_c * cooling_on ) & 1807 ) / facade_element_area !< [W/m2] , observe the directional convention in 1808 !< PALM! 1845 ) / facade_element_area !< [W/m2] , observe the directional convention in PALM! 1846 ! 1847 !-- Store waste heat and previous previous indoor temperature on surface-data type. 1848 !-- These will be used in the urban-surface model. 1849 surf_usm_v(l)%t_prev(m) = buildings(nb)%theta_m_t_prev_v(fa) 1809 1850 surf_usm_v(l)%waste_heat(m) = q_waste_heat 1810 1851 ENDDO !< Vertical surfaces loop
Note: See TracChangeset
for help on using the changeset viewer.