Changeset 3987 for palm/trunk/SOURCE/module_interface.f90
- Timestamp:
- May 22, 2019 9:52:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/module_interface.f90
r3956 r3987 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Introduce switchable DEBUG file output via debug_message routine 28 ! 29 ! 3956 2019-05-07 12:32:52Z monakurppa 27 30 ! - Added calls for salsa_non_advective_processes and 28 31 ! salsa_exchange_horiz_bounds … … 122 125 !-- ToDo: move all of them to respective module or a dedicated central module 123 126 USE control_parameters, & 124 ONLY: biometeorology, & 125 air_chemistry, & 127 ONLY: air_chemistry, & 128 biometeorology, & 129 debug_output, & 130 debug_output_timestep, & 126 131 indoor_model, & 127 132 land_surface, & … … 539 544 540 545 546 IF ( debug_output ) CALL debug_message( 'reading module-specific parameters', 'start' ) 547 541 548 CALL bio_parin 542 549 CALL bcm_parin … … 563 570 CALL package_parin ! ToDo: deprecated, needs to be dissolved 564 571 572 IF ( debug_output ) CALL debug_message( 'reading module-specific parameters', 'end' ) 573 565 574 566 575 END SUBROUTINE module_interface_parin … … 574 583 SUBROUTINE module_interface_check_parameters 575 584 585 586 IF ( debug_output ) CALL debug_message( 'checking module-specific parameters', 'start' ) 576 587 577 588 IF ( bulk_cloud_model ) CALL bcm_check_parameters … … 594 605 IF ( user_module_enabled ) CALL user_check_parameters 595 606 607 IF ( debug_output ) CALL debug_message( 'checking module-specific parameters', 'end' ) 608 596 609 597 610 END SUBROUTINE module_interface_check_parameters … … 612 625 613 626 627 IF ( debug_output ) CALL debug_message( 'checking module-specific data output ts', 'start' ) 628 614 629 IF ( radiation ) THEN 615 630 CALL radiation_check_data_output_ts( dots_max, dots_num ) … … 619 634 CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 620 635 ENDIF 636 637 IF ( debug_output ) CALL debug_message( 'checking module-specific data output ts', 'end' ) 621 638 622 639 … … 638 655 CHARACTER (LEN=*), INTENT(OUT) :: dopr_unit !< local value of dopr_unit 639 656 657 658 IF ( debug_output ) CALL debug_message( 'checking module-specific data output pr', 'start' ) 659 640 660 IF ( unit == 'illegal' .AND. bulk_cloud_model ) THEN 641 661 CALL bcm_check_data_output_pr( variable, var_count, unit, dopr_unit ) … … 670 690 CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit ) 671 691 ENDIF 692 693 IF ( debug_output ) CALL debug_message( 'checking module-specific data output pr', 'end' ) 672 694 673 695 … … 690 712 INTEGER(iwp), INTENT(IN) :: k !< ToDo: remove dummy argument, instead pass string from data_output 691 713 714 715 IF ( debug_output ) CALL debug_message( 'checking module-specific data output 2d/3d', 'start' ) 716 692 717 IF ( unit == 'illegal' .AND. biometeorology ) THEN 693 718 CALL bio_check_data_output( variable, unit, i, j, ilen, k ) … … 742 767 ENDIF 743 768 769 IF ( debug_output ) CALL debug_message( 'checking module-specific data output 2d/3d', 'end' ) 770 744 771 745 772 END SUBROUTINE module_interface_check_data_output … … 757 784 CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name 758 785 CHARACTER (LEN=*), INTENT(INOUT) :: unit !< physical unit of variable 786 787 788 IF ( debug_output ) CALL debug_message( 'initializing module-specific masks', 'start' ) 759 789 760 790 IF ( unit == 'illegal' .AND. air_chemistry & … … 775 805 CALL user_check_data_output( variable, unit ) 776 806 ENDIF 807 808 IF ( debug_output ) CALL debug_message( 'initializing module-specific masks', 'end' ) 777 809 778 810 … … 795 827 CHARACTER (LEN=*), INTENT(OUT) :: grid_y !< netcdf dimension in y-direction 796 828 CHARACTER (LEN=*), INTENT(OUT) :: grid_z !< netcdf dimension in z-direction 829 830 831 IF ( debug_output ) CALL debug_message( 'defining module-specific netcdf grids', 'start' ) 797 832 ! 798 833 !-- As long as no action is done in this subroutine, initialize strings with … … 806 841 IF ( var == ' ' ) RETURN 807 842 843 IF ( debug_output ) CALL debug_message( 'defining module-specific netcdf grids', 'end' ) 844 845 808 846 END SUBROUTINE module_interface_define_netcdf_grid 809 847 … … 817 855 818 856 819 CALL location_message( 'initializing module-specific arrays', 'start' )857 IF ( debug_output ) CALL debug_message( 'initializing module-specific arrays', 'start' ) 820 858 821 859 IF ( bulk_cloud_model ) CALL bcm_init_arrays … … 830 868 IF ( user_module_enabled ) CALL user_init_arrays 831 869 832 CALL location_message( 'initializing module-specific arrays', 'finished' )870 IF ( debug_output ) CALL debug_message( 'initializing module-specific arrays', 'end' ) 833 871 834 872 … … 844 882 845 883 846 CALL location_message( 'initializing module features', 'start' )884 IF ( debug_output ) CALL debug_message( 'module-specific initialization', 'start' ) 847 885 848 886 IF ( biometeorology ) CALL bio_init … … 864 902 IF ( user_module_enabled ) CALL user_init 865 903 866 CALL location_message( 'initializing module features', 'finished' )904 IF ( debug_output ) CALL debug_message( 'module-specific initialization', 'end' ) 867 905 868 906 … … 878 916 879 917 918 IF ( debug_output ) CALL debug_message( 'module-specific post-initialization checks', 'start' ) 919 880 920 IF ( biometeorology ) CALL bio_init_checks 881 921 922 IF ( debug_output ) CALL debug_message( 'module-specific post-initialization checks', 'end' ) 923 882 924 883 925 END SUBROUTINE module_interface_init_checks … … 894 936 INTEGER(iwp), INTENT(IN) :: io !< unit of the output file 895 937 938 939 IF ( debug_output ) CALL debug_message( 'module-specific header output', 'start' ) 896 940 897 941 IF ( biometeorology ) CALL bio_header ( io ) … … 911 955 IF ( user_module_enabled ) CALL user_header( io ) 912 956 957 IF ( debug_output ) CALL debug_message( 'module-specific header output', 'end' ) 958 913 959 914 960 END SUBROUTINE module_interface_header … … 966 1012 ! Description: 967 1013 ! ------------ 968 !> Compute module-specific cnon_advective_processes (vector-optimized)1014 !> Compute module-specific non_advective_processes (vector-optimized) 969 1015 !------------------------------------------------------------------------------! 970 1016 SUBROUTINE module_interface_non_advective_processes() … … 1006 1052 1007 1053 1054 IF ( debug_output_timestep ) CALL debug_message( 'module-specific exchange_horiz', 'start' ) 1055 1008 1056 IF ( bulk_cloud_model ) CALL bcm_exchange_horiz() 1009 1057 IF ( air_chemistry ) CALL chem_exchange_horiz_bounds() 1010 1058 IF ( salsa ) CALL salsa_exchange_horiz_bounds() 1059 1060 IF ( debug_output_timestep ) CALL debug_message( 'module-specific exchange_horiz', 'end' ) 1061 1011 1062 1012 1063 END SUBROUTINE module_interface_exchange_horiz … … 1064 1115 1065 1116 INTEGER(iwp), INTENT(IN) :: swap_mode !< determines procedure of pointer swap 1117 1118 1119 IF ( debug_output_timestep ) CALL debug_message( 'module-specific swap timelevel', 'start' ) 1066 1120 1067 1121 IF ( bulk_cloud_model ) CALL bcm_swap_timelevel( swap_mode ) … … 1073 1127 IF ( urban_surface ) CALL usm_swap_timelevel( swap_mode ) 1074 1128 1129 IF ( debug_output_timestep ) CALL debug_message( 'module-specific swap timelevel', 'end' ) 1130 1075 1131 1076 1132 END SUBROUTINE module_interface_swap_timelevel … … 1088 1144 CHARACTER (LEN=*), INTENT(IN) :: mode !< averaging interface mode 1089 1145 CHARACTER (LEN=*), INTENT(IN) :: variable !< variable name 1146 1147 1148 IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data averaging', 'start' ) 1090 1149 1091 1150 IF ( biometeorology ) CALL bio_3d_data_averaging( mode, variable ) … … 1100 1159 IF ( user_module_enabled ) CALL user_3d_data_averaging( mode, variable ) 1101 1160 1161 IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data averaging', 'end' ) 1162 1102 1163 1103 1164 END SUBROUTINE module_interface_3d_data_averaging … … 1126 1187 1127 1188 1189 IF ( debug_output_timestep ) CALL debug_message( 'module-specific 2d data output', 'start' ) 1190 1128 1191 IF ( .NOT. found .AND. biometeorology ) THEN 1129 1192 CALL bio_data_output_2d( & … … 1179 1242 ) 1180 1243 ENDIF 1244 1245 IF ( debug_output_timestep ) CALL debug_message( 'module-specific 2d data output', 'end' ) 1246 1181 1247 1182 1248 END SUBROUTINE module_interface_data_output_2d … … 1204 1270 1205 1271 1272 IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data output', 'start' ) 1273 1206 1274 IF ( .NOT. found .AND. biometeorology ) THEN 1207 1275 CALL bio_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) … … 1254 1322 ENDIF 1255 1323 1324 IF ( debug_output_timestep ) CALL debug_message( 'module-specific 3d data output', 'end' ) 1325 1256 1326 1257 1327 END SUBROUTINE module_interface_data_output_3d … … 1271 1341 INTEGER(iwp), INTENT(IN) :: dots_max !< maximum number of timeseries 1272 1342 1343 1344 IF ( debug_output_timestep ) CALL debug_message( 'module-specific statistics', 'start' ) 1345 1273 1346 IF ( gust_module_enabled ) CALL gust_statistics( mode, sr, tn, dots_max ) 1274 1347 IF ( air_chemistry ) CALL chem_statistics( mode, sr, tn ) 1275 1348 IF ( user_module_enabled ) CALL user_statistics( mode, sr, tn ) 1276 1349 1350 IF ( debug_output_timestep ) CALL debug_message( 'module-specific statistics', 'end' ) 1351 1277 1352 1278 1353 END SUBROUTINE module_interface_statistics … … 1288 1363 1289 1364 LOGICAL, INTENT(INOUT) :: found !< flag if variable was found 1365 1366 1367 IF ( debug_output ) CALL debug_message( 'module-specific read global restart data', 'start' ) 1290 1368 1291 1369 IF ( .NOT. found ) CALL bio_rrd_global( found ) ! ToDo: change interface to pass variable … … 1299 1377 IF ( .NOT. found ) CALL user_rrd_global( found ) ! ToDo: change interface to pass variable 1300 1378 1379 IF ( debug_output ) CALL debug_message( 'module-specific read global restart data', 'end' ) 1380 1301 1381 1302 1382 END SUBROUTINE module_interface_rrd_global … … 1310 1390 SUBROUTINE module_interface_wrd_global 1311 1391 1392 1393 IF ( debug_output ) CALL debug_message( 'module-specific write global restart data', 'start' ) 1312 1394 1313 1395 IF ( biometeorology ) CALL bio_wrd_global … … 1320 1402 IF ( surface_output ) CALL surface_data_output_wrd_global 1321 1403 IF ( user_module_enabled ) CALL user_wrd_global 1404 1405 IF ( debug_output ) CALL debug_message( 'module-specific write global restart data', 'end' ) 1322 1406 1323 1407 … … 1357 1441 1358 1442 1443 IF ( debug_output ) CALL debug_message( 'module-specific read local restart data', 'start' ) 1444 1359 1445 IF ( .NOT. found ) CALL bio_rrd_local( & 1360 1446 found & … … 1445 1531 ) ! ToDo: change interface to pass variable 1446 1532 1533 IF ( debug_output ) CALL debug_message( 'module-specific read local restart data', 'end' ) 1534 1447 1535 1448 1536 END SUBROUTINE module_interface_rrd_local … … 1456 1544 SUBROUTINE module_interface_wrd_local 1457 1545 1546 1547 IF ( debug_output ) CALL debug_message( 'module-specific write local restart data', 'start' ) 1458 1548 1459 1549 IF ( biometeorology ) CALL bio_wrd_local … … 1469 1559 IF ( user_module_enabled ) CALL user_wrd_local 1470 1560 1561 IF ( debug_output ) CALL debug_message( 'module-specific write local restart data', 'end' ) 1562 1471 1563 1472 1564 END SUBROUTINE module_interface_wrd_local … … 1480 1572 SUBROUTINE module_interface_last_actions 1481 1573 1574 1575 IF ( debug_output ) CALL debug_message( 'module-specific last actions', 'start' ) 1482 1576 1483 1577 IF ( virtual_measurement ) CALL vm_last_actions 1484 1578 IF ( user_module_enabled ) CALL user_last_actions 1485 1579 1580 IF ( debug_output ) CALL debug_message( 'module-specific last actions', 'end' ) 1581 1486 1582 1487 1583 END SUBROUTINE module_interface_last_actions
Note: See TracChangeset
for help on using the changeset viewer.