Changeset 3701 for palm/trunk/SOURCE
- Timestamp:
- Jan 26, 2019 6:57:21 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/module_interface.f90
r3700 r3701 270 270 271 271 USE user, & 272 ONLY: user_parin, & 272 ONLY: user_module_enabled, & 273 user_parin, & 273 274 user_check_parameters, & 274 275 user_check_data_output_ts, & … … 479 480 IF ( urban_surface ) CALL usm_check_parameters 480 481 IF ( wind_turbine ) CALL wtm_check_parameters 481 482 IF ( user_module_enabled ) CALL user_check_parameters 482 483 483 484 … … 503 504 ENDIF 504 505 505 CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 506 IF ( user_module_enabled ) THEN 507 CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 508 ENDIF 506 509 507 510 … … 551 554 ENDIF 552 555 553 IF ( unit == 'illegal' ) THEN556 IF ( unit == 'illegal' .AND. user_module_enabled ) THEN 554 557 unit = '' ! ToDo: Seems like a hack. Find a general soultion! 555 558 CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit ) … … 618 621 ENDIF 619 622 620 IF ( unit == 'illegal' ) THEN623 IF ( unit == 'illegal' .AND. user_module_enabled ) THEN 621 624 unit = '' 622 625 CALL user_check_data_output( variable, unit ) … … 652 655 ENDIF 653 656 654 IF ( unit == 'illegal' ) THEN657 IF ( unit == 'illegal' .AND. user_module_enabled ) THEN 655 658 unit = '' 656 659 CALL user_check_data_output( variable, unit ) … … 732 735 IF ( wind_turbine ) CALL wtm_init 733 736 IF ( radiation ) CALL radiation_init 734 737 IF ( user_module_enabled ) CALL user_init 735 738 736 739 … … 763 766 IF ( calculate_spectra ) CALL spectra_header( io ) 764 767 IF ( syn_turb_gen ) CALL stg_header( io ) 765 766 CALL user_header( io ) ! ToDo: make user module switch 768 IF ( user_module_enabled ) CALL user_header( io ) 767 769 768 770 … … 782 784 783 785 IF ( gust_module_enabled ) CALL gust_actions( location ) 784 785 CALL user_actions( location ) ! ToDo: make user module switch 786 IF ( user_module_enabled ) CALL user_actions( location ) 786 787 787 788 … … 803 804 804 805 IF ( gust_module_enabled ) CALL gust_actions( i, j, location ) 805 806 CALL user_actions( i, j, location ) ! ToDo: make user module switch 806 IF ( user_module_enabled ) CALL user_actions( i, j, location ) 807 807 808 808 … … 853 853 IF ( salsa ) CALL salsa_3d_data_averaging( mode, variable ) 854 854 IF ( urban_surface ) CALL usm_3d_data_averaging( mode, variable ) 855 856 CALL user_3d_data_averaging( mode, variable ) ! ToDo: make user module switch 855 IF ( user_module_enabled ) CALL user_3d_data_averaging( mode, variable ) 857 856 858 857 … … 930 929 ENDIF 931 930 932 IF ( .NOT. found ) THEN ! ToDo: make user module switch931 IF ( .NOT. found .AND. user_module_enabled ) THEN 933 932 CALL user_data_output_2d( & 934 933 av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do & … … 1000 999 ENDIF 1001 1000 1002 IF ( .NOT. found ) THEN ! ToDo: make user module switch1001 IF ( .NOT. found .AND. user_module_enabled ) THEN 1003 1002 CALL user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) 1004 1003 resorted = .TRUE. … … 1024 1023 IF ( gust_module_enabled ) CALL gust_statistics( mode, sr, tn, dots_max ) 1025 1024 IF ( air_chemistry ) CALL chem_statistics( mode, sr, tn ) 1026 1027 CALL user_statistics( mode, sr, tn ) ! ToDo: make user module switch 1025 IF ( user_module_enabled ) CALL user_statistics( mode, sr, tn ) 1028 1026 1029 1027 … … 1049 1047 IF ( .NOT. found ) CALL stg_rrd_global ( found ) ! ToDo: change interface to pass variable 1050 1048 IF ( .NOT. found ) CALL wtm_rrd_global( found ) ! ToDo: change interface to pass variable 1051 1052 1049 IF ( .NOT. found ) CALL user_rrd_global( found ) ! ToDo: change interface to pass variable 1053 1050 … … 1071 1068 IF ( syn_turb_gen ) CALL stg_wrd_global 1072 1069 IF ( wind_turbine ) CALL wtm_wrd_global 1073 1074 CALL user_wrd_global ! ToDo: make user module switch 1070 IF ( user_module_enabled ) CALL user_wrd_global 1075 1071 1076 1072 … … 1218 1214 IF ( salsa ) CALL salsa_wrd_local 1219 1215 IF ( urban_surface ) CALL usm_wrd_local 1220 1221 CALL user_wrd_local ! ToDo: make user module switch 1216 IF ( user_module_enabled ) CALL user_wrd_local 1222 1217 1223 1218 … … 1233 1228 1234 1229 1235 CALL user_last_actions ! ToDo: make user module switch1230 IF ( user_module_enabled ) CALL user_last_actions 1236 1231 1237 1232 -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3700 r3701 673 673 ONLY: lsm_define_netcdf_grid, nzb_soil, nzt_soil, nzs, zs 674 674 675 USE user, &676 ONLY: user_define_netcdf_grid677 678 675 USE ocean_mod, & 679 676 ONLY: ocean_define_netcdf_grid … … 707 704 USE urban_surface_mod, & 708 705 ONLY: usm_define_netcdf_grid 706 707 USE user, & 708 ONLY: user_module_enabled, user_define_netcdf_grid 709 709 710 710 … … 1160 1160 ! 1161 1161 !-- Now check for user-defined quantities 1162 IF ( .NOT. found ) THEN1162 IF ( .NOT. found .AND. user_module_enabled ) THEN 1163 1163 CALL user_define_netcdf_grid( domask(mid,av,i), found, & 1164 1164 grid_x, grid_y, grid_z ) … … 1922 1922 ! 1923 1923 !-- Check for user-defined quantities 1924 IF ( .NOT. found ) THEN1924 IF ( .NOT. found .AND. user_module_enabled ) THEN 1925 1925 CALL user_define_netcdf_grid( do3d(av,i), found, grid_x, & 1926 1926 grid_y, grid_z ) … … 2900 2900 ! 2901 2901 !-- Check for user-defined quantities 2902 IF ( .NOT. found ) THEN2902 IF ( .NOT. found .AND. user_module_enabled ) THEN 2903 2903 CALL user_define_netcdf_grid( do2d(av,i), found, & 2904 2904 grid_x, grid_y, & … … 3792 3792 ! 3793 3793 !-- Check for user-defined quantities 3794 IF ( .NOT. found ) THEN3794 IF ( .NOT. found .AND. user_module_enabled ) THEN 3795 3795 CALL user_define_netcdf_grid( do2d(av,i), found, & 3796 3796 grid_x, grid_y, grid_z ) … … 4649 4649 ! 4650 4650 !-- Check for user-defined quantities 4651 IF ( .NOT. found ) THEN4651 IF ( .NOT. found .AND. user_module_enabled ) THEN 4652 4652 CALL user_define_netcdf_grid( do2d(av,i), found, & 4653 4653 grid_x, grid_y, grid_z ) … … 5965 5965 !-- Check for user-defined quantities (found, grid_x and grid_y 5966 5966 !-- are dummies) 5967 CALL user_define_netcdf_grid( data_output_sp(i), found, & 5968 grid_x, grid_y, grid_z ) 5967 IF ( user_module_enabled ) THEN 5968 CALL user_define_netcdf_grid( data_output_sp(i), found, & 5969 grid_x, grid_y, grid_z ) 5970 ENDIF 5969 5971 5970 5972 END SELECT -
palm/trunk/SOURCE/user_module.f90
r3700 r3701 94 94 INTEGER(iwp) :: user_idummy !< 95 95 96 LOGICAL :: user_ defined_namelist_found = .FALSE. !<96 LOGICAL :: user_module_enabled = .FALSE. !< 97 97 98 98 REAL(wp) :: user_rdummy !< … … 108 108 SAVE 109 109 110 !PRIVATE110 PRIVATE 111 111 112 112 ! … … 118 118 user_check_data_output_pr, & 119 119 user_check_data_output, & 120 user_define_netcdf_grid, & 120 121 user_init, & 121 122 user_header, & … … 128 129 user_rrd_local, & 129 130 user_wrd_global, & 130 user_wrd_local 131 user_wrd_local, & 132 user_last_actions 131 133 132 134 ! 133 135 !- Public parameters, constants and initial values 134 !PUBLIC &135 !user_module_enabled136 PUBLIC & 137 user_module_enabled 136 138 137 139 INTERFACE user_parin … … 154 156 MODULE PROCEDURE user_check_data_output 155 157 END INTERFACE user_check_data_output 158 159 INTERFACE user_define_netcdf_grid 160 MODULE PROCEDURE user_define_netcdf_grid 161 END INTERFACE user_define_netcdf_grid 162 156 163 157 164 INTERFACE user_init … … 200 207 END INTERFACE user_wrd_local 201 208 209 INTERFACE user_last_actions 210 MODULE PROCEDURE user_last_actions 211 END INTERFACE user_last_actions 212 202 213 203 214 CONTAINS … … 218 229 219 230 220 NAMELIST /user par/ data_output_pr_user, data_output_user, region,&221 data_output_masks_user222 223 224 NAMELIST /user_parameters/ data_output_pr_user, data_output_user,region, &225 231 NAMELIST /user_parameters/ & 232 user_module_enabled, & 233 data_output_pr_user, & 234 data_output_user, & 235 region, & 236 data_output_masks_user 226 237 227 238 ! … … 244 255 BACKSPACE ( 11 ) 245 256 246 ! 257 !-- Set default module switch to true 258 user_module_enabled = .TRUE. 259 247 260 !-- Read user-defined namelist 248 261 READ ( 11, user_parameters, ERR = 10 ) 249 262 250 user_defined_namelist_found = .TRUE. 251 252 GOTO 14 263 GOTO 12 253 264 254 265 10 BACKSPACE( 11 ) … … 256 267 CALL parin_fail_message( 'user_parameters', line ) 257 268 258 12 REWIND ( 11 ) 259 260 line = ' ' 261 DO WHILE ( INDEX( line, '&userpar' ) == 0 ) 262 READ ( 11, '(A)', END=14 ) line 263 ENDDO 264 BACKSPACE ( 11 ) 265 266 ! 267 !-- Read user-defined namelist 268 READ ( 11, userpar, ERR = 13, END = 14 ) 269 270 message_string = 'namelist userpar is deprecated and will be ' // & 271 'removed in near future. &Please use namelist ' // & 272 'user_parameters instead' 273 CALL message( 'user_parin', 'PA0487', 0, 1, 0, 6, 0 ) 274 275 user_defined_namelist_found = .TRUE. 276 277 GOTO 14 278 279 13 BACKSPACE( 11 ) 280 READ( 11 , '(A)') line 281 CALL parin_fail_message( 'userpar', line ) 282 283 14 CONTINUE 269 12 CONTINUE 284 270 285 271 ! 286 272 !-- Determine the number of user-defined profiles and append them to the 287 273 !-- standard data output (data_output_pr) 288 IF ( user_ defined_namelist_found ) THEN274 IF ( user_module_enabled ) THEN 289 275 IF ( data_output_pr_user(1) /= ' ' ) THEN 290 276 i = 1 … … 301 287 ENDIF 302 288 ENDIF 303 304 RETURN 289 305 290 306 291 END SUBROUTINE user_parin … … 526 511 !-- If no user-defined variables are read from the namelist-file, no 527 512 !-- information will be printed. 528 IF ( .NOT. user_ defined_namelist_found ) THEN513 IF ( .NOT. user_module_enabled ) THEN 529 514 WRITE ( io, 100 ) 530 515 RETURN
Note: See TracChangeset
for help on using the changeset viewer.