Changeset 257 for palm/trunk/SOURCE
- Timestamp:
- Mar 11, 2009 3:17:42 PM (16 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r256 r257 24 24 25 25 Output of messages replaced by message handling routine. 26 (advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, 27 check_open, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, 28 data_output_profiles, data_output_spectra, fft_xy, flow_statistics, header, 29 init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, 30 netcdf, parin, plant_canopy_model, poisfft_hybrid, poismg, read_3d_binary, 31 read_var_list) 32 26 33 First constant in array den also defined as type double. (eqn_state_seawater) 27 34 … … 30 37 user_init_grid, user_parin, write_var_list) 31 38 32 advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_spectra, eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, parin, read_var_list, sort_particles, user_check_parameters, user_header, user_init_grid, user_parin, write_var_list39 advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_spectra, eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, netcdf, parin, plant_canopy_model, poisfft_hybrid, poismg, read_3d_binary, read_var_list, sort_particles, user_check_parameters, user_header, user_init_grid, user_parin, write_var_list 33 40 34 41 -
palm/trunk/SOURCE/netcdf.f90
r226 r257 7 7 ! Current revisions: 8 8 ! ------------------ 9 ! 9 ! Output of messages replaced by message handling routine. 10 ! 10 11 ! 11 12 ! Former revisions: … … 108 109 j = INDEX( netcdf_precision(i), '_' ) 109 110 IF ( j == 0 ) THEN 110 IF ( myid == 0 ) THEN 111 PRINT*, '+++ define_netcdf_header: netcdf_precision must ', & 112 'contain a "_" netcdf_precision(', i, ')="', & 113 TRIM( netcdf_precision(i) ),'"' 114 ENDIF 115 CALL local_stop 111 WRITE ( message_string, * ) 'netcdf_precision must contain a "_"', & 112 'netcdf_precision(', i, ')="', & 113 TRIM( netcdf_precision(i) ),'"' 114 CALL message( 'define_netcdf_header', 'PA0241', 1, 2, 0, 6, 0 ) 116 115 ENDIF 117 116 … … 124 123 j = NF90_REAL8 125 124 ELSE 126 IF ( myid == 0 ) THEN 127 PRINT*, '+++ define_netcdf_header: illegal netcdf precision: ',& 128 'netcdf_precision(', i, ')="', & 129 TRIM( netcdf_precision(i) ),'"' 130 ENDIF 131 CALL local_stop 125 WRITE ( message_string, * ) 'illegal netcdf precision: ', & 126 'netcdf_precision(', i, ')="', & 127 TRIM( netcdf_precision(i) ),'"' 128 CALL message( 'define_netcdf_header', 'PA0242', 1, 2, 0, 6, 0 ) 132 129 ENDIF 133 130 … … 155 152 156 153 CASE DEFAULT 157 IF ( myid == 0 ) THEN 158 PRINT*, '+++ define_netcdf_header: unknown variable in ', & 159 'inipar assignment: netcdf_precision(', i, ')="',& 160 TRIM( netcdf_precision(i) ),'"' 161 ENDIF 162 CALL local_stop 154 WRITE ( message_string, * ) 'unknown variable in inipar assignment:',& 155 'netcdf_precision(', i, ')="', & 156 TRIM( netcdf_precision(i) ),'"' 157 CALL message( 'define_netcdf_header', 'PA0243', 1, 2, 0, 6, 0 ) 163 158 164 159 END SELECT … … 420 415 421 416 IF ( .NOT. found ) THEN 422 PRINT*, '+++ define_netcdf_header: no grid defined for', & 423 ' variable ', do3d(av,i) 417 WRITE ( message_string, * ) 'no grid defined for', & 418 ' variable ', TRIM( do3d(av,i) ) 419 CALL message( 'define_netcdf_header', 'PA0244', 0, 1, 0, 6, 0 ) 424 420 ENDIF 425 421 … … 562 558 563 559 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 564 PRINT*, '+++ WARNING: NetCDF file for volume data ' // & 565 TRIM( var ) // ' from previuos run found,' 566 PRINT*, ' but this file cannot be extended due to' // & 567 ' variable mismatch.' 568 PRINT*, ' New file is created instead.' 560 message_string = 'NetCDF file for volume data ' // & 561 TRIM( var ) // ' from previuos run found,' // & 562 '&but this file cannot be extended due to' // & 563 ' variable mismatch.' // & 564 '&New file is created instead.' 565 CALL message( 'define_netcdf_header', 'PA0245', 0, 1, 0, 6, 0 ) 569 566 extend = .FALSE. 570 567 RETURN … … 586 583 587 584 IF ( nz_do3d-nzb+1 /= nz_old ) THEN 588 PRINT*, '+++ WARNING: NetCDF file for volume data ' // & 589 TRIM( var ) // ' from previuos run found,' 590 PRINT*, ' but this file cannot be extended due to' // & 591 ' mismatch in number of' 592 PRINT*, ' vertical grid points (nz_do3d).' 593 PRINT*, ' New file is created instead.' 585 message_string = 'NetCDF file for volume data ' // & 586 TRIM( var ) // ' from previuos run found,' // & 587 '&but this file cannot be extended due to' // & 588 ' mismatch in number of' // & 589 '&vertical grid points (nz_do3d).' // & 590 '&New file is created instead.' 591 CALL message( 'define_netcdf_header', 'PA0246', 0, 1, 0, 6, 0 ) 594 592 extend = .FALSE. 595 593 RETURN … … 620 618 621 619 IF ( last_time_coordinate(1) >= simulated_time ) THEN 622 PRINT*, '+++ WARNING: NetCDF file for volume data ' // & 623 TRIM( var ) // ' from previuos run found,' 624 PRINT*, ' but this file cannot be extended becaus' // & 625 'e the current output time' 626 PRINT*, ' is less or equal than the last output t' // & 627 'ime on this file.' 628 PRINT*, ' New file is created instead.' 620 message_string = 'NetCDF file for volume data ' // & 621 TRIM( var ) // ' from previuos run found,' // & 622 '&but this file cannot be extended becaus' // & 623 'e the current output time' // & 624 '&is less or equal than the last output t' // & 625 'ime on this file.' // & 626 '&New file is created instead.' 627 CALL message( 'define_netcdf_header', 'PA0247', 0, 1, 0, 6, 0 ) 629 628 do3d_time_count(av) = 0 630 629 extend = .FALSE. … … 648 647 TRIM( run_description_header ) ) 649 648 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 96 ) 650 PRINT*, '*** NetCDF file for volume data ' // TRIM( var ) //&651 ' from previous run found.'652 PRINT*, 'This file will be extended.'653 649 message_string = 'NetCDF file for volume data ' // & 650 TRIM( var ) // ' from previous run found.' // & 651 '&This file will be extended.' 652 CALL message( 'define_netcdf_header', 'PA0248', 0, 0, 0, 6, 0 ) 654 653 655 654 CASE ( 'xy_new' ) … … 945 944 946 945 IF ( .NOT. found ) THEN 947 PRINT*, '+++ define_netcdf_header: no grid defined ', & 948 'for variable ', do2d(av,i) 946 WRITE ( message_string, * ) 'no grid defined for', & 947 ' variable ', TRIM( do2d(av,i) ) 948 CALL message( 'define_netcdf_header', 'PA0244', 0, 1, 0, 6, 0 ) 949 949 ENDIF 950 950 … … 1131 1131 1132 1132 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 1133 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1134 TRIM( var ) // ' from previuos run found,' 1135 PRINT*, ' but this file cannot be extended due to' // & 1136 ' variable mismatch.' 1137 PRINT*, ' New file is created instead.' 1133 message_string = 'NetCDF file for cross-sections ' // & 1134 TRIM( var ) // ' from previuos run found,' // & 1135 '& but this file cannot be extended due to' // & 1136 ' variable mismatch.' // & 1137 '&New file is created instead.' 1138 CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 ) 1138 1139 extend = .FALSE. 1139 1140 RETURN … … 1163 1164 1164 1165 IF ( ns /= ns_old ) THEN 1165 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1166 TRIM( var ) // ' from previuos run found,' 1167 PRINT*, ' but this file cannot be extended due to' // & 1168 ' mismatch in number of' 1169 PRINT*, ' cross sections.' 1170 PRINT*, ' New file is created instead.' 1166 message_string = 'NetCDF file for cross-sections ' // & 1167 TRIM( var ) // ' from previuos run found,' // & 1168 '&but this file cannot be extended due to' // & 1169 ' mismatch in number of' // & 1170 '&cross sections.' // & 1171 '&New file is created instead.' 1172 CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 ) 1171 1173 extend = .FALSE. 1172 1174 RETURN … … 1183 1185 IF ( section(i,1) /= -1 ) THEN 1184 1186 IF ( zu(section(i,1)) /= netcdf_data(i) ) THEN 1185 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1186 TRIM( var ) // ' from previuos run found,' 1187 PRINT*, ' but this file cannot be extended' // & 1188 ' due to mismatch in cross' 1189 PRINT*, ' section levels.' 1190 PRINT*, ' New file is created instead.' 1187 message_string = 'NetCDF file for cross-sections ' // & 1188 TRIM( var ) // ' from previuos run found,' // & 1189 '&but this file cannot be extended' // & 1190 ' due to mismatch in cross' // & 1191 '§ion levels.' // & 1192 '&New file is created instead.' 1193 CALL message( 'define_netcdf_header', 'PA0251', 0, 1, 0, 6, 0 ) 1191 1194 extend = .FALSE. 1192 1195 RETURN … … 1194 1197 ELSE 1195 1198 IF ( -1.0 /= netcdf_data(i) ) THEN 1196 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1197 TRIM( var ) // ' from previuos run found,' 1198 PRINT*, ' but this file cannot be extended' // & 1199 ' due to mismatch in cross' 1200 PRINT*, ' section levels.' 1201 PRINT*, ' New file is created instead.' 1199 message_string = 'NetCDF file for cross-sections ' // & 1200 TRIM( var ) // ' from previuos run found,' // & 1201 '&but this file cannot be extended' // & 1202 ' due to mismatch in cross' // & 1203 '§ion levels.' // & 1204 '&New file is created instead.' 1205 CALL message( 'define_netcdf_header', 'PA0251', 0, 1, 0, 6, 0 ) 1202 1206 extend = .FALSE. 1203 1207 RETURN … … 1232 1236 1233 1237 IF ( last_time_coordinate(1) >= simulated_time ) THEN 1234 PRINT*, '+++ WARNING: NetCDF file for cross sections ' // & 1235 TRIM( var ) // ' from previuos run found,' 1236 PRINT*, ' but this file cannot be extended becaus' // & 1237 'e the current output time' 1238 PRINT*, ' is less or equal than the last output t' // & 1239 'ime on this file.' 1240 PRINT*, ' New file is created instead.' 1238 message_string = 'NetCDF file for cross sections ' // & 1239 TRIM( var ) // ' from previuos run found,' // & 1240 '&but this file cannot be extended becaus' // & 1241 'e the current output time' // & 1242 '&is less or equal than the last output t' // & 1243 'ime on this file.' // & 1244 '&New file is created instead.' 1245 CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 ) 1241 1246 do2d_xy_time_count(av) = 0 1242 1247 extend = .FALSE. … … 1264 1269 TRIM( run_description_header ) ) 1265 1270 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 139 ) 1266 PRINT*, '*** NetCDF file for cross-sections ' // TRIM( var ) // & 1267 ' from previous run found.' 1268 PRINT*, ' This file will be extended.' 1269 1271 message_string = 'NetCDF file for cross-sections ' // & 1272 TRIM( var ) // ' from previous run found.' // & 1273 '&This file will be extended.' 1274 CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 ) 1275 1270 1276 1271 1277 CASE ( 'xz_new' ) … … 1489 1495 1490 1496 IF ( .NOT. found ) THEN 1491 PRINT*, '+++ define_netcdf_header: no grid defined for', & 1492 ' variable ', do2d(av,i) 1497 WRITE ( message_string, * ) 'no grid defined for', & 1498 ' variable ', TRIM( do2d(av,i) ) 1499 CALL message( 'define_netcdf_header', 'PA0244', 0, 1, 0, 6, 0 ) 1493 1500 ENDIF 1494 1501 … … 1642 1649 1643 1650 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 1644 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1645 TRIM( var ) // ' from previuos run found,' 1646 PRINT*, ' but this file cannot be extended due to' // & 1647 ' variable mismatch.' 1648 PRINT*, ' New file is created instead.' 1651 message_string = 'NetCDF file for cross-sections ' // & 1652 TRIM( var ) // ' from previuos run found,' // & 1653 '& but this file cannot be extended due to' // & 1654 ' variable mismatch.' // & 1655 '&New file is created instead.' 1656 CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 ) 1649 1657 extend = .FALSE. 1650 1658 RETURN … … 1674 1682 1675 1683 IF ( ns /= ns_old ) THEN 1676 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1677 TRIM( var ) // ' from previuos run found,' 1678 PRINT*, ' but this file cannot be extended due to' // & 1679 ' mismatch in number of' 1680 PRINT*, ' cross sections.' 1681 PRINT*, ' New file is created instead.' 1684 message_string = 'NetCDF file for cross-sections ' // & 1685 TRIM( var ) // ' from previuos run found,' // & 1686 '&but this file cannot be extended due to' // & 1687 ' mismatch in number of' // & 1688 '&cross sections.' // & 1689 '&New file is created instead.' 1690 CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 ) 1682 1691 extend = .FALSE. 1683 1692 RETURN … … 1694 1703 IF ( section(i,2) /= -1 ) THEN 1695 1704 IF ( ( section(i,2) * dy ) /= netcdf_data(i) ) THEN 1696 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1697 TRIM( var ) // ' from previuos run found,' 1698 PRINT*, ' but this file cannot be extended' // & 1699 ' due to mismatch in cross' 1700 PRINT*, ' section indices.' 1701 PRINT*, ' New file is created instead.' 1705 message_string = 'NetCDF file for cross-sections ' // & 1706 TRIM( var ) // ' from previuos run found,' // & 1707 '&but this file cannot be extended' // & 1708 ' due to mismatch in cross' // & 1709 '§ion levels.' // & 1710 '&New file is created instead.' 1711 CALL message( 'define_netcdf_header', 'PA0251', 0, 1, 0, 6, 0 ) 1702 1712 extend = .FALSE. 1703 1713 RETURN … … 1705 1715 ELSE 1706 1716 IF ( -1.0 /= netcdf_data(i) ) THEN 1707 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 1708 TRIM( var ) // ' from previuos run found,' 1709 PRINT*, ' but this file cannot be extended' // & 1710 ' due to mismatch in cross' 1711 PRINT*, ' section indices.' 1712 PRINT*, ' New file is created instead.' 1717 message_string = 'NetCDF file for cross-sections ' // & 1718 TRIM( var ) // ' from previuos run found,' // & 1719 '&but this file cannot be extended' // & 1720 ' due to mismatch in cross' // & 1721 '§ion levels.' // & 1722 '&New file is created instead.' 1723 CALL message( 'define_netcdf_header', 'PA0251', 0, 1, 0, 6, 0 ) 1713 1724 extend = .FALSE. 1714 1725 RETURN … … 1743 1754 1744 1755 IF ( last_time_coordinate(1) >= simulated_time ) THEN 1745 PRINT*, '+++ WARNING: NetCDF file for cross sections ' // & 1746 TRIM( var ) // ' from previuos run found,' 1747 PRINT*, ' but this file cannot be extended becaus' // & 1748 'e the current output time' 1749 PRINT*, ' is less or equal than the last output t' // & 1750 'ime on this file.' 1751 PRINT*, ' New file is created instead.' 1756 message_string = 'NetCDF file for cross sections ' // & 1757 TRIM( var ) // ' from previuos run found,' // & 1758 '&but this file cannot be extended becaus' // & 1759 'e the current output time' // & 1760 '&is less or equal than the last output t' // & 1761 'ime on this file.' // & 1762 '&New file is created instead.' 1763 CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 ) 1752 1764 do2d_xz_time_count(av) = 0 1753 1765 extend = .FALSE. … … 1775 1787 TRIM( run_description_header ) ) 1776 1788 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 178 ) 1777 PRINT*, '*** NetCDF file for cross-sections ' // TRIM( var ) // & 1778 ' from previous run found.' 1779 PRINT*, ' This file will be extended.' 1789 message_string = 'NetCDF file for cross-sections ' // & 1790 TRIM( var ) // ' from previous run found.' // & 1791 '&This file will be extended.' 1792 CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 ) 1780 1793 1781 1794 … … 2000 2013 2001 2014 IF ( .NOT. found ) THEN 2002 PRINT*, '+++ define_netcdf_header: no grid defined for', & 2003 ' variable ', do2d(av,i) 2015 WRITE ( message_string, * ) 'no grid defined for', & 2016 ' variable ', TRIM( do2d(av,i) ) 2017 CALL message( 'define_netcdf_header', 'PA0244', 0, 1, 0, 6, 0 ) 2004 2018 ENDIF 2005 2019 … … 2152 2166 2153 2167 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 2154 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 2155 TRIM( var ) // ' from previuos run found,' 2156 PRINT*, ' but this file cannot be extended due to' // & 2157 ' variable mismatch.' 2158 PRINT*, ' New file is created instead.' 2168 message_string = 'NetCDF file for cross-sections ' // & 2169 TRIM( var ) // ' from previuos run found,' // & 2170 '& but this file cannot be extended due to' // & 2171 ' variable mismatch.' // & 2172 '&New file is created instead.' 2173 CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 ) 2159 2174 extend = .FALSE. 2160 2175 RETURN … … 2184 2199 2185 2200 IF ( ns /= ns_old ) THEN 2186 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 2187 TRIM( var ) // ' from previuos run found,' 2188 PRINT*, ' but this file cannot be extended due to' // & 2189 ' mismatch in number of' 2190 PRINT*, ' cross sections.' 2191 PRINT*, ' New file is created instead.' 2201 message_string = 'NetCDF file for cross-sections ' // & 2202 TRIM( var ) // ' from previuos run found,' // & 2203 '&but this file cannot be extended due to' // & 2204 ' mismatch in number of' // & 2205 '&cross sections.' // & 2206 '&New file is created instead.' 2207 CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 ) 2192 2208 extend = .FALSE. 2193 2209 RETURN … … 2204 2220 IF ( section(i,3) /= -1 ) THEN 2205 2221 IF ( ( section(i,3) * dx ) /= netcdf_data(i) ) THEN 2206 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 2207 TRIM( var ) // ' from previuos run found,' 2208 PRINT*, ' but this file cannot be extended' // & 2209 ' due to mismatch in cross' 2210 PRINT*, ' section indices.' 2211 PRINT*, ' New file is created instead.' 2222 message_string = 'NetCDF file for cross-sections ' // & 2223 TRIM( var ) // ' from previuos run found,' // & 2224 '&but this file cannot be extended' // & 2225 ' due to mismatch in cross' // & 2226 '§ion levels.' // & 2227 '&New file is created instead.' 2228 CALL message( 'define_netcdf_header', 'PA0251', 0, 1, 0, 6, 0 ) 2212 2229 extend = .FALSE. 2213 2230 RETURN … … 2215 2232 ELSE 2216 2233 IF ( -1.0 /= netcdf_data(i) ) THEN 2217 PRINT*, '+++ WARNING: NetCDF file for cross-sections ' // & 2218 TRIM( var ) // ' from previuos run found,' 2219 PRINT*, ' but this file cannot be extended' // & 2220 ' due to mismatch in cross' 2221 PRINT*, ' section indices.' 2222 PRINT*, ' New file is created instead.' 2234 message_string = 'NetCDF file for cross-sections ' // & 2235 TRIM( var ) // ' from previuos run found,' // & 2236 '&but this file cannot be extended' // & 2237 ' due to mismatch in cross' // & 2238 '§ion levels.' // & 2239 '&New file is created instead.' 2240 CALL message( 'define_netcdf_header', 'PA0251', 0, 1, 0, 6, 0 ) 2223 2241 extend = .FALSE. 2224 2242 RETURN … … 2253 2271 2254 2272 IF ( last_time_coordinate(1) >= simulated_time ) THEN 2255 PRINT*, '+++ WARNING: NetCDF file for cross sections ' // & 2256 TRIM( var ) // ' from previuos run found,' 2257 PRINT*, ' but this file cannot be extended becaus' // & 2258 'e the current output time' 2259 PRINT*, ' is less or equal than the last output t' // & 2260 'ime on this file.' 2261 PRINT*, ' New file is created instead.' 2273 message_string = 'NetCDF file for cross sections ' // & 2274 TRIM( var ) // ' from previuos run found,' // & 2275 '&but this file cannot be extended becaus' // & 2276 'e the current output time' // & 2277 '&is less or equal than the last output t' // & 2278 'ime on this file.' // & 2279 '&New file is created instead.' 2280 CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 ) 2262 2281 do2d_yz_time_count(av) = 0 2263 2282 extend = .FALSE. … … 2285 2304 TRIM( run_description_header ) ) 2286 2305 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 217 ) 2287 PRINT*, '*** NetCDF file for cross-sections ' // TRIM( var ) // & 2288 ' from previous run found.' 2289 PRINT*, ' This file will be extended.' 2306 message_string = 'NetCDF file for cross-sections ' // & 2307 TRIM( var ) // ' from previous run found.' // & 2308 '&This file will be extended.' 2309 CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 ) 2290 2310 2291 2311 … … 2492 2512 2493 2513 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 2494 PRINT*, '+++ WARNING: NetCDF file for vertical profiles from' // & 2495 ' previuos run found,' 2496 PRINT*, ' but this file cannot be extended due to' // & 2497 ' variable mismatch.' 2498 PRINT*, ' New file is created instead.' 2514 message_string = 'NetCDF file for vertical profiles ' // & 2515 'from previuos run found,' // & 2516 '& but this file cannot be extended due to' // & 2517 ' variable mismatch.' // & 2518 '&New file is created instead.' 2519 CALL message( 'define_netcdf_header', 'PA0254', 0, 1, 0, 6, 0 ) 2499 2520 extend = .FALSE. 2500 2521 RETURN … … 2525 2546 2526 2547 IF ( last_time_coordinate(1) >= simulated_time ) THEN 2527 PRINT*, '+++ WARNING: NetCDF file for vertical profiles from' // & 2528 ' previuos run found,' 2529 PRINT*, ' but this file cannot be extended becaus' // & 2530 'e the current output time' 2531 PRINT*, ' is less or equal than the last output t' // & 2532 'ime on this file.' 2533 PRINT*, ' New file is created instead.' 2548 message_string = 'NetCDF file for vertical profiles ' // & 2549 'from previuos run found,' // & 2550 '&but this file cannot be extended becaus' // & 2551 'e the current output time' // & 2552 '&is less or equal than the last output t' // & 2553 'ime on this file.' // & 2554 '&New file is created instead.' 2555 CALL message( 'define_netcdf_header', 'PA0255', 0, 1, 0, 6, 0 ) 2534 2556 dopr_time_count = 0 2535 2557 extend = .FALSE. … … 2576 2598 TRIM( run_description_header ) ) 2577 2599 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 248 ) 2578 PRINT*, '*** NetCDF file for vertical profiles from previous run' // & 2579 ' found.' 2580 PRINT*, ' This file will be extended.' 2600 message_string = 'NetCDF file for vertical profiles ' // & 2601 'from previous run found.' // & 2602 '&This file will be extended.' 2603 CALL message( 'define_netcdf_header', 'PA0256', 0, 0, 0, 6, 0 ) 2581 2604 2582 2605 … … 2700 2723 2701 2724 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 2702 PRINT*, '+++ WARNING: NetCDF file for time series from' //& 2703 ' previuos run found,' 2704 PRINT*, ' but this file cannot be extended due to' // & 2705 ' variable mismatch.' 2706 PRINT*, ' New file is created instead.' 2725 message_string = 'NetCDF file for time series ' // & 2726 'from previuos run found,' // & 2727 '& but this file cannot be extended due to' // & 2728 ' variable mismatch.' // & 2729 '&New file is created instead.' 2730 CALL message( 'define_netcdf_header', 'PA0257', 0, 1, 0, 6, 0 ) 2707 2731 extend = .FALSE. 2708 2732 RETURN … … 2733 2757 2734 2758 IF ( last_time_coordinate(1) >= simulated_time ) THEN 2735 PRINT*, '+++ WARNING: NetCDF file for time series from' // & 2736 ' previuos run found,' 2737 PRINT*, ' but this file cannot be extended becaus' // & 2738 'e the current output time' 2739 PRINT*, ' is less or equal than the last output t' // & 2740 'ime on this file.' 2741 PRINT*, ' New file is created instead.' 2759 message_string = 'NetCDF file for time series ' // & 2760 'from previuos run found,' // & 2761 '&but this file cannot be extended becaus' // & 2762 'e the current output time' // & 2763 '&is less or equal than the last output t' // & 2764 'ime on this file.' // & 2765 '&New file is created instead.' 2766 CALL message( 'define_netcdf_header', 'PA0258', 0, 1, 0, 6, 0 ) 2742 2767 dots_time_count = 0 2743 2768 extend = .FALSE. … … 2775 2800 TRIM( run_description_header ) ) 2776 2801 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 267 ) 2777 PRINT*, '*** NetCDF file for time series from previous run found.' 2778 PRINT*, ' This file will be extended.' 2802 message_string = 'NetCDF file for time series ' // & 2803 'from previous run found.' // & 2804 '&This file will be extended.' 2805 CALL message( 'define_netcdf_header', 'PA0259', 0, 0, 0, 6, 0 ) 2779 2806 2780 2807 … … 3053 3080 3054 3081 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 3055 PRINT*, '+++ WARNING: NetCDF file for spectra from previous ' //& 3056 'run found,' 3057 PRINT*, ' but this file cannot be extended due to' // & 3058 ' variable mismatch.' 3059 PRINT*, ' New file is created instead.' 3082 message_string = 'NetCDF file for spectra ' // & 3083 'from previuos run found,' // & 3084 '& but this file cannot be extended due to' // & 3085 ' variable mismatch.' // & 3086 '&New file is created instead.' 3087 CALL message( 'define_netcdf_header', 'PA0260', 0, 1, 0, 6, 0 ) 3060 3088 extend = .FALSE. 3061 3089 RETURN … … 3086 3114 3087 3115 IF ( ns /= ns_old ) THEN 3088 PRINT*, '+++ WARNING: NetCDF file for spectra from previous ' //& 3089 'run found,' 3090 PRINT*, ' but this file cannot be extended due to' // & 3091 ' mismatch in number of' 3092 PRINT*, ' vertical levels.' 3093 PRINT*, ' New file is created instead.' 3116 message_string = 'NetCDF file for spectra ' // & 3117 ' from previuos run found,' // & 3118 '&but this file cannot be extended due to' // & 3119 ' mismatch in number of' // & 3120 '&vertical levels.' // & 3121 '&New file is created instead.' 3122 CALL message( 'define_netcdf_header', 'PA0261', 0, 1, 0, 6, 0 ) 3094 3123 extend = .FALSE. 3095 3124 RETURN … … 3105 3134 DO i = 1, ns 3106 3135 IF ( zu(comp_spectra_level(i)) /= netcdf_data(i) ) THEN 3107 PRINT*, '+++ WARNING: NetCDF file for spectra from previou' // & 3108 's run found,' 3109 PRINT*, ' but this file cannot be extended due' // & 3110 ' to mismatch in heights' 3111 PRINT*, ' of vertical levels.' 3112 PRINT*, ' New file is created instead.' 3136 message_string = 'NetCDF file for spectra ' // & 3137 ' from previuos run found,' // & 3138 '&but this file cannot be extended due to' // & 3139 ' mismatch in heights of' // & 3140 '&vertical levels.' // & 3141 '&New file is created instead.' 3142 CALL message( 'define_netcdf_header', 'PA0262', 0, 1, 0, 6, 0 ) 3113 3143 extend = .FALSE. 3114 3144 RETURN … … 3142 3172 3143 3173 IF ( last_time_coordinate(1) >= simulated_time ) THEN 3144 PRINT*, '+++ WARNING: NetCDF file for spectra from previous ' // & 3145 'run found,' 3146 PRINT*, ' but this file cannot be extended becaus' // & 3147 'e the current output time' 3148 PRINT*, ' is less or equal than the last output t' // & 3149 'ime on this file.' 3150 PRINT*, ' New file is created instead.' 3174 message_string = 'NetCDF file for spectra ' // & 3175 'from previuos run found,' // & 3176 '&but this file cannot be extended becaus' // & 3177 'e the current output time' // & 3178 '&is less or equal than the last output t' // & 3179 'ime on this file.' // & 3180 '&New file is created instead.' 3181 CALL message( 'define_netcdf_header', 'PA0263', 0, 1, 0, 6, 0 ) 3151 3182 dosp_time_count = 0 3152 3183 extend = .FALSE. … … 3196 3227 ENDIF 3197 3228 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 309 ) 3198 3199 PRINT*, '*** NetCDF file for spectra from previous run found.' 3200 PRINT*, ' This file will be extended.' 3229 message_string = 'NetCDF file for spectra ' // & 3230 'from previous run found.' // & 3231 '&This file will be extended.' 3232 CALL message( 'define_netcdf_header', 'PA0264', 0, 0, 0, 6, 0 ) 3201 3233 3202 3234 … … 3299 3331 3300 3332 IF ( last_time_coordinate(1) >= simulated_time ) THEN 3301 PRINT*, '+++ WARNING: NetCDF file for particles from previous ' //& 3302 'run found,' 3303 PRINT*, ' but this file cannot be extended becaus' // & 3304 'e the current output time' 3305 PRINT*, ' is less or equal than the last output t' // & 3306 'ime on this file.' 3307 PRINT*, ' New file is created instead.' 3333 message_string = 'NetCDF file for particles ' // & 3334 'from previuos run found,' // & 3335 '&but this file cannot be extended becaus' // & 3336 'e the current output time' // & 3337 '&is less or equal than the last output t' // & 3338 'ime on this file.' // & 3339 '&New file is created instead.' 3340 CALL message( 'define_netcdf_header', 'PA0265', 0, 1, 0, 6, 0 ) 3308 3341 prt_time_count = 0 3309 3342 extend = .FALSE. … … 3326 3359 ENDDO 3327 3360 3328 IF ( myid == 0 ) THEN 3329 PRINT*, '*** NetCDF file for particles from previous run found.' 3330 PRINT*, ' This file will be extended.' 3331 ENDIF 3361 message_string = 'NetCDF file for particles ' // & 3362 'from previous run found.' // & 3363 '&This file will be extended.' 3364 CALL message( 'define_netcdf_header', 'PA0266', 0, 0, 0, 6, 0 ) 3365 3332 3366 3333 3367 … … 3454 3488 3455 3489 IF ( TRIM( var_list ) /= TRIM( var_list_old ) ) THEN 3456 PRINT*, '+++ WARNING: NetCDF file for particle time series ' //& 3457 'from previuos run found,' 3458 PRINT*, ' but this file cannot be extended due to' // & 3459 ' variable mismatch.' 3460 PRINT*, ' New file is created instead.' 3490 message_string = 'NetCDF file for particle time series ' // & 3491 'from previuos run found,' // & 3492 '& but this file cannot be extended due to' // & 3493 ' variable mismatch.' // & 3494 '&New file is created instead.' 3495 CALL message( 'define_netcdf_header', 'PA0267', 0, 1, 0, 6, 0 ) 3461 3496 extend = .FALSE. 3462 3497 RETURN … … 3487 3522 3488 3523 IF ( last_time_coordinate(1) >= simulated_time ) THEN 3489 PRINT*, '+++ WARNING: NetCDF file for time series from' // & 3490 ' previuos run found,' 3491 PRINT*, ' but this file cannot be extended becaus' // & 3492 'e the current output time' 3493 PRINT*, ' is less or equal than the last output t' // & 3494 'ime on this file.' 3495 PRINT*, ' New file is created instead.' 3524 message_string = 'NetCDF file for particle time series ' // & 3525 'from previuos run found,' // & 3526 '&but this file cannot be extended becaus' // & 3527 'e the current output time' // & 3528 '&is less or equal than the last output t' // & 3529 'ime on this file.' // & 3530 '&New file is created instead.' 3531 CALL message( 'define_netcdf_header', 'PA0268', 0, 1, 0, 6, 0 ) 3496 3532 dopts_time_count = 0 3497 3533 extend = .FALSE. … … 3533 3569 TRIM( run_description_header ) ) 3534 3570 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 411 ) 3535 PRINT*, '*** NetCDF file for particle time series from previous ', & 3536 'run found.' 3537 PRINT*, ' This file will be extended.' 3571 message_string = 'NetCDF file for particle time series ' // & 3572 'from previous run found.' // & 3573 '&This file will be extended.' 3574 CALL message( 'define_netcdf_header', 'PA0269', 0, 0, 0, 6, 0 ) 3538 3575 3539 3576 3540 3577 CASE DEFAULT 3541 3578 3542 PRINT*, '+++ define_netcdf_header: mode "', mode, '" not supported' 3579 message_string = 'mode "' // TRIM( mode) // '" not supported' 3580 CALL message( 'define_netcdf_header', 'PA0270', 0, 0, 0, 6, 0 ) 3543 3581 3544 3582 END SELECT -
palm/trunk/SOURCE/parin.f90
r256 r257 2 2 3 3 !------------------------------------------------------------------------------! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! Output of messages replaced by message handling routine. 6 7 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 7 8 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, … … 176 177 READ ( 11, inipar, ERR=10, END=11 ) 177 178 GOTO 12 178 10 IF ( myid == 0 ) THEN 179 PRINT*, '+++ parin: errors in \$inipar' 180 PRINT*, ' or no \$inipar-namelist found (CRAY-machines only)' 181 ENDIF 182 CALL local_stop 183 11 IF ( myid == 0 ) THEN 184 PRINT*, '+++ parin: no \$inipar-namelist found' 185 ENDIF 186 CALL local_stop 179 10 message_string = 'errors in \$inipar &or no \$inipar-namelist found (CRAY-machines only)' 180 CALL message( 'parin', 'PA0271', 1, 2, 0, 6, 0 ) 181 182 11 message_string = 'no \$inipar-namelist found' 183 CALL message( 'parin', 'PA0272', 1, 2, 0, 6, 0 ) 187 184 188 185 ! … … 230 227 231 228 IF ( nx <= 0 ) THEN 232 IF ( myid == 0 ) THEN 233 PRINT*, '+++ parin: no value or wrong value given for nx: nx=', nx 234 ENDIF 235 CALL local_stop 229 WRITE( message_string, * ) 'no value or wrong value given for nx: nx=', nx 230 CALL message( 'parin', 'PA0273', 1, 2, 0, 6, 0 ) 236 231 ENDIF 237 232 IF ( ny <= 0 ) THEN 238 IF ( myid == 0 ) THEN 239 PRINT*, '+++ parin: no value or wrong value given for ny: ny=', ny 240 ENDIF 241 CALL local_stop 233 WRITE( message_string, * ) 'no value or wrong value given for ny: ny=', ny 234 CALL message( 'parin', 'PA0274', 1, 2, 0, 6, 0 ) 242 235 ENDIF 243 236 IF ( nz <= 0 ) THEN 244 IF ( myid == 0 ) THEN 245 PRINT*, '+++ parin: no value or wrong value given for nz: nz=', nz 246 ENDIF 247 CALL local_stop 237 WRITE( message_string, * ) 'no value or wrong value given for nz: nz=', nz 238 CALL message( 'parin', 'PA0275', 1, 2, 0, 6, 0 ) 248 239 ENDIF 249 240 ! … … 270 261 RETURN 271 262 272 30 IF ( myid == 0 ) THEN 273 PRINT*, '+++ parin: WARNING: local file ENVPAR not found' 274 PRINT*, ' some variables for steering may not be properly set' 275 ENDIF 263 30 message_string = 'local file ENVPAR not found' // & 264 '&some variables for steering may not be properly set' 265 CALL message( 'parin', 'PA0276', 0, 1, 0, 6, 0 ) 276 266 RETURN 277 267 278 31 IF ( myid == 0 ) THEN 279 PRINT*, '+++ parin: WARNING: errors in local file ENVPAR' 280 PRINT*, ' some variables for steering may not be properly set' 281 ENDIF 268 31 message_string = 'errors in local file ENVPAR' // & 269 '&some variables for steering may not be properly set' 270 CALL message( 'parin', 'PA0277', 0, 1, 0, 6, 0 ) 282 271 RETURN 283 272 284 32 IF ( myid == 0 ) THEN 285 PRINT*, '+++ parin: WARNING: no envpar-NAMELIST found in local file ', & 286 'ENVPAR' 287 PRINT*, ' some variables for steering may not be properly set' 288 ENDIF 273 32 message_string = 'no envpar-NAMELIST found in local file ENVPAR' // & 274 '&some variables for steering may not be properly set' 275 CALL message( 'parin', 'PA0278', 0, 1, 0, 6, 0 ) 289 276 290 277 END SUBROUTINE parin -
palm/trunk/SOURCE/plant_canopy_model.f90
r198 r257 2 2 3 3 !------------------------------------------------------------------------------! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! Output of messages replaced by message handling routine. 7 ! 7 8 ! 8 9 ! Bugfix: remove IF statement in plant_canopy_model_ij … … 187 188 CASE DEFAULT 188 189 189 IF ( myid == 0 ) PRINT*,'+++ pcm: wrong component: ', & 190 component 191 CALL local_stop 190 WRITE( message_string, * ) 'wrong component: ', component 191 CALL message( 'plant_canopy_model', 'PA0279', 1, 2, 0, 6, 0 ) 192 192 193 193 END SELECT … … 324 324 CASE DEFAULT 325 325 326 IF ( myid == 0 ) PRINT*,'+++ pcm: wrong component: ', & 327 component 328 CALL local_stop 326 WRITE( message_string, * ) 'wrong component: ', component 327 CALL message( 'plant_canopy_model', 'PA0279', 1, 2, 0, 6, 0 ) 329 328 330 329 END SELECT -
palm/trunk/SOURCE/poisfft_hybrid.f90
r4 r257 2 2 !------------------------------------------------------------------------------ 3 3 ! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! Output of messages replaced by message handling routine. 7 ! 7 8 ! 8 9 ! Former revisions: … … 145 146 CALL LOCAL_GETENV( 'OMP_NUM_THREADS', 15, cdummy, idummy ) 146 147 READ ( cdummy, '(I8)' ) n_omp_threads 147 IF ( myid == 0 .AND. n_omp_threads > 1 ) THEN 148 PRINT*, '*** poisfft_hybrid_ini: Number of OpenMP threads = ', & 149 n_omp_threads 148 IF ( n_omp_threads > 1 ) THEN 149 WRITE( message_string, * ) 'Number of OpenMP threads = ', & 150 n_omp_threads 151 CALL message( 'poisfft_hybrid_ini', 'PA0280', 0, 0, 0, 6, 0 ) 150 152 ENDIF 151 153 #else … … 175 177 ENDIF 176 178 177 IF ( myid == 0 .AND. tasks_per_logical_node > -1 ) THEN 178 PRINT*, '*** poisfft_hybrid_ini: running optimized ', & 179 'multinode version' 180 PRINT*, ' switch_per_lpar = ', switch_per_lpar 181 PRINT*, ' tasks_per_lpar = ', tasks_per_node 182 PRINT*, ' tasks_per_logical_node = ', & 183 tasks_per_logical_node 179 IF ( tasks_per_logical_node > -1 ) THEN 180 181 WRITE( message_string, * ) 'running optimized ', & 182 'multinode version', & 183 '&switch_per_lpar = ', & 184 switch_per_lpar, & 185 '&tasks_per_lpar = ', & 186 tasks_per_node, & 187 'tasks_per_logical_node = ', & 188 tasks_per_logical_node 189 CALL message( 'poisfft_hybrid_ini', 'PA0281', 0, 0, 0, 6, 0 ) 190 184 191 ENDIF 185 192 … … 215 222 ! tasks_per_logical_node 216 223 #else 217 PRINT*, '+++ poisfft_hybrid_ini:parallel environment (MPI) required'218 CALL local_stop224 message_string = 'parallel environment (MPI) required' 225 CALL message( 'poisfft_hybrid_ini', 'PA0282', 1, 2, 0, 6, 0 ) 219 226 #endif 220 227 ENDIF -
palm/trunk/SOURCE/poismg.f90
r198 r257 6 6 ! is required. 7 7 ! 8 ! Actualrevisions:8 ! Current revisions: 9 9 ! ----------------- 10 ! 10 ! Output of messages replaced by message handling routine. 11 ! 11 12 ! 12 13 ! Former revisions: … … 117 118 !-- of insufficient convergence 118 119 IF ( mgcycles > 1000 .AND. mg_cycles == -1 ) THEN 119 IF ( myid == 0 ) THEN 120 PRINT*, '+++ poismg: no sufficient convergence within 1000 cycles' 121 ENDIF 122 CALL local_stop 120 message_string = 'no sufficient convergence within 1000 cycles' 121 CALL message( 'poismg', 'PA0283', 1, 2, 0, 6, 0 ) 123 122 ENDIF 124 123 -
palm/trunk/SOURCE/read_3d_binary.f90
r226 r257 2 2 3 3 !------------------------------------------------------------------------------! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! Output of messages replaced by message handling routine. 7 ! 7 8 ! 8 9 ! Former revisions: … … 138 139 ! 139 140 !-- Array bound exceeded 140 PRINT*, '+++ read_3d_binary: data from subdomain of previous', & 141 ' run mapped more than 1000 times' 142 #if defined( __parallel ) 143 CALL MPI_ABORT( comm2d, 9999, ierr ) 144 #else 145 STOP 146 #endif 141 message_string = 'data from subdomain of previous' // & 142 ' run mapped more than 1000 times' 143 CALL message( 'read_3d_binary', 'PA0284', 2, 2, 0, 6, 0 ) 144 147 145 ENDIF 148 146 … … 206 204 IF ( files_to_be_opened /= 1 .OR. numprocs /= numprocs_previous_run ) & 207 205 THEN 208 PRINT*, '*** number of PEs or virtual PE-grid changed in restart run' 209 PRINT*, ' PE', myid, ' will read from files ', & 210 file_list(1:files_to_be_opened) 206 WRITE( message_string, * ) 'number of PEs or virtual PE-grid changed in ', & 207 'restart run& PE', myid, ' will read from files ', & 208 file_list(1:files_to_be_opened) 209 CALL message( 'read_3d_binary', 'PA0285', 0, 0, 0, 6, 0 ) 211 210 ENDIF 212 211 … … 238 237 binary_version = '3.1' 239 238 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 240 IF ( myid == 0 ) THEN 241 PRINT*, '+++ init_3d_model: version mismatch concerning data ', & 242 'from prior run' 243 PRINT*, ' version on file = "', TRIM( version_on_file ),& 244 '"' 245 PRINT*, ' version in program = "', TRIM( binary_version ), & 246 '"' 247 ENDIF 248 CALL local_stop 239 WRITE( message_string, * ) 'version mismatch concerning data ', & 240 'from prior run', & 241 '&version on file = "', TRIM( version_on_file ), '"',& 242 '&version in program = "', TRIM( binary_version ), '"' 243 CALL message( 'read_3d_binary', 'PA0286', 1, 2, 0, 6, 0 ) 249 244 ENDIF 250 245 … … 256 251 257 252 IF ( nxl_on_file /= hor_index_bounds_previous_run(1,j) ) THEN 258 PRINT*, '+++ read_3d_binary: problem with index bound nxl on ', & 259 ' restart file "', myid_char, '"' 260 PRINT*, ' nxl = ', nxl_on_file, ' but it should be' 261 PRINT*, ' = ', hor_index_bounds_previous_run(1,j) 262 PRINT*, ' from the index bound information array' 263 #if defined( __parallel ) 264 CALL MPI_ABORT( comm2d, 9999, ierr ) 265 #else 266 CALL local_stop 267 #endif 253 WRITE( message_string, * ) 'problem with index bound nxl on ', & 254 'restart file "', myid_char, '"', & 255 '&nxl = ', nxl_on_file, ' but it should be', & 256 '&= ', hor_index_bounds_previous_run(1,j), & 257 '&from the index bound information array' 258 CALL message( 'read_3d_binary', 'PA0287', 2, 2, 0, 6, 0 ) 268 259 ENDIF 269 260 270 261 IF ( nxr_on_file /= hor_index_bounds_previous_run(2,j) ) THEN 271 PRINT*, '+++ read_3d_binary: problem with index bound nxr on ', & 272 ' restart file "', myid_char, '"' 273 PRINT*, ' nxr = ', nxr_on_file, ' but it should be' 274 PRINT*, ' = ', hor_index_bounds_previous_run(2,j) 275 PRINT*, ' from the index bound information array' 276 #if defined( __parallel ) 277 CALL MPI_ABORT( comm2d, 9999, ierr ) 278 #else 279 CALL local_stop 280 #endif 262 WRITE( message_string, * ) 'problem with index bound nxr on ', & 263 'restart file "', myid_char, '"' , & 264 '&nxr = ', nxr_on_file, ' but it should be', & 265 '&= ', hor_index_bounds_previous_run(2,j), & 266 '&from the index bound information array' 267 CALL message( 'read_3d_binary', 'PA0288', 2, 2, 0, 6, 0 ) 268 281 269 ENDIF 282 270 283 271 IF ( nys_on_file /= hor_index_bounds_previous_run(3,j) ) THEN 284 PRINT*, '+++ read_3d_binary: problem with index bound nys on ', & 285 ' restart file "', myid_char, '"' 286 PRINT*, ' nys = ', nys_on_file, ' but it should be' 287 PRINT*, ' = ', hor_index_bounds_previous_run(3,j) 288 PRINT*, ' from the index bound information array' 289 #if defined( __parallel ) 290 CALL MPI_ABORT( comm2d, 9999, ierr ) 291 #else 292 CALL local_stop 293 #endif 272 WRITE( message_string, * ) 'problem with index bound nys on ', & 273 'restart file "', myid_char, '"', & 274 '&nys = ', nys_on_file, ' but it should be', & 275 '&= ', hor_index_bounds_previous_run(3,j), & 276 '&from the index bound information array' 277 CALL message( 'read_3d_binary', 'PA0289', 2, 2, 0, 6, 0 ) 294 278 ENDIF 295 279 296 280 IF ( nyn_on_file /= hor_index_bounds_previous_run(4,j) ) THEN 297 PRINT*, '+++ read_3d_binary: problem with index bound nyn on ', & 298 ' restart file "', myid_char, '"' 299 PRINT*, ' nyn = ', nyn_on_file, ' but it should be' 300 PRINT*, ' = ', hor_index_bounds_previous_run(4,j) 301 PRINT*, ' from the index bound information array' 302 #if defined( __parallel ) 303 CALL MPI_ABORT( comm2d, 9999, ierr ) 304 #else 305 CALL local_stop 306 #endif 281 WRITE( message_string, * ) 'problem with index bound nyn on ', & 282 'restart file "', myid_char, '"', & 283 '&nyn = ', nyn_on_file, ' but it should be', & 284 '&= ', hor_index_bounds_previous_run(4,j), & 285 '&from the index bound information array' 286 CALL message( 'read_3d_binary', 'PA0290', 2, 2, 0, 6, 0 ) 307 287 ENDIF 308 288 309 289 IF ( nzb_on_file /= nzb ) THEN 310 PRINT*, '+++ read_3d_binary: mismatch between actual data and data '311 PRINT*, ' from prior run on PE ', myid312 PRINT*, ' nzb on file = ', nzb_on_file313 PRINT*, 'nzb = ', nzb314 CALL local_stop290 WRITE( message_string, * ) 'mismatch between actual data and data ', & 291 '&from prior run on PE ', myid, & 292 '&nzb on file = ', nzb_on_file, & 293 '&nzb = ', nzb 294 CALL message( 'read_3d_binary', 'PA0291', 1, 2, 0, 6, 0 ) 315 295 ENDIF 316 296 317 297 IF ( nzt_on_file /= nzt ) THEN 318 PRINT*, '+++ read_3d_binary: mismatch between actual data and data '319 PRINT*, ' from prior run on PE ', myid320 PRINT*, ' nzt on file = ', nzt_on_file321 PRINT*, 'nzt = ', nzt322 CALL local_stop298 WRITE( message_string, * ) 'mismatch between actual data and data ', & 299 '&from prior run on PE ', myid, & 300 '&nzt on file = ', nzt_on_file, & 301 '&nzt = ', nzt 302 CALL message( 'read_3d_binary', 'PA0292', 1, 2, 0, 6, 0 ) 323 303 ENDIF 324 304 … … 634 614 IF ( k == 1 ) THEN 635 615 IF ( nx_on_file /= nx ) THEN 636 IF ( myid == 0 ) THEN 637 PRINT*, '+++ WARNING: read_3d_binary: spectrum_x', & 638 ' on restart file ignored because' 639 PRINT*, ' total numbers of grid points (nx) ', & 640 'do not match' 641 ENDIF 616 message_string = 'read_3d_binary: spectrum_x ' // & 617 'on restart file ignored because' // & 618 '&total numbers of grid points (nx) ' // & 619 'do not match' 620 CALL message( 'read_3d_binary', 'PA0293', 0, 1, 0, 6, 0 ) 642 621 READ ( 13 ) rdummy 643 622 ELSE … … 649 628 IF ( k == 1 ) THEN 650 629 IF ( ny_on_file /= ny ) THEN 651 IF ( myid == 0 ) THEN 652 PRINT*, '+++ WARNING: read_3d_binary: spectrum_y', & 653 ' on restart file ignored because' 654 PRINT*, ' total numbers of grid points (ny) ', & 655 'do not match' 656 ENDIF 630 message_string = 'read_3d_binary: spectrum_y ' // & 631 'on restart file ignored because' // & 632 '&total numbers of grid points (ny) '// & 633 'do not match' 634 CALL message( 'read_3d_binary', 'PA0294', 0, 1, 0, 6, 0 ) 657 635 READ ( 13 ) rdummy 658 636 ELSE … … 944 922 945 923 CASE DEFAULT 946 PRINT*, '+++ read_3d_binary:unknown field named "', &947 TRIM( field_chr ), '" found in'948 PRINT*, 'data from prior run on PE ',myid949 CALL local_stop950 924 WRITE( message_string, * ) 'unknown field named "', & 925 TRIM( field_chr ), '" found in', & 926 '&data from prior run on PE ',myid 927 CALL message( 'read_3d_binary', 'PA0295', 1, 2, 0, 6, 0 ) 928 951 929 END SELECT 952 930 -
palm/trunk/SOURCE/read_var_list.f90
r256 r257 2 2 3 3 !------------------------------------------------------------------------------! 4 ! Actualrevisions:4 ! Current revisions: 5 5 ! ----------------- 6 ! Output of messages replaced by message handling routine. 6 7 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 7 8 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, … … 84 85 binary_version = '3.4' 85 86 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 86 IF ( myid == 0 ) THEN 87 PRINT*, '+++ read_var_list: version mismatch concerning control', & 88 ' variables' 89 PRINT*, ' version on file = "', & 90 TRIM( version_on_file ), '"' 91 PRINT*, ' version on program = "', & 92 TRIM( binary_version ), '"' 93 ENDIF 94 CALL local_stop 87 WRITE( message_string, * ) 'version mismatch concerning control ', & 88 'variables', & 89 '&version on file = "', & 90 TRIM( version_on_file ), '"', & 91 '&version on program = "', & 92 TRIM( binary_version ), '"' 93 CALL message( 'read_var_list', 'PA0296', 1, 2, 0, 6, 0 ) 95 94 ENDIF 96 95 … … 100 99 READ ( 13 ) variable_chr 101 100 IF ( TRIM( variable_chr ) /= 'numprocs' ) THEN 102 PRINT*, '+++ read_var_list: numprocs not found in data from prior run', &103 'on PE ', myid104 CALL local_stop101 WRITE( message_string, * ) 'numprocs not found in data from prior run ', & 102 'on PE ', myid 103 CALL message( 'read_var_list', 'PA0297', 1, 2, 0, 6, 0 ) 105 104 ENDIF 106 105 READ ( 13 ) numprocs_previous_run … … 112 111 READ ( 13 ) variable_chr 113 112 IF ( TRIM( variable_chr ) /= 'hor_index_bounds' ) THEN 114 PRINT*, '+++ read_var_list:hor_index_bounds not found in data from ', &115 'prior run on PE ', myid116 CALL local_stop113 WRITE( message_string, * ) 'hor_index_bounds not found in data from ', & 114 'prior run on PE ', myid 115 CALL message( 'read_var_list', 'PA0298', 1, 2, 0, 6, 0 ) 117 116 ENDIF 118 117 READ ( 13 ) hor_index_bounds_previous_run … … 124 123 READ ( 13 ) variable_chr 125 124 IF ( TRIM( variable_chr ) /= 'nz' ) THEN 126 PRINT*, '+++ read_var_list:nz not found in data from prior run on PE ',&127 myid128 CALL local_stop125 WRITE( message_string, * ) 'nz not found in data from prior run on PE ',& 126 myid 127 CALL message( 'read_var_list', 'PA0299', 1, 2, 0, 6, 0 ) 129 128 ENDIF 130 129 READ ( 13 ) nz … … 132 131 READ ( 13 ) variable_chr 133 132 IF ( TRIM( variable_chr ) /= 'max_pr_user' ) THEN 134 PRINT*, '+++ read_var_list:max_pr_user not found in data from ', &133 WRITE( message_string, * ) 'max_pr_user not found in data from ', & 135 134 'prior run on PE ', myid 136 CALL local_stop135 CALL message( 'read_var_list', 'PA0300', 1, 2, 0, 6, 0 ) 137 136 ENDIF 138 137 READ ( 13 ) max_pr_user ! This value is checked against the number of … … 142 141 READ ( 13 ) variable_chr 143 142 IF ( TRIM( variable_chr ) /= 'statistic_regions' ) THEN 144 PRINT*, '+++ read_var_list:statistic_regions not found in data from ', &143 WRITE( message_string, * ) 'statistic_regions not found in data from ', & 145 144 'prior run on PE ', myid 146 CALL local_stop145 CALL message( 'read_var_list', 'PA0301', 1, 2, 0, 6, 0 ) 147 146 ENDIF 148 147 READ ( 13 ) statistic_regions … … 579 578 580 579 CASE DEFAULT 581 PRINT*, '+++ read_var_list: unknown variable named "',&582 TRIM( variable_chr ), '" found in'583 PRINT*, ' data from prior run on PE ', myid584 CALL local_stop580 WRITE( message_string, * ) 'unknown variable named "', & 581 TRIM( variable_chr ), '" found in', & 582 ' data from prior run on PE ', myid 583 CALL message( 'read_var_list', 'PA0302', 1, 2, 0, 6, 0 ) 585 584 END SELECT 586 585 ! … … 634 633 READ ( 13 ) variable_chr 635 634 IF ( TRIM( variable_chr ) /= 'numprocs' ) THEN 636 PRINT*, '+++ read_parts_of_var_list: numprocs not found in data from', &637 'prior runon PE ', myid638 CALL local_stop635 WRITE( message_string, * ) 'numprocs not found in data from prior run ', & 636 'on PE ', myid 637 CALL message( 'read_parts_of_var_list', 'PA0297', 1, 2, 0, 6, 0 ) 639 638 ENDIF 640 639 READ ( 13 ) numprocs_previous_run … … 646 645 READ ( 13 ) variable_chr 647 646 IF ( TRIM( variable_chr ) /= 'hor_index_bounds' ) THEN 648 PRINT*, '+++ read_parts_of_var_list: hor_index_bounds not found in da', &649 'ta fromprior run on PE ', myid650 CALL local_stop647 WRITE( message_string, * ) 'hor_index_bounds not found in data from ', & 648 'prior run on PE ', myid 649 CALL message( 'read_parts_of_var_list', 'PA0298', 1, 2, 0, 6, 0 ) 651 650 ENDIF 652 651 READ ( 13 ) hor_index_bounds_previous_run … … 658 657 READ ( 13 ) variable_chr 659 658 IF ( TRIM( variable_chr ) /= 'nz' ) THEN 660 PRINT*, '+++ read_parts_of_var_list:nz not found in restart data file'661 CALL local_stop659 message_string = 'nz not found in restart data file' 660 CALL message( 'read_parts_of_var_list', 'PA0303', 1, 2, 0, 6, 0 ) 662 661 ENDIF 663 662 READ ( 13 ) nz_on_file 664 663 IF ( nz_on_file /= nz ) THEN 665 IF ( myid == 0 ) THEN 666 PRINT*, '+++ read_parts_of_var_list: mismatch concerning number of', & 667 ' gridpoints along z' 668 PRINT*, ' nz on file = "', nz_on_file, '"' 669 PRINT*, ' nz from run = "', nz, '"' 670 ENDIF 671 CALL local_stop 664 WRITE( message_string, * ) 'mismatch concerning number of ', & 665 'gridpoints along z', & 666 '&nz on file = "', nz_on_file, '"', & 667 '&nz from run = "', nz, '"' 668 CALL message( 'read_parts_of_var_list', 'PA0304', 1, 2, 0, 6, 0 ) 672 669 ENDIF 673 670 674 671 READ ( 13 ) variable_chr 675 672 IF ( TRIM( variable_chr ) /= 'max_pr_user' ) THEN 676 PRINT*, '+++ read_parts_of_var_list: max_pr_user not found in restart', & 677 ' data file' 678 CALL local_stop 673 message_string = 'max_pr_user not found in restart data file' 674 CALL message( 'read_parts_of_var_list', 'PA0305', 1, 2, 0, 6, 0 ) 679 675 ENDIF 680 676 READ ( 13 ) max_pr_user_on_file 681 677 IF ( max_pr_user_on_file /= max_pr_user ) THEN 682 IF ( myid == 0 ) THEN 683 PRINT*, '+++ read_parts_of_var_list: number of user profiles on res', & 684 'tart data file differs from the current run' 685 PRINT*, ' max_pr_user on file = "', & 686 max_pr_user_on_file, '"' 687 PRINT*, ' max_pr_user from run = "', & 688 max_pr_user, '"' 689 ENDIF 678 WRITE( message_string, * ) 'number of user profiles on res', & 679 'tart data file differs from the current run', & 680 '&max_pr_user on file = "', & 681 max_pr_user_on_file, '"', & 682 '&max_pr_user from run = "', & 683 max_pr_user, '"' 684 CALL message( 'read_parts_of_var_list', 'PA0306', 0, 0, 0, 6, 0 ) 690 685 tmp_mpru = MIN( max_pr_user_on_file, max_pr_user ) 691 686 ELSE … … 695 690 READ ( 13 ) variable_chr 696 691 IF ( TRIM( variable_chr ) /= 'statistic_regions' ) THEN 697 PRINT*, '+++ read_parts_of_var_list: statistic_regions not found in ', & 698 'restart data file' 699 CALL local_stop 692 message_string = 'statistic_regions not found in restart data file' 693 CALL message( 'read_parts_of_var_list', 'PA0307', 1, 2, 0, 6, 0 ) 700 694 ENDIF 701 695 READ ( 13 ) statistic_regions_on_file 702 696 IF ( statistic_regions_on_file /= statistic_regions ) THEN 703 IF ( myid == 0 ) THEN 704 PRINT*, '+++ read_parts_of_var_list: WARNING: statistic regions on', & 705 ' restart data file differ from the current run' 706 PRINT*, ' statistic regions on file = "', & 707 statistic_regions_on_file, '"' 708 PRINT*, ' statistic regions from run = "', & 709 statistic_regions, '"' 710 PRINT*, ' statistic data may be lost!' 711 ENDIF 697 WRITE( message_string, * ) 'statistic regions on restart data file differ ',& 698 'from the current run',& 699 '&statistic regions on file = "', & 700 statistic_regions_on_file, '"', & 701 '&statistic regions from run = "', & 702 statistic_regions, '"', & 703 '&statistic data may be lost!' 704 CALL message( 'read_parts_of_var_list', 'PA0308', 0, 1, 0, 6, 0 ) 712 705 tmp_sr = MIN( statistic_regions_on_file, statistic_regions ) 713 706 ELSE … … 731 724 CASE ( 'average_count_pr' ) 732 725 READ ( 13 ) average_count_pr 733 IF ( average_count_pr /= 0 .AND. myid == 0) THEN734 PRINT*, '+++ read_parts_of_var_list:'735 PRINT*, ' WARNING: inflow profiles not temporally averaged.'736 PRINT*, ' Averaging will be done now using ', &737 average_count_pr, ' samples.'726 IF ( average_count_pr /= 0 ) THEN 727 WRITE( message_string, * ) 'inflow profiles not temporally averaged.',& 728 '&Averaging will be done now using ', & 729 average_count_pr, ' samples.' 730 CALL message( 'read_parts_of_var_list', 'PA0309', 0, 1, 0, 6, 0 ) 738 731 ENDIF 739 732
Note: See TracChangeset
for help on using the changeset viewer.