- Timestamp:
- Oct 16, 2020 2:27:48 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4677 r4750 25 25 # ----------------- 26 26 # $Id$ 27 # Bugfix, missing dependency on indoor_model_mod added 28 # 29 # 4677 2020-09-14 07:55:28Z raasch 27 30 # file re-formatted to follow the PALM coding standard 28 31 # … … 1243 1246 exchange_horiz_mod.o \ 1244 1247 land_surface_model_mod.o \ 1248 indoor_model_mod.o \ 1245 1249 mod_kinds.o \ 1246 1250 modules.o \ -
palm/trunk/SOURCE/calc_mean_profile.f90
r4743 r4750 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! Bugfix for last commit22 ! 23 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix for last commit 28 ! 29 ! 4743 2020-10-14 16:40:58Z suehring 27 30 ! Add option to force calculation of horizontal mean profiles independent on data output 28 31 ! -
palm/trunk/SOURCE/indoor_model_mod.f90
r4730 r4750 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - Namelist parameter added to switch-off/on the indoor model during wall/soil spinup 28 ! - Bugfix in window-wall treatment during spinup - in the urban-surface model the window fraction 29 ! is set to zero during spinup, so it is done here also 30 ! - Bugfix in wall treatment - inner wall temperature was too low due to wrong weighting of 31 ! wall/green/window fractions 32 ! 33 ! 4730 2020-10-07 10:48:51Z suehring 27 34 ! Bugfix - avoid divisions by zero 28 35 ! … … 271 278 TYPE(build), DIMENSION(:), ALLOCATABLE :: buildings !< building array 272 279 273 INTEGER(iwp) :: num_build !< total number of buildings in domain 280 INTEGER(iwp) :: cooling_on !< Indoor cooling flag (0=off, 1=on) 281 INTEGER(iwp) :: heating_on !< Indoor heating flag (0=off, 1=on) 282 INTEGER(iwp) :: num_build !< total number of buildings in domain 283 INTEGER(iwp) :: solar_protection_off !< Solar protection off 284 INTEGER(iwp) :: solar_protection_on !< Solar protection on 285 286 LOGICAL :: indoor_during_spinup = .FALSE. !< namelist parameter used to switch-off/on the indoor model during spinup 274 287 ! 275 288 !-- Declare all global variables within the module … … 289 302 REAL(wp), PARAMETER :: params_solar_protection = 300.0_wp !< [W/m2] chap. G.5.3.1 sun protection closed, if the radiation 290 303 !< on facade exceeds this value 291 292 INTEGER(iwp) :: cooling_on !< Indoor cooling flag (0=off, 1=on)293 INTEGER(iwp) :: heating_on !< Indoor heating flag (0=off, 1=on)294 INTEGER(iwp) :: solar_protection_off !< Solar protection off295 INTEGER(iwp) :: solar_protection_on !< Solar protection on296 297 304 298 305 REAL(wp) :: a_m !< [m2] the effective mass-related area … … 416 423 ! 417 424 !-- Add VARIABLES that must be available to other modules 418 PUBLIC dt_indoor, skip_time_do_indoor, time_indoor 425 PUBLIC dt_indoor, & 426 indoor_during_spinup, & 427 skip_time_do_indoor, & 428 time_indoor 419 429 420 430 ! … … 1198 1208 1199 1209 USE surface_mod, & 1200 ONLY: ind_veg_wall, ind_wat_win, surf_usm_h, surf_usm_v 1210 ONLY: ind_pav_green, & 1211 ind_veg_wall, & 1212 ind_wat_win, & 1213 surf_usm_h, & 1214 surf_usm_v 1201 1215 1202 1216 USE urban_surface_mod, & 1203 ONLY: building_type, nzt_wall, t_wall_h, t_wall_v, t_window_h, t_window_v 1217 ONLY: building_type, & 1218 nzt_wall, & 1219 t_green_h, & 1220 t_green_v, & 1221 t_wall_h, & 1222 t_wall_v, & 1223 t_window_h, & 1224 t_window_v 1204 1225 1205 1226 … … 1213 1234 INTEGER(iwp) :: nb !< running index for buildings 1214 1235 1215 REAL(wp) :: indoor_wall_window_temperature !< weighted temperature of innermost wall/window layer 1216 1217 REAL(wp) :: indoor_wall_temperature !< temperature of innermost wall layer evtl in im_calc_temperatures einfÃŒgen 1218 1236 LOGICAL :: during_spinup !< flag indicating that the simulation is still in wall/soil spinup 1237 1238 REAL(wp) :: frac_green !< dummy for green fraction 1239 REAL(wp) :: frac_wall !< dummy for wall fraction 1240 REAL(wp) :: frac_win !< dummy for window fraction 1241 ! REAL(wp) :: indoor_wall_window_temperature !< weighted temperature of innermost wall/window layer 1242 REAL(wp) :: indoor_wall_temperature !< temperature of innermost wall layer evtl in im_calc_temperatures einfÃŒgen 1219 1243 REAL(wp) :: near_facade_temperature !< outside air temperature 10cm away from facade 1220 1244 REAL(wp) :: second_of_day !< second of the current day … … 1227 1251 CALL get_date_time( time_since_reference_point, second_of_day=second_of_day ) 1228 1252 time_utc_hour = second_of_day / seconds_per_hour 1253 ! 1254 !-- Check if the simulation is still in wall/soil spinup mode 1255 during_spinup = MERGE( .TRUE., .FALSE., time_since_reference_point < 0.0_wp ) 1229 1256 ! 1230 1257 !-- Following calculations must be done for each facade element. … … 1272 1299 m = buildings(nb)%m_h(fa) 1273 1300 ! 1301 !-- During spinup set window fraction to zero and add these to wall fraction. 1302 frac_win = MERGE( surf_usm_h(l)%frac(m,ind_wat_win), 0.0_wp, .NOT. during_spinup ) 1303 frac_wall = MERGE( surf_usm_h(l)%frac(m,ind_veg_wall), & 1304 surf_usm_h(l)%frac(m,ind_veg_wall) + & 1305 surf_usm_h(l)%frac(m,ind_wat_win), & 1306 .NOT. during_spinup ) 1307 frac_green = surf_usm_h(l)%frac(m,ind_pav_green) 1308 ! 1274 1309 !-- Determine building height level index. 1275 1310 kk = surf_usm_h(l)%k(m) + surf_usm_h(l)%koff … … 1281 1316 buildings(nb)%area_facade = facade_element_area * & 1282 1317 ( buildings(nb)%num_facades_per_building_h + & 1283 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1284 window_area_per_facade = surf_usm_h(l)%frac(m,ind_wat_win) * facade_element_area !< [m2] window area per facade 1285 !< element 1318 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1319 window_area_per_facade = frac_win * facade_element_area !< [m2] window area per facade element 1286 1320 1287 1321 buildings(nb)%net_floor_area = buildings(nb)%vol_tot / ( buildings(nb)%height_storey ) … … 1338 1372 k = surf_usm_h(l)%k(m) 1339 1373 near_facade_temperature = surf_usm_h(l)%pt_10cm(m) 1340 indoor_wall_window_temperature = & 1341 surf_usm_h(l)%frac(m,ind_veg_wall) * t_wall_h(l)%val(nzt_wall,m) & 1342 + surf_usm_h(l)%frac(m,ind_wat_win) * t_window_h(l)%val(nzt_wall,m) 1343 indoor_wall_temperature = surf_usm_h(l)%frac(m,ind_veg_wall) * t_wall_h(l)%val(nzt_wall,m) 1374 ! indoor_wall_window_temperature = frac_wall * t_wall_h(l)%val(nzt_wall,m) & 1375 ! + frac_win * t_window_h(l)%val(nzt_wall,m) & 1376 ! + frac_green * t_green_h(l)%val(nzt_wall,m) 1377 indoor_wall_temperature = frac_wall * t_wall_h(l)%val(nzt_wall,m) & 1378 + frac_win * t_window_h(l)%val(nzt_wall,m) & 1379 + frac_green * t_green_h(l)%val(nzt_wall,m) 1344 1380 ! 1345 1381 !-- Solar thermal gains. If net_sw_in larger than sun-protection threshold parameter … … 1510 1546 m = buildings(nb)%m_v(fa) 1511 1547 ! 1548 !-- During spinup set window fraction to zero and add these to wall fraction. 1549 frac_win = MERGE( surf_usm_v(l)%frac(m,ind_wat_win), 0.0_wp, .NOT. during_spinup ) 1550 frac_wall = MERGE( surf_usm_v(l)%frac(m,ind_veg_wall), & 1551 surf_usm_v(l)%frac(m,ind_veg_wall) + & 1552 surf_usm_v(l)%frac(m,ind_wat_win), & 1553 .NOT. during_spinup ) 1554 frac_green = surf_usm_v(l)%frac(m,ind_pav_green) 1555 ! 1512 1556 !-- Determine building height level index. 1513 1557 kk = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff … … 1523 1567 buildings(nb)%area_facade = facade_element_area * & 1524 1568 ( buildings(nb)%num_facades_per_building_h + & 1525 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1526 window_area_per_facade = surf_usm_v(l)%frac(m,ind_wat_win) * facade_element_area !< [m2] window area per 1527 !< facade element 1569 buildings(nb)%num_facades_per_building_v ) !< [m2] area of total facade 1570 window_area_per_facade = frac_win * facade_element_area !< [m2] window area per facade element 1528 1571 1529 1572 buildings(nb)%net_floor_area = buildings(nb)%vol_tot / ( buildings(nb)%height_storey ) … … 1562 1605 !-- (air_change_high) 1563 1606 air_change = ( buildings(nb)%air_change_high * schedule_d + & 1564 buildings(nb)%air_change_low )1607 buildings(nb)%air_change_low ) 1565 1608 ! 1566 1609 !-- Heat transfer of ventilation. … … 1584 1627 k = surf_usm_v(l)%k(m) 1585 1628 near_facade_temperature = surf_usm_v(l)%pt_10cm(m) 1586 indoor_wall_window_temperature = & 1587 surf_usm_v(l)%frac(m,ind_veg_wall) * t_wall_v(l)%val(nzt_wall,m) & 1588 + surf_usm_v(l)%frac(m,ind_wat_win) * t_window_v(l)%val(nzt_wall,m) 1589 indoor_wall_temperature = surf_usm_v(l)%frac(m,ind_veg_wall) * t_wall_v(l)%val(nzt_wall,m) 1629 1630 ! indoor_wall_window_temperature = frac_wall * t_wall_v(l)%val(nzt_wall,m) & 1631 ! + frac_win * t_window_v(l)%val(nzt_wall,m) & 1632 ! + frac_green * t_green_v(l)%val(nzt_wall,m) 1633 1634 indoor_wall_temperature = frac_wall * t_wall_v(l)%val(nzt_wall,m) & 1635 + frac_win * t_window_v(l)%val(nzt_wall,m) & 1636 + frac_green * t_green_v(l)%val(nzt_wall,m) 1590 1637 1591 1638 ! … … 1725 1772 surf_usm_v(l)%iwghf_eb(m) = - q_wall 1726 1773 surf_usm_v(l)%iwghf_eb_window(m) = - q_win 1774 1775 ! print*, "wwfjg", surf_usm_v(l)%iwghf_eb(m), surf_usm_v(l)%iwghf_eb_window(m) 1727 1776 ! 1728 1777 !-- Sum up operational indoor temperature per kk-level. Further below, this temperature is … … 2070 2119 CHARACTER (LEN=80) :: line !< string containing current line of file PARIN 2071 2120 2072 NAMELIST /indoor_parameters/ initial_indoor_temperature 2121 NAMELIST /indoor_parameters/ indoor_during_spinup, & 2122 initial_indoor_temperature 2073 2123 2074 2124 -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r4717 r4750 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Revision of 10-cm temperature at vertical walls - assume grid-cell temperature rather than employ 28 ! MOST 29 ! 30 ! 4717 2020-09-30 22:27:40Z pavelkrc 27 31 ! Fixes and optimizations of OpenMP parallelization, formatting of OpenMP 28 32 ! directives (J. Resler) … … 2044 2048 2045 2049 CASE ( '10cm' ) 2046 2047 DO m = 1, surf%ns 2048 surf%pt_10cm(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 2050 ! 2051 !-- For horizontal upward-facing surfaces 10-cm temperature can be calculated using MOST. 2052 IF ( .NOT. downward .AND. .NOT. surf_vertical ) THEN 2053 DO m = 1, surf%ns 2054 surf%pt_10cm(m) = surf%pt_surface(m) + surf%ts(m) / kappa & 2049 2055 * ( LOG( 0.1_wp / surf%z0h(m) ) - psi_h( 0.1_wp / surf%ol(m) ) & 2050 2056 + psi_h( surf%z0h(m) / surf%ol(m) ) ) 2051 ENDDO 2057 ENDDO 2058 ! 2059 !-- At vertical surfaces 10-cm temperature cannot be calculated via MOST as the Obukhov length 2060 !-- and temperature scaling parameter are not calculated. Hence, set 10-cm temperature to 2061 !-- the grid-cell temperature. 2062 ELSE 2063 DO m = 1, surf%ns 2064 surf%pt_10cm(m) = pt(surf%k(m)+surf%koff,surf%j(m)+surf%joff,surf%i(m)+surf%ioff) 2065 ENDDO 2066 ENDIF 2052 2067 2053 2068 END SELECT -
palm/trunk/SOURCE/time_integration_spinup.f90
r4687 r4750 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - bugfix, call hourly-based indoor model only once per hour, not every timestep. 28 ! - optionally switch-off/on the indoor model during spinup 29 ! 30 ! 4687 2020-09-21 19:40:16Z maronga 27 31 ! Indoor model is now available during spinup 28 32 ! … … 110 114 constant_flux_layer, & 111 115 coupling_start_time, & 112 current_timestep_number, &113 116 data_output_during_spinup, & 114 117 debug_output_timestep, & … … 167 170 168 171 USE indoor_model_mod, & 169 ONLY: dt_indoor, im_main_heatcool, time_indoor 172 ONLY: dt_indoor, & 173 im_main_heatcool, & 174 indoor_during_spinup, & 175 time_indoor 170 176 171 177 USE land_surface_model_mod, & … … 490 496 !-- Note, at first timestep indoor model is called, in order to provide 491 497 !-- a waste heat flux. 492 IF ( indoor_model ) THEN498 IF ( indoor_model .AND. indoor_during_spinup ) THEN 493 499 494 500 time_indoor = time_indoor + dt_3d 495 501 496 IF ( time_indoor >= dt_indoor .OR. current_timestep_number == 0 ) THEN502 IF ( time_indoor >= dt_indoor .OR. current_timestep_number_spinup == 0 ) THEN 497 503 498 504 time_indoor = time_indoor - dt_indoor -
palm/trunk/SOURCE/urban_surface_mod.f90
r4747 r4750 27 27 ! ----------------- 28 28 ! $Id$ 29 ! - bugfix in openmp directive 30 ! - make t_green_h and t_green_v public (required in indoor model) 31 ! 32 ! 4747 2020-10-16 09:19:57Z pavelkrc 29 33 ! Fix window absorptivity calculation (correctly account for 2-sided reflection) 30 34 ! … … 880 884 nzb_wall, & 881 885 nzt_wall, & 886 t_green_h, & 887 t_green_v, & 882 888 t_wall_h, & 883 889 t_wall_v, & … … 5149 5155 IMPLICIT NONE 5150 5156 5157 LOGICAL :: during_spinup !< if true, no calculation of window temperatures 5151 5158 LOGICAL :: horizontal !< Flag indicating horizontal or vertical surfaces 5159 5160 INTEGER(iwp) :: kw !< grid index - wall depth 5152 5161 INTEGER(iwp) :: l !< direction index 5153 LOGICAL :: during_spinup !< if true, no calculation of window temperatures 5154 5155 INTEGER(iwp) :: i,j,k,kw, m !< running indices 5162 INTEGER(iwp) :: m !< running index for surface elements 5156 5163 5157 5164 REAL(wp) :: win_absorp !< absorption coefficient from transmissivity … … 5197 5204 ! 5198 5205 !-- Cycle for all surfaces in given direction 5199 !$OMP PARALLEL DO PRIVATE (m, i, j, k, kw, wtend, wintend, win_absorp, wall_mod) SCHEDULE (STATIC)5206 !$OMP PARALLEL DO PRIVATE (m, kw, wtend, wintend, win_absorp) SCHEDULE (STATIC) 5200 5207 DO m = 1, surf%ns 5201 !5202 !-- Obtain indices5203 i = surf%i(m)5204 j = surf%j(m)5205 k = surf%k(m)5206 5208 ! 5207 5209 !-- Prognostic equation for ground/roof temperature t_wall
Note: See TracChangeset
for help on using the changeset viewer.