Changeset 4850 for palm/trunk/SOURCE
- Timestamp:
- Jan 21, 2021 5:59:25 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 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 -
palm/trunk/SOURCE/surface_mod.f90
r4829 r4850 25 25 ! ----------------- 26 26 ! $Id$ 27 ! +t_prev 28 ! 29 ! 4829 2021-01-06 10:11:39Z suehring 27 30 ! Bugfix in creating error-message string 28 31 ! … … 418 421 419 422 !-- Indoor model variables 423 REAL(wp), DIMENSION(:), ALLOCATABLE :: t_prev !< indoor temperature for facade element 420 424 REAL(wp), DIMENSION(:), ALLOCATABLE :: waste_heat !< waste heat 421 425 ! -
palm/trunk/SOURCE/urban_surface_mod.f90
r4843 r4850 27 27 ! ----------------- 28 28 ! $Id$ 29 ! - Add restart data for previous indoor temperature 30 ! - Bugfix in mpi-io restart mechanism for waste-heat flux 31 ! 32 ! 4843 2021-01-15 15:22:11Z raasch 29 33 ! local namelist parameter added to switch off the module although the respective module namelist 30 34 ! appears in the namelist file … … 325 329 !> Further work: 326 330 !> ------------- 327 !> @todo Revise sorting of building_pars328 331 !> @todo Revise initialization when building_pars / building_surface_pars are provided - 329 332 !> intialization is not consistent to building_pars 330 333 !> @todo Revise flux conversion in energy-balance solver 331 334 !> @todo Check divisions in wtend (etc.) calculations for possible division by zero, e.g. in case 332 !> fraq(0,m) + fraq(1,m) = 0?!335 !> fraq(0,m) + fraq(1,m) = 0?! 333 336 !> @todo Use unit 90 for OPEN/CLOSE of input files (FK) 334 337 !--------------------------------------------------------------------------------------------------! … … 1012 1015 IF ( indoor_model ) THEN 1013 1016 DO l = 0, 1 1017 ALLOCATE ( surf_usm_h(l)%t_prev(1:surf_usm_h(l)%ns) ) 1014 1018 ALLOCATE ( surf_usm_h(l)%waste_heat(1:surf_usm_h(l)%ns) ) 1019 surf_usm_h(l)%t_prev = 0.0_wp 1015 1020 surf_usm_h(l)%waste_heat = 0.0_wp 1016 1021 ENDDO 1017 1022 DO l = 0, 3 1023 ALLOCATE ( surf_usm_v(l)%t_prev(1:surf_usm_v(l)%ns) ) 1018 1024 ALLOCATE ( surf_usm_v(l)%waste_heat(1:surf_usm_v(l)%ns) ) 1025 surf_usm_v(l)%t_prev = 0.0_wp 1019 1026 surf_usm_v(l)%waste_heat = 0.0_wp 1020 1027 ENDDO … … 5910 5917 TYPE( surf_type_1d_usm ), DIMENSION(0:1), SAVE :: tmp_surf_green_h !< 5911 5918 TYPE( surf_type_1d_usm ), DIMENSION(0:1), SAVE :: tmp_surf_mliq_h !< 5919 TYPE( surf_type_1d_usm ), DIMENSION(0:3), SAVE :: tmp_surf_t_prev_h !< 5912 5920 TYPE( surf_type_1d_usm ), DIMENSION(0:1), SAVE :: tmp_surf_wall_h !< 5913 5921 TYPE( surf_type_1d_usm ), DIMENSION(0:1), SAVE :: tmp_surf_waste_h !< … … 5919 5927 5920 5928 TYPE( surf_type_1d_usm ), DIMENSION(0:3), SAVE :: tmp_surf_green_v !< 5929 TYPE( surf_type_1d_usm ), DIMENSION(0:3), SAVE :: tmp_surf_t_prev_v !< 5921 5930 TYPE( surf_type_1d_usm ), DIMENSION(0:3), SAVE :: tmp_surf_wall_v !< 5922 5931 TYPE( surf_type_1d_usm ), DIMENSION(0:3), SAVE :: tmp_surf_waste_v !< … … 5929 5938 5930 5939 found = .TRUE. 5931 5932 5940 5933 5941 SELECT CASE ( restart_string(1:length) ) … … 5946 5954 IF ( ALLOCATED( tmp_surf_mliq_h(l)%val) ) DEALLOCATE( tmp_surf_mliq_h(l)%val ) 5947 5955 IF ( ALLOCATED( tmp_surf_waste_h(l)%val) ) DEALLOCATE( tmp_surf_waste_h(l)%val ) 5956 IF ( ALLOCATED( tmp_surf_t_prev_h(l)%val) ) DEALLOCATE( tmp_surf_t_prev_h(l)%val ) 5948 5957 ENDDO 5949 5958 … … 5961 5970 ALLOCATE( tmp_surf_mliq_h(l)%val(1:ns_h_on_file_usm(l)) ) 5962 5971 ALLOCATE( tmp_surf_waste_h(l)%val(1:ns_h_on_file_usm(l)) ) 5972 ALLOCATE( tmp_surf_t_prev_h(l)%val(1:ns_h_on_file_usm(l)) ) 5963 5973 ENDDO 5964 5974 … … 5977 5987 IF ( ALLOCATED( tmp_green_v(l)%val ) ) DEALLOCATE( tmp_green_v(l)%val ) 5978 5988 IF ( ALLOCATED( tmp_surf_waste_v(l)%val ) ) DEALLOCATE( tmp_surf_waste_v(l)%val ) 5989 IF ( ALLOCATED( tmp_surf_t_prev_v(l)%val ) ) DEALLOCATE( tmp_surf_t_prev_v(l)%val ) 5979 5990 ENDDO 5980 5991 … … 5991 6002 ALLOCATE( tmp_green_v(l)%val(nzb_wall:nzt_wall+1, 1:ns_v_on_file_usm(l) ) ) 5992 6003 ALLOCATE( tmp_surf_waste_v(l)%val(1:ns_v_on_file_usm(l)) ) 6004 ALLOCATE( tmp_surf_t_prev_v(l)%val(1:ns_v_on_file_usm(l)) ) 5993 6005 ENDDO 5994 6006 … … 6019 6031 CASE ( 't_surf_wall_h(0)' ) 6020 6032 IF ( k == 1 ) THEN 6021 IF ( .NOT. ALLOCATED( t_surf_wall_h_1(0)%val ) ) 6033 IF ( .NOT. ALLOCATED( t_surf_wall_h_1(0)%val ) ) & 6022 6034 ALLOCATE( t_surf_wall_h_1(0)%val(1:surf_usm_h(0)%ns) ) 6023 6035 READ ( 13 ) tmp_surf_wall_h(0)%val 6024 6036 ENDIF 6025 CALL surface_restore_elements( t_surf_wall_h_1(0)%val, tmp_surf_wall_h(0)%val, 6037 CALL surface_restore_elements( t_surf_wall_h_1(0)%val, tmp_surf_wall_h(0)%val, & 6026 6038 surf_usm_h(0)%start_index, start_index_on_file, & 6027 6039 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6030 6042 CASE ( 't_surf_wall_h(1)' ) 6031 6043 IF ( k == 1 ) THEN 6032 IF ( .NOT. ALLOCATED( t_surf_wall_h_1(1)%val ) ) 6044 IF ( .NOT. ALLOCATED( t_surf_wall_h_1(1)%val ) ) & 6033 6045 ALLOCATE( t_surf_wall_h_1(1)%val(1:surf_usm_h(1)%ns) ) 6034 6046 READ ( 13 ) tmp_surf_wall_h(1)%val 6035 6047 ENDIF 6036 CALL surface_restore_elements( t_surf_wall_h_1(1)%val, tmp_surf_wall_h(1)%val, 6048 CALL surface_restore_elements( t_surf_wall_h_1(1)%val, tmp_surf_wall_h(1)%val, & 6037 6049 surf_usm_h(1)%start_index, start_index_on_file, & 6038 6050 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6041 6053 CASE ( 't_surf_wall_v(0)' ) 6042 6054 IF ( k == 1 ) THEN 6043 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%val ) ) 6055 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(0)%val ) ) & 6044 6056 ALLOCATE( t_surf_wall_v_1(0)%val(1:surf_usm_v(0)%ns) ) 6045 6057 READ ( 13 ) tmp_surf_wall_v(0)%val 6046 6058 ENDIF 6047 CALL surface_restore_elements( t_surf_wall_v_1(0)%val, tmp_surf_wall_v(0)%val, 6059 CALL surface_restore_elements( t_surf_wall_v_1(0)%val, tmp_surf_wall_v(0)%val, & 6048 6060 surf_usm_v(0)%start_index, start_index_on_file, & 6049 6061 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6052 6064 CASE ( 't_surf_wall_v(1)' ) 6053 6065 IF ( k == 1 ) THEN 6054 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%val ) ) 6066 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(1)%val ) ) & 6055 6067 ALLOCATE( t_surf_wall_v_1(1)%val(1:surf_usm_v(1)%ns) ) 6056 6068 READ ( 13 ) tmp_surf_wall_v(1)%val 6057 6069 ENDIF 6058 CALL surface_restore_elements( t_surf_wall_v_1(1)%val, tmp_surf_wall_v(1)%val, 6070 CALL surface_restore_elements( t_surf_wall_v_1(1)%val, tmp_surf_wall_v(1)%val, & 6059 6071 surf_usm_v(1)%start_index, start_index_on_file, & 6060 6072 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6063 6075 CASE ( 't_surf_wall_v(2)' ) 6064 6076 IF ( k == 1 ) THEN 6065 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%val ) ) 6077 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(2)%val ) ) & 6066 6078 ALLOCATE( t_surf_wall_v_1(2)%val(1:surf_usm_v(2)%ns) ) 6067 6079 READ ( 13 ) tmp_surf_wall_v(2)%val 6068 6080 ENDIF 6069 CALL surface_restore_elements( t_surf_wall_v_1(2)%val, tmp_surf_wall_v(2)%val, 6081 CALL surface_restore_elements( t_surf_wall_v_1(2)%val, tmp_surf_wall_v(2)%val, & 6070 6082 surf_usm_v(2)%start_index, start_index_on_file, & 6071 6083 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6074 6086 CASE ( 't_surf_wall_v(3)' ) 6075 6087 IF ( k == 1 ) THEN 6076 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%val ) ) 6088 IF ( .NOT. ALLOCATED( t_surf_wall_v_1(3)%val ) ) & 6077 6089 ALLOCATE( t_surf_wall_v_1(3)%val(1:surf_usm_v(3)%ns) ) 6078 6090 READ ( 13 ) tmp_surf_wall_v(3)%val 6079 6091 ENDIF 6080 CALL surface_restore_elements( t_surf_wall_v_1(3)%val, tmp_surf_wall_v(3)%val, 6092 CALL surface_restore_elements( t_surf_wall_v_1(3)%val, tmp_surf_wall_v(3)%val, & 6081 6093 surf_usm_v(3)%start_index, start_index_on_file, & 6082 6094 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6085 6097 CASE ( 't_surf_window_h(0)' ) 6086 6098 IF ( k == 1 ) THEN 6087 IF ( .NOT. ALLOCATED( t_surf_window_h_1(0)%val ) ) 6099 IF ( .NOT. ALLOCATED( t_surf_window_h_1(0)%val ) ) & 6088 6100 ALLOCATE( t_surf_window_h_1(0)%val(1:surf_usm_h(0)%ns) ) 6089 6101 READ ( 13 ) tmp_surf_window_h(0)%val 6090 6102 ENDIF 6091 CALL surface_restore_elements( t_surf_window_h_1(0)%val, tmp_surf_window_h(0)%val, 6103 CALL surface_restore_elements( t_surf_window_h_1(0)%val, tmp_surf_window_h(0)%val, & 6092 6104 surf_usm_h(0)%start_index, start_index_on_file, & 6093 6105 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6096 6108 CASE ( 't_surf_window_h(1)' ) 6097 6109 IF ( k == 1 ) THEN 6098 IF ( .NOT. ALLOCATED( t_surf_window_h_1(1)%val ) ) 6110 IF ( .NOT. ALLOCATED( t_surf_window_h_1(1)%val ) ) & 6099 6111 ALLOCATE( t_surf_window_h_1(1)%val(1:surf_usm_h(1)%ns) ) 6100 6112 READ ( 13 ) tmp_surf_window_h(1)%val 6101 6113 ENDIF 6102 CALL surface_restore_elements( t_surf_window_h_1(1)%val, tmp_surf_window_h(1)%val, 6114 CALL surface_restore_elements( t_surf_window_h_1(1)%val, tmp_surf_window_h(1)%val, & 6103 6115 surf_usm_h(1)%start_index, start_index_on_file, & 6104 6116 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6107 6119 CASE ( 't_surf_window_v(0)' ) 6108 6120 IF ( k == 1 ) THEN 6109 IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%val ) ) 6121 IF ( .NOT. ALLOCATED( t_surf_window_v_1(0)%val ) ) & 6110 6122 ALLOCATE( t_surf_window_v_1(0)%val(1:surf_usm_v(0)%ns) ) 6111 6123 READ ( 13 ) tmp_surf_window_v(0)%val 6112 6124 ENDIF 6113 CALL surface_restore_elements( t_surf_window_v_1(0)%val, tmp_surf_window_v(0)%val, 6125 CALL surface_restore_elements( t_surf_window_v_1(0)%val, tmp_surf_window_v(0)%val, & 6114 6126 surf_usm_v(0)%start_index, start_index_on_file, & 6115 6127 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6151 6163 CASE ( 't_surf_green_h(0)' ) 6152 6164 IF ( k == 1 ) THEN 6153 IF ( .NOT. ALLOCATED( t_surf_green_h_1(0)%val ) ) 6165 IF ( .NOT. ALLOCATED( t_surf_green_h_1(0)%val ) ) & 6154 6166 ALLOCATE( t_surf_green_h_1(0)%val(1:surf_usm_h(0)%ns) ) 6155 6167 READ ( 13 ) tmp_surf_green_h(0)%val 6156 6168 ENDIF 6157 CALL surface_restore_elements( t_surf_green_h_1(0)%val, tmp_surf_green_h(0)%val, 6158 surf_usm_h(0)%start_index, start_index_on_file, &6169 CALL surface_restore_elements( t_surf_green_h_1(0)%val, tmp_surf_green_h(0)%val, & 6170 surf_usm_h(0)%start_index, start_index_on_file, & 6159 6171 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6160 6172 nys_on_file, nyn_on_file, nxl_on_file, nxr_on_file ) … … 6162 6174 CASE ( 't_surf_green_h(1)' ) 6163 6175 IF ( k == 1 ) THEN 6164 IF ( .NOT. ALLOCATED( t_surf_green_h_1(1)%val ) ) 6176 IF ( .NOT. ALLOCATED( t_surf_green_h_1(1)%val ) ) & 6165 6177 ALLOCATE( t_surf_green_h_1(1)%val(1:surf_usm_h(1)%ns) ) 6166 6178 READ ( 13 ) tmp_surf_green_h(1)%val 6167 6179 ENDIF 6168 CALL surface_restore_elements( t_surf_green_h_1(1)%val, tmp_surf_green_h(1)%val, 6169 surf_usm_h(1)%start_index, start_index_on_file, &6180 CALL surface_restore_elements( t_surf_green_h_1(1)%val, tmp_surf_green_h(1)%val, & 6181 surf_usm_h(1)%start_index, start_index_on_file, & 6170 6182 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6171 6183 nys_on_file, nyn_on_file, nxl_on_file, nxr_on_file ) … … 6173 6185 CASE ( 't_surf_green_v(0)' ) 6174 6186 IF ( k == 1 ) THEN 6175 IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%val ) ) 6187 IF ( .NOT. ALLOCATED( t_surf_green_v_1(0)%val ) ) & 6176 6188 ALLOCATE( t_surf_green_v_1(0)%val(1:surf_usm_v(0)%ns) ) 6177 6189 READ ( 13 ) tmp_surf_green_v(0)%val 6178 6190 ENDIF 6179 CALL surface_restore_elements( t_surf_green_v_1(0)%val, tmp_surf_green_v(0)%val, 6191 CALL surface_restore_elements( t_surf_green_v_1(0)%val, tmp_surf_green_v(0)%val, & 6180 6192 surf_usm_v(0)%start_index, start_index_on_file, & 6181 6193 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6184 6196 CASE ( 't_surf_green_v(1)' ) 6185 6197 IF ( k == 1 ) THEN 6186 IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%val ) ) 6198 IF ( .NOT. ALLOCATED( t_surf_green_v_1(1)%val ) ) & 6187 6199 ALLOCATE( t_surf_green_v_1(1)%val(1:surf_usm_v(1)%ns) ) 6188 6200 READ ( 13 ) tmp_surf_green_v(1)%val 6189 6201 ENDIF 6190 CALL surface_restore_elements( t_surf_green_v_1(1)%val, tmp_surf_green_v(1)%val, 6202 CALL surface_restore_elements( t_surf_green_v_1(1)%val, tmp_surf_green_v(1)%val, & 6191 6203 surf_usm_v(1)%start_index, start_index_on_file, & 6192 6204 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6195 6207 CASE ( 't_surf_green_v(2)' ) 6196 6208 IF ( k == 1 ) THEN 6197 IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%val ) ) 6209 IF ( .NOT. ALLOCATED( t_surf_green_v_1(2)%val ) ) & 6198 6210 ALLOCATE( t_surf_green_v_1(2)%val(1:surf_usm_v(2)%ns) ) 6199 6211 READ ( 13 ) tmp_surf_green_v(2)%val 6200 6212 ENDIF 6201 CALL surface_restore_elements( t_surf_green_v_1(2)%val, tmp_surf_green_v(2)%val, 6213 CALL surface_restore_elements( t_surf_green_v_1(2)%val, tmp_surf_green_v(2)%val, & 6202 6214 surf_usm_v(2)%start_index, start_index_on_file, & 6203 6215 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6206 6218 CASE ( 't_surf_green_v(3)' ) 6207 6219 IF ( k == 1 ) THEN 6208 IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%val ) ) 6220 IF ( .NOT. ALLOCATED( t_surf_green_v_1(3)%val ) ) & 6209 6221 ALLOCATE( t_surf_green_v_1(3)%val(1:surf_usm_v(3)%ns) ) 6210 6222 READ ( 13 ) tmp_surf_green_v(3)%val 6211 6223 ENDIF 6212 CALL surface_restore_elements( t_surf_green_v_1(3)%val, tmp_surf_green_v(3)%val, 6224 CALL surface_restore_elements( t_surf_green_v_1(3)%val, tmp_surf_green_v(3)%val, & 6213 6225 surf_usm_v(3)%start_index, start_index_on_file, & 6214 6226 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6243 6255 READ ( 13 ) tmp_surf_waste_h(0)%val 6244 6256 ENDIF 6245 CALL surface_restore_elements( surf_usm_h(0)%waste_heat, tmp_surf_waste_h(0)%val, 6257 CALL surface_restore_elements( surf_usm_h(0)%waste_heat, tmp_surf_waste_h(0)%val, & 6246 6258 surf_usm_h(0)%start_index, start_index_on_file, & 6247 6259 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6254 6266 READ ( 13 ) tmp_surf_waste_h(1)%val 6255 6267 ENDIF 6256 CALL surface_restore_elements( surf_usm_h(1)%waste_heat, tmp_surf_waste_h(1)%val, 6268 CALL surface_restore_elements( surf_usm_h(1)%waste_heat, tmp_surf_waste_h(1)%val, & 6257 6269 surf_usm_h(1)%start_index, start_index_on_file, & 6258 6270 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6266 6278 READ ( 13 ) tmp_surf_waste_v(0)%val 6267 6279 ENDIF 6268 CALL surface_restore_elements( surf_usm_v(0)%waste_heat, tmp_surf_waste_v(0)%val, 6280 CALL surface_restore_elements( surf_usm_v(0)%waste_heat, tmp_surf_waste_v(0)%val, & 6269 6281 surf_usm_v(0)%start_index, start_index_on_file, & 6270 6282 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6277 6289 READ ( 13 ) tmp_surf_waste_v(1)%val 6278 6290 ENDIF 6279 CALL surface_restore_elements( surf_usm_v(1)%waste_heat, tmp_surf_waste_v(1)%val, 6291 CALL surface_restore_elements( surf_usm_v(1)%waste_heat, tmp_surf_waste_v(1)%val, & 6280 6292 surf_usm_v(1)%start_index, start_index_on_file, & 6281 6293 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6288 6300 READ ( 13 ) tmp_surf_waste_v(2)%val 6289 6301 ENDIF 6290 CALL surface_restore_elements( surf_usm_v(2)%waste_heat, tmp_surf_waste_v(2)%val, 6302 CALL surface_restore_elements( surf_usm_v(2)%waste_heat, tmp_surf_waste_v(2)%val, & 6291 6303 surf_usm_v(2)%start_index, start_index_on_file, & 6292 6304 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6299 6311 READ ( 13 ) tmp_surf_waste_v(3)%val 6300 6312 ENDIF 6301 CALL surface_restore_elements( surf_usm_v(3)%waste_heat, tmp_surf_waste_v(3)%val, 6313 CALL surface_restore_elements( surf_usm_v(3)%waste_heat, tmp_surf_waste_v(3)%val, & 6302 6314 surf_usm_v(3)%start_index, start_index_on_file, & 6303 6315 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6304 6316 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6305 6317 6306 CASE ( 't_ wall_h(0)' )6318 CASE ( 't_prev_h(0)' ) 6307 6319 IF ( k == 1 ) THEN 6308 IF ( .NOT. ALLOCATED( t_wall_h_1(0)%val ) )&6309 ALLOCATE( t_wall_h_1(0)%val(nzb_wall:nzt_wall+1,1:surf_usm_h(0)%ns) )6310 READ ( 13 ) tmp_ wall_h(0)%val6311 ENDIF 6312 CALL surface_restore_elements( t_wall_h_1(0)%val, tmp_wall_h(0)%val,&6320 IF ( .NOT. ALLOCATED( surf_usm_h(0)%t_prev ) ) & 6321 ALLOCATE( surf_usm_h(0)%t_prev(1:surf_usm_h(0)%ns) ) 6322 READ ( 13 ) tmp_surf_t_prev_h(0)%val 6323 ENDIF 6324 CALL surface_restore_elements( surf_usm_h(0)%t_prev, tmp_surf_t_prev_h(0)%val, & 6313 6325 surf_usm_h(0)%start_index, start_index_on_file, & 6314 6326 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6315 6327 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6316 6328 6317 CASE ( 't_ wall_h(1)' )6329 CASE ( 't_prev_h(1)' ) 6318 6330 IF ( k == 1 ) THEN 6319 IF ( .NOT. ALLOCATED( t_wall_h_1(1)%val ) )&6320 ALLOCATE( t_wall_h_1(1)%val(nzb_wall:nzt_wall+1,1:surf_usm_h(1)%ns) )6321 READ ( 13 ) tmp_ wall_h(1)%val6322 ENDIF 6323 CALL surface_restore_elements( t_wall_h_1(1)%val, tmp_wall_h(1)%val,&6331 IF ( .NOT. ALLOCATED( surf_usm_h(1)%t_prev ) ) & 6332 ALLOCATE( surf_usm_h(1)%t_prev(1:surf_usm_h(1)%ns) ) 6333 READ ( 13 ) tmp_surf_t_prev_h(1)%val 6334 ENDIF 6335 CALL surface_restore_elements( surf_usm_h(1)%t_prev, tmp_surf_t_prev_h(1)%val, & 6324 6336 surf_usm_h(1)%start_index, start_index_on_file, & 6325 6337 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6326 6338 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6327 6339 6328 CASE ( 't_wall_v(0)' ) 6340 6341 CASE ( 't_prev_v(0)' ) 6329 6342 IF ( k == 1 ) THEN 6330 IF ( .NOT. ALLOCATED( t_wall_v_1(0)%val ) )&6331 ALLOCATE( t_wall_v_1(0)%val(nzb_wall:nzt_wall+1,1:surf_usm_v(0)%ns) )6332 READ ( 13 ) tmp_ wall_v(0)%val6333 ENDIF 6334 CALL surface_restore_elements( t_wall_v_1(0)%val, tmp_wall_v(0)%val,&6343 IF ( .NOT. ALLOCATED( surf_usm_v(0)%t_prev ) ) & 6344 ALLOCATE( surf_usm_v(0)%t_prev(1:surf_usm_v(0)%ns) ) 6345 READ ( 13 ) tmp_surf_t_prev_v(0)%val 6346 ENDIF 6347 CALL surface_restore_elements( surf_usm_v(0)%t_prev, tmp_surf_t_prev_v(0)%val, & 6335 6348 surf_usm_v(0)%start_index, start_index_on_file, & 6336 6349 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6337 6350 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6338 6351 6339 CASE ( 't_ wall_v(1)' )6352 CASE ( 't_prev_v(1)' ) 6340 6353 IF ( k == 1 ) THEN 6341 IF ( .NOT. ALLOCATED( t_wall_v_1(1)%val ) )&6342 ALLOCATE( t_wall_v_1(1)%val(nzb_wall:nzt_wall+1,1:surf_usm_v(1)%ns) )6343 READ ( 13 ) tmp_ wall_v(1)%val6344 ENDIF 6345 CALL surface_restore_elements( t_wall_v_1(1)%val, tmp_wall_v(1)%val,&6354 IF ( .NOT. ALLOCATED( surf_usm_v(1)%t_prev ) ) & 6355 ALLOCATE( surf_usm_v(1)%t_prev(1:surf_usm_v(1)%ns) ) 6356 READ ( 13 ) tmp_surf_t_prev_v(1)%val 6357 ENDIF 6358 CALL surface_restore_elements( surf_usm_v(1)%t_prev, tmp_surf_t_prev_v(1)%val, & 6346 6359 surf_usm_v(1)%start_index, start_index_on_file, & 6347 6360 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6348 6361 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6349 6362 6350 CASE ( 't_ wall_v(2)' )6363 CASE ( 't_prev_v(2)' ) 6351 6364 IF ( k == 1 ) THEN 6352 IF ( .NOT. ALLOCATED( t_wall_v_1(2)%val ) )&6353 ALLOCATE( t_wall_v_1(2)%val(nzb_wall:nzt_wall+1,1:surf_usm_v(2)%ns) )6354 READ ( 13 ) tmp_ wall_v(2)%val6355 ENDIF 6356 CALL surface_restore_elements( t_wall_v_1(2)%val, tmp_wall_v(2)%val,&6365 IF ( .NOT. ALLOCATED( surf_usm_v(2)%t_prev ) ) & 6366 ALLOCATE( surf_usm_v(2)%t_prev(1:surf_usm_v(2)%ns) ) 6367 READ ( 13 ) tmp_surf_t_prev_v(2)%val 6368 ENDIF 6369 CALL surface_restore_elements( surf_usm_v(2)%t_prev, tmp_surf_t_prev_v(2)%val, & 6357 6370 surf_usm_v(2)%start_index, start_index_on_file, & 6358 6371 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6359 6372 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6360 6373 6361 CASE ( 't_ wall_v(3)' )6374 CASE ( 't_prev_v(3)' ) 6362 6375 IF ( k == 1 ) THEN 6363 IF ( .NOT. ALLOCATED( t_wall_v_1(3)%val ) )&6364 ALLOCATE( t_wall_v_1(3)%val(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) )6365 READ ( 13 ) tmp_ wall_v(3)%val6366 ENDIF 6367 CALL surface_restore_elements( t_wall_v_1(3)%val, tmp_wall_v(3)%val,&6376 IF ( .NOT. ALLOCATED( surf_usm_v(3)%t_prev ) ) & 6377 ALLOCATE( surf_usm_v(3)%t_prev(1:surf_usm_v(3)%ns) ) 6378 READ ( 13 ) tmp_surf_t_prev_v(3)%val 6379 ENDIF 6380 CALL surface_restore_elements( surf_usm_v(3)%t_prev, tmp_surf_t_prev_v(3)%val, & 6368 6381 surf_usm_v(3)%start_index, start_index_on_file, & 6369 6382 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6370 6383 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6371 6384 6385 CASE ( 't_wall_h(0)' ) 6386 IF ( k == 1 ) THEN 6387 IF ( .NOT. ALLOCATED( t_wall_h_1(0)%val ) ) & 6388 ALLOCATE( t_wall_h_1(0)%val(nzb_wall:nzt_wall+1, 1:surf_usm_h(0)%ns) ) 6389 READ ( 13 ) tmp_wall_h(0)%val 6390 ENDIF 6391 CALL surface_restore_elements( t_wall_h_1(0)%val, tmp_wall_h(0)%val, & 6392 surf_usm_h(0)%start_index, start_index_on_file, & 6393 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6394 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6395 6396 CASE ( 't_wall_h(1)' ) 6397 IF ( k == 1 ) THEN 6398 IF ( .NOT. ALLOCATED( t_wall_h_1(1)%val ) ) & 6399 ALLOCATE( t_wall_h_1(1)%val(nzb_wall:nzt_wall+1, 1:surf_usm_h(1)%ns) ) 6400 READ ( 13 ) tmp_wall_h(1)%val 6401 ENDIF 6402 CALL surface_restore_elements( t_wall_h_1(1)%val, tmp_wall_h(1)%val, & 6403 surf_usm_h(1)%start_index, start_index_on_file, & 6404 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6405 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6406 6407 CASE ( 't_wall_v(0)' ) 6408 IF ( k == 1 ) THEN 6409 IF ( .NOT. ALLOCATED( t_wall_v_1(0)%val ) ) & 6410 ALLOCATE( t_wall_v_1(0)%val(nzb_wall:nzt_wall+1, 1:surf_usm_v(0)%ns) ) 6411 READ ( 13 ) tmp_wall_v(0)%val 6412 ENDIF 6413 CALL surface_restore_elements( t_wall_v_1(0)%val, tmp_wall_v(0)%val, & 6414 surf_usm_v(0)%start_index, start_index_on_file, & 6415 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6416 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6417 6418 CASE ( 't_wall_v(1)' ) 6419 IF ( k == 1 ) THEN 6420 IF ( .NOT. ALLOCATED( t_wall_v_1(1)%val ) ) & 6421 ALLOCATE( t_wall_v_1(1)%val(nzb_wall:nzt_wall+1, 1:surf_usm_v(1)%ns) ) 6422 READ ( 13 ) tmp_wall_v(1)%val 6423 ENDIF 6424 CALL surface_restore_elements( t_wall_v_1(1)%val, tmp_wall_v(1)%val, & 6425 surf_usm_v(1)%start_index, start_index_on_file, & 6426 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6427 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6428 6429 CASE ( 't_wall_v(2)' ) 6430 IF ( k == 1 ) THEN 6431 IF ( .NOT. ALLOCATED( t_wall_v_1(2)%val ) ) & 6432 ALLOCATE( t_wall_v_1(2)%val(nzb_wall:nzt_wall+1, 1:surf_usm_v(2)%ns) ) 6433 READ ( 13 ) tmp_wall_v(2)%val 6434 ENDIF 6435 CALL surface_restore_elements( t_wall_v_1(2)%val, tmp_wall_v(2)%val, & 6436 surf_usm_v(2)%start_index, start_index_on_file, & 6437 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6438 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6439 6440 CASE ( 't_wall_v(3)' ) 6441 IF ( k == 1 ) THEN 6442 IF ( .NOT. ALLOCATED( t_wall_v_1(3)%val ) ) & 6443 ALLOCATE( t_wall_v_1(3)%val(nzb_wall:nzt_wall+1, 1:surf_usm_v(3)%ns) ) 6444 READ ( 13 ) tmp_wall_v(3)%val 6445 ENDIF 6446 CALL surface_restore_elements( t_wall_v_1(3)%val, tmp_wall_v(3)%val, & 6447 surf_usm_v(3)%start_index, start_index_on_file, & 6448 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & 6449 nys_on_file, nyn_on_file, nxl_on_file,nxr_on_file ) 6450 6372 6451 CASE ( 't_window_h(0)' ) 6373 6452 IF ( k == 1 ) THEN 6374 IF ( .NOT. ALLOCATED( t_window_h_1(0)%val ) ) 6453 IF ( .NOT. ALLOCATED( t_window_h_1(0)%val ) ) & 6375 6454 ALLOCATE( t_window_h_1(0)%val(nzb_wall:nzt_wall+1, 1:surf_usm_h(0)%ns) ) 6376 6455 READ ( 13 ) tmp_window_h(0)%val 6377 6456 ENDIF 6378 CALL surface_restore_elements( t_window_h_1(0)%val, tmp_window_h(0)%val, 6457 CALL surface_restore_elements( t_window_h_1(0)%val, tmp_window_h(0)%val, & 6379 6458 surf_usm_h(0)%start_index, start_index_on_file, & 6380 6459 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6383 6462 CASE ( 't_window_h(1)' ) 6384 6463 IF ( k == 1 ) THEN 6385 IF ( .NOT. ALLOCATED( t_window_h_1(1)%val ) ) 6464 IF ( .NOT. ALLOCATED( t_window_h_1(1)%val ) ) & 6386 6465 ALLOCATE( t_window_h_1(1)%val(nzb_wall:nzt_wall+1, 1:surf_usm_h(1)%ns) ) 6387 6466 READ ( 13 ) tmp_window_h(1)%val 6388 6467 ENDIF 6389 CALL surface_restore_elements( t_window_h_1(1)%val, tmp_window_h(1)%val, 6468 CALL surface_restore_elements( t_window_h_1(1)%val, tmp_window_h(1)%val, & 6390 6469 surf_usm_h(1)%start_index, start_index_on_file, & 6391 6470 end_index_on_file, nxlc, nysc, nxlf, nxrf, nysf, nynf, & … … 6561 6640 CALL rrd_mpi_io_surface( 't_surf_green_h(' // dum // ')', t_surf_green_h_1(l)%val ) 6562 6641 6563 IF ( .NOT. ALLOCATED( m_liq_usm_h_1(l)%val ) ) &6642 IF ( .NOT. ALLOCATED( m_liq_usm_h_1(l)%val ) ) & 6564 6643 ALLOCATE( m_liq_usm_h_1(l)%val(1:surf_usm_h(l)%ns) ) 6565 6644 CALL rrd_mpi_io_surface( 'm_liq_usm_h(' // dum // ')', m_liq_usm_h_1(l)%val ) 6566 6645 6567 6646 IF ( indoor_model ) THEN 6568 IF ( .NOT. ALLOCATED( surf_usm_h(l)%waste_heat ) ) &6647 IF ( .NOT. ALLOCATED( surf_usm_h(l)%waste_heat ) ) & 6569 6648 ALLOCATE( surf_usm_h(l)%waste_heat(1:surf_usm_h(l)%ns) ) 6570 6649 CALL rrd_mpi_io_surface( 'waste_heat_h(' // dum // ')', surf_usm_h(l)%waste_heat ) 6650 IF ( .NOT. ALLOCATED( surf_usm_h(l)%t_prev ) ) & 6651 ALLOCATE( surf_usm_h(l)%t_prev(1:surf_usm_h(l)%ns) ) 6652 CALL rrd_mpi_io_surface( 't_prev_h(' // dum // ')', surf_usm_h(l)%t_prev ) 6571 6653 ENDIF 6572 6654 … … 6596 6678 ALLOCATE( t_surf_green_v_1(l)%val(1:surf_usm_v(l)%ns) ) 6597 6679 CALL rrd_mpi_io_surface( 't_surf_green_v(' // dum // ')', t_surf_green_v_1(l)%val) 6680 6681 IF ( indoor_model ) THEN 6682 IF ( .NOT. ALLOCATED( surf_usm_v(l)%waste_heat ) ) & 6683 ALLOCATE( surf_usm_v(l)%waste_heat(1:surf_usm_v(l)%ns) ) 6684 CALL rrd_mpi_io_surface( 'waste_heat_v(' // dum // ')', surf_usm_v(l)%waste_heat ) 6685 IF ( .NOT. ALLOCATED( surf_usm_v(l)%t_prev ) ) & 6686 ALLOCATE( surf_usm_v(l)%t_prev(1:surf_usm_v(l)%ns) ) 6687 CALL rrd_mpi_io_surface( 't_prev_v(' // dum // ')', surf_usm_v(l)%t_prev ) 6688 ENDIF 6598 6689 6599 6690 ENDDO … … 7372 7463 CALL wrd_write_string( 'waste_heat_h(' // dum // ')' ) 7373 7464 WRITE ( 14 ) surf_usm_h(l)%waste_heat 7465 CALL wrd_write_string( 't_prev_h(' // dum // ')' ) 7466 WRITE ( 14 ) surf_usm_h(l)%t_prev 7374 7467 ENDIF 7375 7468 ENDDO … … 7397 7490 CALL wrd_write_string( 'waste_heat_v(' // dum // ')' ) 7398 7491 WRITE ( 14 ) surf_usm_v(l)%waste_heat 7492 CALL wrd_write_string( 't_prev_v(' // dum // ')' ) 7493 WRITE ( 14 ) surf_usm_v(l)%t_prev 7399 7494 ENDIF 7400 7495 … … 7466 7561 CALL wrd_mpi_io_surface( 'm_liq_usm_h(' // dum // ')', m_liq_usm_h(l)%val ) 7467 7562 IF ( indoor_model ) THEN 7468 CALL wrd_mpi_io_surface( 'waste_heat_h(' // dum // ')', surf_usm_h(l)%waste_heat ) ! NEED TO BE CHECKED!!!!! 7563 CALL wrd_mpi_io_surface( 'waste_heat_h(' // dum // ')', surf_usm_h(l)%waste_heat ) 7564 CALL wrd_mpi_io_surface( 't_prev_h(' // dum // ')', surf_usm_h(l)%t_prev ) 7469 7565 ENDIF 7470 7566 … … 7488 7584 CALL wrd_mpi_io_surface( 't_surf_green_v(' // dum // ')', t_surf_green_v(l)%val ) 7489 7585 7586 IF ( indoor_model ) THEN 7587 CALL wrd_mpi_io_surface( 'waste_heat_v(' // dum // ')', surf_usm_v(l)%waste_heat ) 7588 CALL wrd_mpi_io_surface( 't_prev_v(' // dum // ')', surf_usm_v(l)%t_prev ) 7589 ENDIF 7490 7590 ENDDO 7491 7591
Note: See TracChangeset
for help on using the changeset viewer.