Changeset 4431 for palm/trunk/SOURCE/read_restart_data_mod.f90
- Timestamp:
- Feb 27, 2020 11:23:01 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/read_restart_data_mod.f90
r4360 r4431 25 25 ! ----------------- 26 26 ! $Id$ 27 ! added u_center_av, v_center_av, wspeed_av 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! Change automatic arrays to allocatable ones in rrd_local, in order to avoid 28 ! memory problems due to too small stack size for large jobs with intel 31 ! memory problems due to too small stack size for large jobs with intel 29 32 ! compiler. (J.Resler) 30 ! 33 ! 31 34 ! 4331 2019-12-10 18:25:02Z suehring 32 35 ! Enable restart data for 2-m potential temperature output 33 ! 36 ! 34 37 ! 4301 2019-11-22 12:09:09Z oliver.maas 35 38 ! removed recycling_yshift 36 ! 39 ! 37 40 ! 4227 2019-09-10 18:04:34Z gronemeier 38 41 ! implement new palm_date_time_mod and increased binary version 39 ! 42 ! 40 43 ! 4146 2019-08-07 07:47:36Z gronemeier 41 44 ! Corrected "Former revisions" section 42 ! 45 ! 43 46 ! 4131 2019-08-02 11:06:18Z monakurppa 44 47 ! Allocate hom and hom_sum to allow profile output for salsa variables. 45 ! 48 ! 46 49 ! 4101 2019-07-17 15:14:26Z gronemeier 47 50 ! remove old_dt 48 ! 51 ! 49 52 ! 4039 2019-06-18 10:32:41Z suehring 50 53 ! input of uu_av, vv_av, ww_av added 51 ! 54 ! 52 55 ! 4017 2019-06-06 12:16:46Z schwenkel 53 56 ! bugfix for r3998, allocation of 3d temporary arrays of various dimensions revised 54 ! 57 ! 55 58 ! 3998 2019-05-23 13:38:11Z suehring 56 59 ! Formatting adjustment 57 ! 60 ! 58 61 ! 3994 2019-05-22 18:08:09Z suehring 59 62 ! output of turbulence intensity added 60 ! 63 ! 61 64 ! 3988 2019-05-22 11:32:37Z kanani 62 65 ! + time_virtual_measurement (to enable steering of output interval) 63 ! 66 ! 64 67 ! 3936 2019-04-26 15:38:02Z kanani 65 68 ! Enable time-averaged output of theta_2m* with restarts 66 ! 69 ! 67 70 ! 3767 2019-02-27 08:18:02Z raasch 68 71 ! unused variables removed from rrd-subroutines parameter list 69 ! 72 ! 70 73 ! 3766 2019-02-26 16:23:41Z raasch 71 74 ! first argument removed from module_interface_rrd_* 72 ! 75 ! 73 76 ! 3668 2019-01-14 12:49:24Z maronga 74 77 ! Removed most_method and increased binary version 75 ! 78 ! 76 79 ! 3655 2019-01-07 16:51:22Z knoop 77 80 ! Implementation of the PALM module interface 78 ! 81 ! 79 82 ! 2894 2018-03-15 09:17:58Z Giersch 80 83 ! Initial revision 81 ! 84 ! 82 85 ! 83 86 ! Description: … … 111 114 ONLY: pt_2m_av, & 112 115 ti_av, & 116 u_center_av, & 113 117 uu_av, & 114 118 uv_10m_av, & 119 v_center_av, & 115 120 vv_av, & 121 wspeed_av, & 116 122 ww_av 117 123 … … 191 197 ! Description: 192 198 ! ------------ 193 !> Reads values of global control variables from restart-file (binary format) 199 !> Reads values of global control variables from restart-file (binary format) 194 200 !> created by PE0 of the previous run 195 201 !------------------------------------------------------------------------------! … … 199 205 CHARACTER (LEN=10) :: binary_version_global, version_on_file 200 206 201 LOGICAL :: found 207 LOGICAL :: found 202 208 203 209 … … 773 779 WRITE( message_string, * ) 'unknown variable named "', & 774 780 restart_string(1:length), & 775 '" found in global data from ', & 781 '" found in global data from ', & 776 782 'prior run on PE ', myid 777 783 CALL message( 'rrd_global', 'PA0302', 1, 2, 0, 6, 0 ) 778 784 779 785 ENDIF 780 786 … … 783 789 !-- Read next string 784 790 READ ( 13 ) length 785 READ ( 13 ) restart_string(1:length) 791 READ ( 13 ) restart_string(1:length) 786 792 787 793 ENDDO 788 794 789 795 790 796 CALL close_file( 13 ) 791 797 792 798 793 799 END SUBROUTINE rrd_global 794 800 … … 1013 1019 ! Description: 1014 1020 ! ------------ 1015 !> Reads processor specific data of variables and arrays from restart file 1021 !> Reads processor specific data of variables and arrays from restart file 1016 1022 !> (binary format). 1017 1023 !------------------------------------------------------------------------------! … … 1076 1082 CALL cpu_log( log_point_s(14), 'rrd_local', 'start' ) 1077 1083 ! 1078 !-- Allocate temporary buffer arrays. In previous versions, there were 1084 !-- Allocate temporary buffer arrays. In previous versions, there were 1079 1085 !-- declared as automated arrays, causing memory problems when these 1080 1086 !-- were allocate on stack. … … 1109 1115 !-- matches another time(s) in the current subdomain by shifting it 1110 1116 !-- for nx_on_file+1, ny_on_file+1 respectively 1111 1117 1112 1118 shift_y = 0 1113 1119 j = 0 1114 1120 DO WHILE ( nyspr+shift_y <= nyn-offset_y ) 1115 1116 IF ( nynpr+shift_y >= nys-offset_y ) THEN 1121 1122 IF ( nynpr+shift_y >= nys-offset_y ) THEN 1117 1123 1118 1124 shift_x = 0 1119 1125 DO WHILE ( nxlpr+shift_x <= nxr-offset_x ) 1120 1126 1121 1127 IF ( nxrpr+shift_x >= nxl-offset_x ) THEN 1122 1128 j = j +1 … … 1133 1139 file_list(files_to_be_opened) = i-1 1134 1140 ENDIF 1135 1141 1136 1142 offset_xa(files_to_be_opened,j) = offset_x + shift_x 1137 1143 offset_ya(files_to_be_opened,j) = offset_y + shift_y … … 1147 1153 shift_x = shift_x + ( nx_on_file + 1 ) 1148 1154 ENDDO 1149 1155 1150 1156 ENDIF 1151 1152 shift_y = shift_y + ( ny_on_file + 1 ) 1157 1158 shift_y = shift_y + ( ny_on_file + 1 ) 1153 1159 ENDDO 1154 1160 1155 1161 IF ( j > 0 ) overlap_count(files_to_be_opened) = j 1156 1162 1157 1163 ENDDO 1158 1164 1159 1165 ! 1160 1166 !-- Save the id-string of the current process, since myid_char may now be used … … 1172 1178 !-- Read data from all restart files determined above 1173 1179 DO i = 1, files_to_be_opened 1174 1180 1175 1181 j = file_list(i) 1176 1182 ! … … 1231 1237 '&= ', hor_index_bounds_previous_run(3,j), & 1232 1238 '&from the index bound information array' 1233 CALL message( 'rrd_local', 'PA0289', 2, 2, -1, 6, 1 ) 1239 CALL message( 'rrd_local', 'PA0289', 2, 2, -1, 6, 1 ) 1234 1240 ENDIF 1235 1241 … … 1240 1246 '&= ', hor_index_bounds_previous_run(4,j), & 1241 1247 '&from the index bound information array' 1242 CALL message( 'rrd_local', 'PA0290', 2, 2, -1, 6, 1 ) 1248 CALL message( 'rrd_local', 'PA0290', 2, 2, -1, 6, 1 ) 1243 1249 ENDIF 1244 1250 … … 1248 1254 '&nzb on file = ', nzb_on_file, & 1249 1255 '&nzb = ', nzb 1250 CALL message( 'rrd_local', 'PA0291', 1, 2, 0, 6, 0 ) 1256 CALL message( 'rrd_local', 'PA0291', 1, 2, 0, 6, 0 ) 1251 1257 ENDIF 1252 1258 … … 1256 1262 '&nzt on file = ', nzt_on_file, & 1257 1263 '&nzt = ', nzt 1258 CALL message( 'rrd_local', 'PA0292', 1, 2, 0, 6, 0 ) 1264 CALL message( 'rrd_local', 'PA0292', 1, 2, 0, 6, 0 ) 1259 1265 ENDIF 1260 1266 … … 1267 1273 ! 1268 1274 !-- Read arrays 1269 !-- ATTENTION: If the following read commands have been altered, the 1270 !-- ---------- version number of the variable binary_version_local must 1271 !-- be altered, too. Furthermore, the output list of arrays in 1272 !-- wrd_write_local must also be altered 1275 !-- ATTENTION: If the following read commands have been altered, the 1276 !-- ---------- version number of the variable binary_version_local must 1277 !-- be altered, too. Furthermore, the output list of arrays in 1278 !-- wrd_write_local must also be altered 1273 1279 !-- accordingly. 1274 1280 READ ( 13 ) length 1275 1281 READ ( 13 ) restart_string(1:length) 1276 1282 1277 1283 1278 1284 ! … … 1285 1291 1286 1292 found = .FALSE. 1287 1293 1288 1294 ! 1289 1295 !-- Get the index range of the subdomain on file which overlap with … … 1317 1323 IF ( .NOT. ALLOCATED( e_av ) ) THEN 1318 1324 ALLOCATE( e_av(nzb:nzt+1,nys-nbgp:nyn+nbgp, & 1319 nxl-nbgp:nxr+nbgp) ) 1325 nxl-nbgp:nxr+nbgp) ) 1320 1326 ENDIF 1321 1327 IF ( k == 1 ) READ ( 13 ) tmp_3d … … 1428 1434 IF ( .NOT. ALLOCATED( qsws_av ) ) THEN 1429 1435 ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) 1430 ENDIF 1436 ENDIF 1431 1437 IF ( k == 1 ) READ ( 13 ) tmp_2d 1432 1438 qsws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & … … 1488 1494 shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1489 1495 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1490 1496 1491 1497 CASE ( 'ssws_av' ) 1492 1498 IF ( .NOT. ALLOCATED( ssws_av ) ) THEN 1493 1499 ALLOCATE( ssws_av(nysg:nyng,nxlg:nxrg) ) 1494 ENDIF 1500 ENDIF 1495 1501 IF ( k == 1 ) READ ( 13 ) tmp_2d 1496 1502 ssws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & … … 1536 1542 u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1537 1543 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1538 1544 1545 CASE ( 'u_center_av' ) 1546 IF ( .NOT. ALLOCATED( u_center_av ) ) THEN 1547 ALLOCATE( u_center_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1548 ENDIF 1549 IF ( k == 1 ) THEN 1550 ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1551 nxl_on_file:nxr_on_file) ) 1552 READ ( 13 ) tmp_3d_non_standard 1553 ENDIF 1554 u_center_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1555 1539 1556 CASE ( 'uu_av' ) 1540 1557 IF ( .NOT. ALLOCATED( uu_av ) ) THEN … … 1616 1633 v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1617 1634 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1618 1635 1636 CASE ( 'v_center_av' ) 1637 IF ( .NOT. ALLOCATED( v_center_av ) ) THEN 1638 ALLOCATE( v_center_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1639 ENDIF 1640 IF ( k == 1 ) THEN 1641 ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1642 nxl_on_file:nxr_on_file) ) 1643 READ ( 13 ) tmp_3d_non_standard 1644 ENDIF 1645 v_center_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1646 1619 1647 CASE ( 'vv_av' ) 1620 1648 IF ( .NOT. ALLOCATED( vv_av ) ) THEN … … 1693 1721 w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1694 1722 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1695 1723 1696 1724 CASE ( 'ww_av' ) 1697 1725 IF ( .NOT. ALLOCATED( ww_av ) ) THEN … … 1744 1772 w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3d_non_standard(:,:,nxlf-nbgp:nxrf+nbgp) 1745 1773 ENDIF 1774 1775 CASE ( 'wspeed_av' ) 1776 IF ( .NOT. ALLOCATED( wspeed_av ) ) THEN 1777 ALLOCATE( wspeed_av(nzb:nzt+1,nys:nyn,nxl:nxr) ) 1778 ENDIF 1779 IF ( k == 1 ) THEN 1780 ALLOCATE( tmp_3d_non_standard(nzb:nzt+1,nys_on_file:nyn_on_file, & 1781 nxl_on_file:nxr_on_file) ) 1782 READ ( 13 ) tmp_3d_non_standard 1783 ENDIF 1784 wspeed_av(:,nysc:nync,nxlc:nxrc) = tmp_3d_non_standard(:,nysf:nynf,nxlf:nxrf) 1746 1785 1747 1786 CASE ( 'z0_av' ) … … 1791 1830 'from prior run on PE ', myid 1792 1831 CALL message( 'rrd_local', 'PA0302', 1, 2, 0, 6, 0 ) 1793 1832 1794 1833 ENDIF 1795 1834 1796 1835 END SELECT 1797 1836 1798 ENDDO ! overlaploop 1837 ENDDO ! overlaploop 1799 1838 1800 1839 !
Note: See TracChangeset
for help on using the changeset viewer.