Changeset 3045 for palm/trunk/SOURCE/check_parameters.f90
- Timestamp:
- May 28, 2018 7:55:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r3035 r3045 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Error messages revised 28 ! 29 ! 3035 2018-05-24 09:35:20Z schwenkel 27 30 ! Add option to initialize warm air bubble close to surface 28 ! 31 ! 29 32 ! 3034 2018-05-24 08:41:20Z raasch 30 33 ! bugfix: check that initializing_actions has been set 31 ! 34 ! 32 35 ! 2980 2018-04-17 15:19:27Z suehring 33 36 ! Further improvement for spinup checks. … … 751 754 ! 752 755 !-- Check the coupling mode 753 !> @todo Check if any queries for other coupling modes (e.g. precursor_ocean) are missing 754 IF ( coupling_mode /= 'uncoupled' .AND. & 755 coupling_mode /= 'vnested_crse' .AND. & 756 coupling_mode /= 'vnested_fine' .AND. & 757 coupling_mode /= 'atmosphere_to_ocean' .AND. & 756 IF ( coupling_mode /= 'uncoupled' .AND. & 757 coupling_mode /= 'precursor_atmos' .AND. & 758 coupling_mode /= 'precursor_ocean' .AND. & 759 coupling_mode /= 'vnested_crse' .AND. & 760 coupling_mode /= 'vnested_fine' .AND. & 761 coupling_mode /= 'atmosphere_to_ocean' .AND. & 758 762 coupling_mode /= 'ocean_to_atmosphere' ) THEN 759 763 message_string = 'illegal coupling mode: ' // TRIM( coupling_mode ) … … 764 768 !-- Check if humidity is set to TRUE in case of the atmospheric run (for coupled runs) 765 769 IF ( coupling_mode == 'atmosphere_to_ocean' .AND. .NOT. humidity) THEN 766 message_string = ' Humidity has to be set to .T. in the _p3d file for ' //&767 ' coupled runs between ocean and atmosphere.'770 message_string = ' Humidity has to be set to .T. in the _p3d file ' // & 771 'for coupled runs between ocean and atmosphere.' 768 772 CALL message( 'check_parameters', 'PA0476', 1, 2, 0, 6, 0 ) 769 773 ENDIF … … 771 775 ! 772 776 !-- Check dt_coupling, restart_time, dt_restart, end_time, dx, dy, nx and ny 773 IF ( coupling_mode /= 'uncoupled' .AND. & 774 coupling_mode(1:8) /= 'vnested_' ) THEN 777 IF ( coupling_mode /= 'uncoupled' .AND. & 778 coupling_mode(1:8) /= 'vnested_' .AND. & 779 coupling_mode /= 'precursor_atmos' .AND. & 780 coupling_mode /= 'precursor_ocean' ) THEN 775 781 776 782 IF ( dt_coupling == 9999999.9_wp ) THEN … … 914 920 WRITE( message_string, * ) 'coupling mode "', & 915 921 TRIM( coupling_mode ), & 916 '": nx+1 in ocean is not divisible by nx+1 in', &922 '": nx+1 in ocean is not divisible by nx+1 in', & 917 923 ' atmosphere without remainder' 918 924 CALL message( 'check_parameters', 'PA0339', 1, 2, 0, 6, 0 ) … … 1054 1060 ! 1055 1061 !-- Check approximation 1056 IF ( TRIM( approximation ) /= 'boussinesq' .AND. &1062 IF ( TRIM( approximation ) /= 'boussinesq' .AND. & 1057 1063 TRIM( approximation ) /= 'anelastic' ) THEN 1058 message_string = 'unknown approximation: approximation = "' // &1064 message_string = 'unknown approximation: approximation = "' // & 1059 1065 TRIM( approximation ) // '"' 1060 1066 CALL message( 'check_parameters', 'PA0446', 1, 2, 0, 6, 0 ) … … 1063 1069 ! 1064 1070 !-- Check approximation requirements 1065 IF ( TRIM( approximation ) == 'anelastic' .AND. &1071 IF ( TRIM( approximation ) == 'anelastic' .AND. & 1066 1072 TRIM( momentum_advec ) /= 'ws-scheme' ) THEN 1067 message_string = 'Anelastic approximation requires : ' //&1073 message_string = 'Anelastic approximation requires ' // & 1068 1074 'momentum_advec = "ws-scheme"' 1069 1075 CALL message( 'check_parameters', 'PA0447', 1, 2, 0, 6, 0 ) 1070 1076 ENDIF 1071 IF ( TRIM( approximation ) == 'anelastic' .AND. &1077 IF ( TRIM( approximation ) == 'anelastic' .AND. & 1072 1078 TRIM( psolver ) == 'multigrid' ) THEN 1073 message_string = 'Anelastic approximation currently only supports : ' //&1074 'psolver = "poisfft", ' // &1075 'psolver = "sor" and ' // &1079 message_string = 'Anelastic approximation currently only supports ' // & 1080 'psolver = "poisfft", ' // & 1081 'psolver = "sor" and ' // & 1076 1082 'psolver = "multigrid_noopt"' 1077 1083 CALL message( 'check_parameters', 'PA0448', 1, 2, 0, 6, 0 ) 1078 1084 ENDIF 1079 IF ( TRIM( approximation ) == 'anelastic' .AND. &1085 IF ( TRIM( approximation ) == 'anelastic' .AND. & 1080 1086 conserve_volume_flow ) THEN 1081 message_string = 'Anelastic approximation is not allowed with :' // &1087 message_string = 'Anelastic approximation is not allowed with ' // & 1082 1088 'conserve_volume_flow = .TRUE.' 1083 1089 CALL message( 'check_parameters', 'PA0449', 1, 2, 0, 6, 0 ) … … 1086 1092 ! 1087 1093 !-- Check flux input mode 1088 IF ( TRIM( flux_input_mode ) /= 'dynamic' .AND. &1089 TRIM( flux_input_mode ) /= 'kinematic' .AND. &1094 IF ( TRIM( flux_input_mode ) /= 'dynamic' .AND. & 1095 TRIM( flux_input_mode ) /= 'kinematic' .AND. & 1090 1096 TRIM( flux_input_mode ) /= 'approximation-specific' ) THEN 1091 1097 message_string = 'unknown flux input mode: flux_input_mode = "' // & … … 1104 1110 ! 1105 1111 !-- Check flux output mode 1106 IF ( TRIM( flux_output_mode ) /= 'dynamic' .AND. &1107 TRIM( flux_output_mode ) /= 'kinematic' .AND. &1112 IF ( TRIM( flux_output_mode ) /= 'dynamic' .AND. & 1113 TRIM( flux_output_mode ) /= 'kinematic' .AND. & 1108 1114 TRIM( flux_output_mode ) /= 'approximation-specific' ) THEN 1109 1115 message_string = 'unknown flux output mode: flux_output_mode = "' // & … … 1248 1254 ! 1249 1255 !-- Advection schemes: 1250 IF ( momentum_advec /= 'pw-scheme' .AND. momentum_advec /= 'ws-scheme' ) & 1256 IF ( momentum_advec /= 'pw-scheme' .AND. & 1257 momentum_advec /= 'ws-scheme' .AND. & 1258 momentum_advec /= 'up-scheme' ) & 1251 1259 THEN 1252 1260 message_string = 'unknown advection scheme: momentum_advec = "' // & … … 1259 1267 THEN 1260 1268 message_string = 'momentum_advec or scalar_advec = "' & 1261 // TRIM( momentum_advec ) // '" is not allowed with timestep_scheme = "' //&1262 TRIM( timestep_scheme ) // '"'1269 // TRIM( momentum_advec ) // '" is not allowed with ' // & 1270 'timestep_scheme = "' // TRIM( timestep_scheme ) // '"' 1263 1271 CALL message( 'check_parameters', 'PA0023', 1, 2, 0, 6, 0 ) 1264 1272 ENDIF 1265 1273 IF ( scalar_advec /= 'pw-scheme' .AND. scalar_advec /= 'ws-scheme' .AND. & 1266 scalar_advec /= 'bc-scheme' )&1274 scalar_advec /= 'bc-scheme' .AND. scalar_advec /= 'up-scheme' ) & 1267 1275 THEN 1268 1276 message_string = 'unknown advection scheme: scalar_advec = "' // & … … 1273 1281 THEN 1274 1282 message_string = 'advection_scheme scalar_advec = "' & 1275 // TRIM( scalar_advec ) // '" not implemented for & loop_optimization = "' //&1276 TRIM( loop_optimization ) // '"'1283 // TRIM( scalar_advec ) // '" not implemented for ' // & 1284 'loop_optimization = "' // TRIM( loop_optimization ) // '"' 1277 1285 CALL message( 'check_parameters', 'PA0026', 1, 2, 0, 6, 0 ) 1278 1286 ENDIF … … 1325 1333 !-- Check for proper settings for microphysics 1326 1334 IF ( cloud_physics .AND. cloud_droplets ) THEN 1327 message_string = 'cloud_physics = .TRUE. is not allowed with ' // &1335 message_string = 'cloud_physics = .TRUE. is not allowed with ' // & 1328 1336 'cloud_droplets = .TRUE.' 1329 1337 CALL message( 'check_parameters', 'PA0442', 1, 2, 0, 6, 0 ) … … 1355 1363 IF ( TRIM( initializing_actions ) == '' ) THEN 1356 1364 message_string = 'no value specified for initializing_actions' 1357 CALL message( 'check_parameters', 'PA0 017', 1, 2, 0, 6, 0 )1365 CALL message( 'check_parameters', 'PA0149', 1, 2, 0, 6, 0 ) 1358 1366 ENDIF 1359 1367 … … 1373 1381 1374 1382 CASE DEFAULT 1375 message_string = 'initializing_action s = "' //&1383 message_string = 'initializing_action = "' // & 1376 1384 TRIM( action ) // '" unknown or not allowed' 1377 1385 CALL message( 'check_parameters', 'PA0030', 1, 2, 0, 6, 0 ) … … 1472 1480 IF ( large_scale_forcing .OR. nudging ) CALL lsf_nudging_check_parameters 1473 1481 1474 1475 1476 IF ( .NOT. ( loop_optimization == 'cache' .OR. &1477 loop_optimization == 'vector' ) &1478 .AND. cloud_physics .AND. microphysics_seifert ) THEN1479 message_string = 'cloud_scheme = seifert_beheng requires ' // &1480 'loop_optimization = "cache" or "vector"'1481 CALL message( 'check_parameters', 'PA0362', 1, 2, 0, 6, 0 )1482 ENDIF1483 1484 1482 ! 1485 1483 !-- In case of no model continuation run, check initialising parameters and … … 1825 1823 !-- Check time step and cfl_factor 1826 1824 IF ( dt /= -1.0_wp ) THEN 1827 IF ( dt <= 0.0_wp .AND. dt /= -1.0_wp) THEN1825 IF ( dt <= 0.0_wp ) THEN 1828 1826 WRITE( message_string, * ) 'dt = ', dt , ' <= 0.0' 1829 1827 CALL message( 'check_parameters', 'PA0044', 1, 2, 0, 6, 0 ) … … 1844 1842 ELSE 1845 1843 WRITE( message_string, * ) 'cfl_factor = ', cfl_factor, & 1846 ' out of range &0.0 < cfl_factor <= 1.0 is required'1844 ' out of range 0.0 < cfl_factor <= 1.0 is required' 1847 1845 CALL message( 'check_parameters', 'PA0045', 1, 2, 0, 6, 0 ) 1848 1846 ENDIF … … 1887 1885 CALL message( 'check_parameters', 'PA0047', 1, 2, 0, 6, 0 ) 1888 1886 ELSE 1889 message_string = 'variable translation speed used for galilei-' // &1890 'transformation, which may cause & instabilities in stably ' //&1887 message_string = 'variable translation speed used for Galilei-' // & 1888 'transformation, which may cause instabilities in stably ' // & 1891 1889 'stratified regions' 1892 1890 CALL message( 'check_parameters', 'PA0048', 0, 1, 0, 6, 0 ) … … 2064 2062 surface_heatflux /= 0.0_wp ) THEN 2065 2063 message_string = 'boundary_condition: bc_pt_b = "' // TRIM( bc_pt_b ) //& 2066 ' &is not allowed with constant_heatflux = .TRUE.'2064 'is not allowed with constant_heatflux = .TRUE.' 2067 2065 CALL message( 'check_parameters', 'PA0065', 1, 2, 0, 6, 0 ) 2068 2066 ENDIF … … 2154 2152 IF ( passive_scalar ) THEN 2155 2153 2156 IF ( ANY( wall_scalarflux /= 0.0_wp ) .AND. &2154 IF ( ANY( wall_scalarflux /= 0.0_wp ) .AND. & 2157 2155 surface_scalarflux == 9999999.9_wp ) THEN 2158 message_string = 'wall_scalarflux additionally requires ' // &2156 message_string = 'wall_scalarflux additionally requires ' // & 2159 2157 'setting of surface_scalarflux' 2160 2158 CALL message( 'check_parameters', 'PA0445', 1, 2, 0, 6, 0 ) … … 2326 2324 IF ( averaging_interval > dt_data_output_av ) THEN 2327 2325 WRITE( message_string, * ) 'averaging_interval = ', & 2328 averaging_interval, ' must be <= dt_data_output = ', dt_data_output 2326 averaging_interval, ' must be <= dt_data_output_av = ', & 2327 dt_data_output_av 2329 2328 CALL message( 'check_parameters', 'PA0085', 1, 2, 0, 6, 0 ) 2330 2329 ENDIF … … 2549 2548 CASE ( 'sa', '#sa' ) 2550 2549 IF ( .NOT. ocean ) THEN 2551 message_string = 'data_output_pr = ' // &2550 message_string = 'data_output_pr = ' // & 2552 2551 TRIM( data_output_pr(i) ) // ' is not imp' // & 2553 2552 'lemented for ocean = .FALSE.' … … 2622 2621 CASE ( 'q', '#q' ) 2623 2622 IF ( .NOT. humidity ) THEN 2624 message_string = 'data_output_pr = ' // &2623 message_string = 'data_output_pr = ' // & 2625 2624 TRIM( data_output_pr(i) ) // ' is not imp' // & 2626 2625 'lemented for humidity = .FALSE.' … … 2807 2806 message_string = 'data_output_pr = ' // & 2808 2807 TRIM( data_output_pr(i) ) // ' is not imp' // & 2809 'lemented for cloud_physics = .FALSE. an &'// &2808 'lemented for cloud_physics = .FALSE. an' // & 2810 2809 'd humidity = .FALSE.' 2811 2810 CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 ) … … 2825 2824 message_string = 'data_output_pr = ' // & 2826 2825 TRIM( data_output_pr(i) ) // ' is not imp' // & 2827 'lemented for cloud_physics = .FALSE. an &'// &2826 'lemented for cloud_physics = .FALSE. an' // & 2828 2827 'd humidity = .FALSE.' 2829 2828 CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 ) … … 2842 2841 message_string = 'data_output_pr = ' // & 2843 2842 TRIM( data_output_pr(i) ) // ' is not imp' // & 2844 'lemented for cloud_physics = .FALSE. an &'// &2843 'lemented for cloud_physics = .FALSE. an' // & 2845 2844 'd humidity = .FALSE.' 2846 2845 CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 ) … … 2851 2850 message_string = 'data_output_pr = ' // & 2852 2851 TRIM( data_output_pr(i) ) // ' is not imp' // & 2853 'lemented for cloud_physics = .FALSE. or'// &2854 ' &cloud_droplets = .FALSE.'2852 'lemented for cloud_physics = .FALSE. and' // & 2853 'cloud_droplets = .FALSE.' 2855 2854 CALL message( 'check_parameters', 'PA0096', 1, 2, 0, 6, 0 ) 2856 2855 ELSE … … 3249 3248 ELSEIF ( .NOT. microphysics_morrison ) THEN 3250 3249 message_string = 'output of "' // TRIM( var ) // '" requi' // & 3251 'res = m icrophysics morrison '3250 'res = morrison ' 3252 3251 CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 ) 3253 3252 ENDIF … … 3269 3268 IF ( .NOT. particle_advection ) THEN 3270 3269 message_string = 'output of "' // TRIM( var ) // '" requir' // & 3271 'es a "particle_parameters"-NAMELIST in the parameter file (PARIN)' 3270 'es a "particle_parameters"-NAMELIST in the parameter ' // & 3271 'file (PARIN)' 3272 3272 CALL message( 'check_parameters', 'PA0104', 1, 2, 0, 6, 0 ) 3273 3273 ENDIF … … 3281 3281 CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) 3282 3282 ELSEIF ( microphysics_sat_adjust ) THEN 3283 message_string = 'output of "' // TRIM( var ) // '" is ' // &3283 message_string = 'output of "' // TRIM( var ) // '" is ' // & 3284 3284 'not available for cloud_scheme = saturation_adjust' 3285 3285 CALL message( 'check_parameters', 'PA0423', 1, 2, 0, 6, 0 ) … … 3378 3378 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 3379 3379 message_string = 'illegal value for data_output: "' // & 3380 TRIM( var ) // '" & only 2d-horizontal ' //&3380 TRIM( var ) // '" only 2d-horizontal ' // & 3381 3381 'cross sections are allowed for this value' 3382 3382 CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 ) … … 3411 3411 ENDIF 3412 3412 3413 IF ( TRIM( var ) == 'ghf*' .AND. .NOT. land_surface ) THEN3414 message_string = 'output of "' // TRIM( var ) // '" requi' //&3415 'res land_surface = .TRUE.'3416 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )3417 ENDIF3413 IF ( TRIM( var ) == 'ghf*' .AND. .NOT. land_surface ) THEN 3414 message_string = 'output of "' // TRIM( var ) // '" requi' // & 3415 'res land_surface = .TRUE.' 3416 CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 ) 3417 ENDIF 3418 3418 3419 3419 IF ( ( TRIM( var ) == 'r_a*' .OR. TRIM( var ) == 'ghf*' ) & … … 3558 3558 WRITE( message_string, * ) 'output of averaged quantity "', & 3559 3559 TRIM( doav(1) ), '_av" requires to set a ', & 3560 'non-zero &averaging interval'3560 'non-zero averaging interval' 3561 3561 CALL message( 'check_parameters', 'PA0323', 1, 2, 0, 6, 0 ) 3562 3562 ENDIF … … 3579 3579 section(:,2) = section_xz 3580 3580 section(:,3) = section_yz 3581 3582 !3583 !-- Upper plot limit for 2D vertical sections3584 IF ( z_max_do2d == -1.0_wp ) z_max_do2d = zu(nzt)3585 IF ( z_max_do2d < zu(nzb+1) .OR. z_max_do2d > zu(nzt) ) THEN3586 WRITE( message_string, * ) 'z_max_do2d = ', z_max_do2d, &3587 ' must be >= ', zu(nzb+1), '(zu(nzb+1)) and <= ', zu(nzt), &3588 ' (zu(nzt))'3589 CALL message( 'check_parameters', 'PA0116', 1, 2, 0, 6, 0 )3590 ENDIF3591 3581 3592 3582 ! … … 3647 3637 '5 (parallel netCDF 4) and ' // & 3648 3638 '6 (parallel netCDF 4 Classic model) '// & 3649 ' &are currently not supported (not yet tested) ' // &3650 'for masked data. &Using respective non-parallel' // &3639 ' are currently not supported (not yet tested) ' // & 3640 'for masked data. Using respective non-parallel' // & 3651 3641 ' output for masked data.' 3652 3642 CALL message( 'check_parameters', 'PA0383', 0, 0, 0, 6, 0 ) … … 3663 3653 #else 3664 3654 message_string = 'netCDF: netCDF4 format requested but no ' // & 3665 'cpp-directive __netcdf4 given & switch ' //&3655 'cpp-directive __netcdf4 given switch ' // & 3666 3656 'back to 64-bit offset format' 3667 3657 CALL message( 'check_parameters', 'PA0171', 0, 1, 0, 6, 0 ) … … 3674 3664 #else 3675 3665 message_string = 'netCDF: netCDF4 parallel output requested but no ' // & 3676 'cpp-directive __netcdf4_parallel given & switch '// &3666 'cpp-directive __netcdf4_parallel given, switch ' // & 3677 3667 'back to netCDF4 non-parallel output' 3678 3668 CALL message( 'check_parameters', 'PA0099', 0, 1, 0, 6, 0 ) … … 3865 3855 IF ( disturbance_level_ind_t < disturbance_level_ind_b ) THEN 3866 3856 WRITE( message_string, * ) 'disturbance_level_ind_t = ', & 3867 disturbance_level_ind_t, ' must be >= disturbance_level_ind_b = ',&3868 disturbance_level_ind_b3857 disturbance_level_ind_t, ' must be >= ', & 3858 'disturbance_level_ind_b = ', disturbance_level_ind_b 3869 3859 CALL message( 'check_parameters', 'PA0130', 1, 2, 0, 6, 0 ) 3870 3860 ENDIF … … 3984 3974 IF ( turbulent_inflow ) THEN 3985 3975 IF ( recycling_width <= dx .OR. recycling_width >= nx * dx ) THEN 3986 WRITE( message_string, * ) 'illegal value for recycling_width: ',&3987 ' ',recycling_width3976 WRITE( message_string, * ) 'illegal value for recycling_width: ', & 3977 recycling_width 3988 3978 CALL message( 'check_parameters', 'PA0134', 1, 2, 0, 6, 0 ) 3989 3979 ENDIF … … 4087 4077 IF ( dp_level_b < zu(nzb) .OR. dp_level_b > zu(nzt) ) THEN 4088 4078 WRITE( message_string, * ) 'dp_level_b = ', dp_level_b, ' is out ', & 4089 ' of range '4079 ' of range [zu(nzb), zu(nzt)]' 4090 4080 CALL message( 'check_parameters', 'PA0151', 1, 2, 0, 6, 0 ) 4091 4081 ENDIF 4092 4082 IF ( .NOT. ANY( dpdxy /= 0.0_wp ) ) THEN 4093 4083 WRITE( message_string, * ) 'dp_external is .TRUE. but dpdxy is ze', & 4094 'ro, i.e. the external pressure gradient &will not be applied'4084 'ro, i.e. the external pressure gradient will not be applied' 4095 4085 CALL message( 'check_parameters', 'PA0152', 0, 1, 0, 6, 0 ) 4096 4086 ENDIF … … 4147 4137 IF ( particle_dvrpsize /= 'absw' ) THEN 4148 4138 message_string = 'illegal value for parameter particle_dvrpsize:' // & 4149 ' ' // TRIM( particle_ color)4139 ' ' // TRIM( particle_dvrpsize) 4150 4140 CALL message( 'check_parameters', 'PA0314', 1, 2, 0, 6, 0 ) 4151 4141 ELSE … … 4183 4173 !-- Check roughness length, which has to be smaller than dz/2 4184 4174 IF ( ( constant_flux_layer .OR. & 4185 INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 ) &4175 INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 ) & 4186 4176 .AND. roughness_length >= 0.5 * dz ) THEN 4187 4177 message_string = 'roughness_length must be smaller than dz/2' … … 4237 4227 IF ( dt_fixed ) THEN 4238 4228 WRITE( message_string, '(A,F9.4,A)' ) 'Output at every ' // & 4239 'timestep is wanted (' // dt_do_name // ' = 0.0). &'// &4240 ' Setting the output interval to the fixed timestep '//&4241 ' dt= ', dt, 's.'4229 'timestep is wanted (' // dt_do_name // ' = 0.0). '// & 4230 'The output interval is set to the fixed timestep dt '// & 4231 '= ', dt, 's.' 4242 4232 CALL message( 'check_parameters', 'PA0060', 0, 0, 0, 6, 0 ) 4243 4233 dt_do = dt
Note: See TracChangeset
for help on using the changeset viewer.