[1] | 1 | SUBROUTINE check_parameters |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------! |
---|
[484] | 4 | ! Current revisions: |
---|
[1] | 5 | ! ----------------- |
---|
[1019] | 6 | ! non-optimized version of prognostic_equations not allowed any more |
---|
[979] | 7 | ! |
---|
| 8 | ! Former revisions: |
---|
| 9 | ! ----------------- |
---|
| 10 | ! $Id: check_parameters.f90 1019 2012-09-28 06:46:45Z raasch $ |
---|
| 11 | ! |
---|
[1017] | 12 | ! 1015 2012-09-27 09:23:24Z raasch |
---|
| 13 | ! acc allowed for loop optimization, |
---|
| 14 | ! checks for adjustment of mixing length to the Prandtl mixing length removed |
---|
| 15 | ! |
---|
[1004] | 16 | ! 1003 2012-09-14 14:35:53Z raasch |
---|
| 17 | ! checks for cases with unequal subdomain sizes removed |
---|
| 18 | ! |
---|
[1002] | 19 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 20 | ! all actions concerning leapfrog- and upstream-spline-scheme removed |
---|
| 21 | ! |
---|
[997] | 22 | ! 996 2012-09-07 10:41:47Z raasch |
---|
| 23 | ! little reformatting |
---|
[1001] | 24 | |
---|
[979] | 25 | ! 978 2012-08-09 08:28:32Z fricke |
---|
[978] | 26 | ! setting of bc_lr/ns_dirneu/neudir |
---|
| 27 | ! outflow damping layer removed |
---|
| 28 | ! check for z0h* |
---|
| 29 | ! check for pt_damping_width |
---|
[667] | 30 | ! |
---|
[965] | 31 | ! 964 2012-07-26 09:14:24Z raasch |
---|
| 32 | ! check of old profil-parameters removed |
---|
| 33 | ! |
---|
[941] | 34 | ! 940 2012-07-09 14:31:00Z raasch |
---|
| 35 | ! checks for parameter neutral |
---|
| 36 | ! |
---|
[925] | 37 | ! 924 2012-06-06 07:44:41Z maronga |
---|
| 38 | ! Bugfix: preprocessor directives caused error during compilation |
---|
| 39 | ! |
---|
[893] | 40 | ! 892 2012-05-02 13:51:44Z maronga |
---|
| 41 | ! Bugfix for parameter file check ( excluding __netcdf4 ) |
---|
| 42 | ! |
---|
[867] | 43 | ! 866 2012-03-28 06:44:41Z raasch |
---|
| 44 | ! use only 60% of the geostrophic wind as translation speed in case of Galilean |
---|
| 45 | ! transformation and use_ug_for_galilei_tr = .T. in order to mimimize the |
---|
| 46 | ! timestep |
---|
| 47 | ! |
---|
[863] | 48 | ! 861 2012-03-26 14:18:34Z suehring |
---|
| 49 | ! Check for topography and ws-scheme removed. |
---|
| 50 | ! Check for loop_optimization = 'vector' and ws-scheme removed. |
---|
| 51 | ! |
---|
[846] | 52 | ! 845 2012-03-07 10:23:05Z maronga |
---|
| 53 | ! Bugfix: exclude __netcdf4 directive part from namelist file check compilation |
---|
| 54 | ! |
---|
[829] | 55 | ! 828 2012-02-21 12:00:36Z raasch |
---|
| 56 | ! check of collision_kernel extended |
---|
| 57 | ! |
---|
[826] | 58 | ! 825 2012-02-19 03:03:44Z raasch |
---|
| 59 | ! check for collision_kernel and curvature_solution_effects |
---|
| 60 | ! |
---|
[810] | 61 | ! 809 2012-01-30 13:32:58Z maronga |
---|
| 62 | ! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives |
---|
| 63 | ! |
---|
[808] | 64 | ! 807 2012-01-25 11:53:51Z maronga |
---|
| 65 | ! New cpp directive "__check" implemented which is used by check_namelist_files |
---|
| 66 | ! |
---|
[775] | 67 | ! 774 2011-10-27 13:34:16Z letzel |
---|
| 68 | ! bugfix for prescribed u,v-profiles |
---|
| 69 | ! |
---|
[768] | 70 | ! 767 2011-10-14 06:39:12Z raasch |
---|
| 71 | ! Calculating u,v-profiles from given profiles by linear interpolation. |
---|
| 72 | ! bugfix: dirichlet_0 conditions for ug/vg moved from init_3d_model to here |
---|
| 73 | ! |
---|
[708] | 74 | ! 707 2011-03-29 11:39:40Z raasch |
---|
| 75 | ! setting of bc_lr/ns_dirrad/raddir |
---|
| 76 | ! |
---|
| 77 | ! 689 2011-02-20 19:31:12z gryschka |
---|
[690] | 78 | ! Bugfix for some logical expressions |
---|
| 79 | ! (syntax was not compatible with all compilers) |
---|
[687] | 80 | ! |
---|
[690] | 81 | ! 680 2011-02-04 23:16:06Z gryschka |
---|
[681] | 82 | ! init_vortex is not allowed with volume_flow_control |
---|
[668] | 83 | ! |
---|
[674] | 84 | ! 673 2011-01-18 16:19:48Z suehring |
---|
| 85 | ! Declaration of ws_scheme_sca and ws_scheme_mom added (moved from advec_ws). |
---|
| 86 | ! |
---|
[668] | 87 | ! 667 2010-12-23 12:06:00Z suehring/gryschka |
---|
[667] | 88 | ! Exchange of parameters between ocean and atmosphere via PE0 |
---|
| 89 | ! Check for illegal combination of ws-scheme and timestep scheme. |
---|
| 90 | ! Check for topography and ws-scheme. |
---|
| 91 | ! Check for not cyclic boundary conditions in combination with ws-scheme and |
---|
| 92 | ! loop_optimization = 'vector'. |
---|
| 93 | ! Check for call_psolver_at_all_substeps and ws-scheme for momentum_advec. |
---|
| 94 | ! Different processor/grid topology in atmosphere and ocean is now allowed! |
---|
| 95 | ! Bugfixes in checking for conserve_volume_flow_mode |
---|
[601] | 96 | ! 600 2010-11-24 16:10:51Z raasch |
---|
| 97 | ! change due to new default value of surface_waterflux |
---|
[581] | 98 | ! 580 2010-10-05 13:59:11Z heinze |
---|
[601] | 99 | ! renaming of ws_vertical_gradient_level to subs_vertical_gradient_level |
---|
[581] | 100 | ! |
---|
[568] | 101 | ! 567 2010-10-01 10:46:30Z helmke |
---|
| 102 | ! calculating masks changed |
---|
| 103 | ! |
---|
[565] | 104 | ! 564 2010-09-30 13:18:59Z helmke |
---|
| 105 | ! palm message identifiers of masked output changed, 20 replaced by max_masks |
---|
| 106 | ! |
---|
[554] | 107 | ! 553 2010-09-01 14:09:06Z weinreis |
---|
| 108 | ! masks is calculated and removed from inipar |
---|
[532] | 109 | ! |
---|
| 110 | ! 531 2010-04-21 06:47:21Z heinze |
---|
| 111 | ! Bugfix: unit of hyp changed to dbar |
---|
[392] | 112 | ! |
---|
[525] | 113 | ! 524 2010-03-30 02:04:51Z raasch |
---|
| 114 | ! Bugfix: "/" in netcdf profile variable names replaced by ":" |
---|
| 115 | ! |
---|
[494] | 116 | ! 493 2010-03-01 08:30:24Z raasch |
---|
| 117 | ! netcdf_data_format is checked |
---|
| 118 | ! |
---|
[449] | 119 | ! 411 2009-12-11 14:15:58Z heinze |
---|
| 120 | ! Enabled passive scalar/humidity wall fluxes for non-flat topography |
---|
| 121 | ! Initialization of large scale vertical motion (subsidence/ascent) |
---|
| 122 | ! |
---|
| 123 | ! 410 2009-12-04 17:05:40Z letzel |
---|
| 124 | ! masked data output |
---|
| 125 | ! |
---|
[392] | 126 | ! 388 2009-09-23 09:40:33Z raasch |
---|
[388] | 127 | ! Check profiles fpr prho and hyp. |
---|
[376] | 128 | ! Bugfix: output of averaged 2d/3d quantities requires that an avaraging |
---|
| 129 | ! interval has been set, respective error message is included |
---|
[366] | 130 | ! bc_lr_cyc and bc_ns_cyc are set, |
---|
[328] | 131 | ! initializing_actions='read_data_for_recycling' renamed to 'cyclic_fill' |
---|
[308] | 132 | ! Check for illegal entries in section_xy|xz|yz that exceed nz+1|ny+1|nx+1 |
---|
[291] | 133 | ! Coupling with independent precursor runs. |
---|
[264] | 134 | ! Check particle_color, particle_dvrpsize, color_interval, dvrpsize_interval |
---|
[232] | 135 | ! Bugfix: pressure included for profile output |
---|
[240] | 136 | ! Check pressure gradient conditions |
---|
[256] | 137 | ! topography_grid_convention moved from user_check_parameters |
---|
| 138 | ! 'single_street_canyon' |
---|
[367] | 139 | ! Added shf* and qsws* to the list of available output data |
---|
[226] | 140 | ! |
---|
| 141 | ! 222 2009-01-12 16:04:16Z letzel |
---|
[217] | 142 | ! +user_check_parameters |
---|
[213] | 143 | ! Output of messages replaced by message handling routine. |
---|
[206] | 144 | ! Implementation of an MPI-1 coupling: replaced myid with target_id, |
---|
| 145 | ! deleted __mpi2 directives |
---|
[222] | 146 | ! Check that PALM is called with mrun -K parallel for coupling |
---|
[198] | 147 | ! |
---|
| 148 | ! 197 2008-09-16 15:29:03Z raasch |
---|
[177] | 149 | ! Bug fix: Construction of vertical profiles when 10 gradients have been |
---|
[181] | 150 | ! specified in the parameter list (ug, vg, pt, q, sa, lad) |
---|
| 151 | ! |
---|
| 152 | ! Strict grid matching along z is not needed for mg-solver. |
---|
[153] | 153 | ! Leaf area density (LAD) explicitly set to its surface value at k=0 |
---|
[151] | 154 | ! Case of reading data for recycling included in initializing_actions, |
---|
[197] | 155 | ! check of turbulent_inflow and calculation of recycling_plane. |
---|
| 156 | ! q*2 profile added |
---|
[139] | 157 | ! |
---|
| 158 | ! 138 2007-11-28 10:03:58Z letzel |
---|
[138] | 159 | ! Plant canopy added |
---|
[132] | 160 | ! Allow new case bc_uv_t = 'dirichlet_0' for channel flow. |
---|
[116] | 161 | ! Multigrid solver allows topography, checking of dt_sort_particles |
---|
[121] | 162 | ! Bugfix: initializing u_init and v_init in case of ocean runs |
---|
[110] | 163 | ! |
---|
| 164 | ! 109 2007-08-28 15:26:47Z letzel |
---|
[102] | 165 | ! Check coupling_mode and set default (obligatory) values (like boundary |
---|
[106] | 166 | ! conditions for temperature and fluxes) in case of coupled runs. |
---|
| 167 | ! +profiles for w*p* and w"e |
---|
[104] | 168 | ! Bugfix: Error message concerning output of particle concentration (pc) |
---|
| 169 | ! modified |
---|
[108] | 170 | ! More checks and more default values for coupled runs |
---|
| 171 | ! allow data_output_pr= q, wq, w"q", w*q* for humidity = .T. (instead of |
---|
| 172 | ! cloud_physics = .T.) |
---|
| 173 | ! Rayleigh damping for ocean fixed. |
---|
[109] | 174 | ! Check and, if necessary, set default value for dt_coupling |
---|
[98] | 175 | ! |
---|
| 176 | ! 97 2007-06-21 08:23:15Z raasch |
---|
[97] | 177 | ! Initial salinity profile is calculated, salinity boundary conditions are |
---|
| 178 | ! checked, |
---|
[94] | 179 | ! z_max_do1d is checked only in case of ocean = .f., |
---|
[97] | 180 | ! +initial temperature and geostrophic velocity profiles for the ocean version, |
---|
| 181 | ! use_pt_reference renamed use_reference |
---|
[77] | 182 | ! |
---|
[90] | 183 | ! 89 2007-05-25 12:08:31Z raasch |
---|
| 184 | ! Check for user-defined profiles |
---|
| 185 | ! |
---|
[77] | 186 | ! 75 2007-03-22 09:54:05Z raasch |
---|
[51] | 187 | ! "by_user" allowed as initializing action, -data_output_ts, |
---|
[63] | 188 | ! leapfrog with non-flat topography not allowed any more, loop_optimization |
---|
[75] | 189 | ! and pt_reference are checked, moisture renamed humidity, |
---|
[72] | 190 | ! output of precipitation amount/rate and roughnes length + check |
---|
[73] | 191 | ! possible negative humidities are avoided in initial profile, |
---|
[75] | 192 | ! dirichlet/neumann changed to dirichlet/radiation, etc., |
---|
| 193 | ! revision added to run_description_header |
---|
[1] | 194 | ! |
---|
[39] | 195 | ! 20 2007-02-26 00:12:32Z raasch |
---|
| 196 | ! Temperature and humidity gradients at top are now calculated for nzt+1, |
---|
| 197 | ! top_heatflux and respective boundary condition bc_pt_t is checked |
---|
| 198 | ! |
---|
[3] | 199 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 200 | ! |
---|
[1] | 201 | ! Revision 1.61 2006/08/04 14:20:25 raasch |
---|
| 202 | ! do2d_unit and do3d_unit now defined as 2d-arrays, check of |
---|
| 203 | ! use_upstream_for_tke, default value for dt_dopts, |
---|
| 204 | ! generation of file header moved from routines palm and header to here |
---|
| 205 | ! |
---|
| 206 | ! Revision 1.1 1997/08/26 06:29:23 raasch |
---|
| 207 | ! Initial revision |
---|
| 208 | ! |
---|
| 209 | ! |
---|
| 210 | ! Description: |
---|
| 211 | ! ------------ |
---|
| 212 | ! Check control parameters and deduce further quantities. |
---|
| 213 | !------------------------------------------------------------------------------! |
---|
| 214 | |
---|
| 215 | USE arrays_3d |
---|
[824] | 216 | USE cloud_parameters |
---|
[1] | 217 | USE constants |
---|
| 218 | USE control_parameters |
---|
[264] | 219 | USE dvrp_variables |
---|
[1] | 220 | USE grid_variables |
---|
| 221 | USE indices |
---|
| 222 | USE model_1d |
---|
| 223 | USE netcdf_control |
---|
| 224 | USE particle_attributes |
---|
| 225 | USE pegrid |
---|
| 226 | USE profil_parameter |
---|
[411] | 227 | USE subsidence_mod |
---|
[1] | 228 | USE statistics |
---|
| 229 | USE transpose_indices |
---|
| 230 | |
---|
| 231 | IMPLICIT NONE |
---|
| 232 | |
---|
| 233 | CHARACTER (LEN=1) :: sq |
---|
| 234 | CHARACTER (LEN=6) :: var |
---|
| 235 | CHARACTER (LEN=7) :: unit |
---|
| 236 | CHARACTER (LEN=8) :: date |
---|
| 237 | CHARACTER (LEN=10) :: time |
---|
[102] | 238 | CHARACTER (LEN=40) :: coupling_string |
---|
[1] | 239 | CHARACTER (LEN=100) :: action |
---|
| 240 | |
---|
[767] | 241 | INTEGER :: i, ilen, intervals, iremote = 0, iter, j, k, kk, nnxh, nnyh, & |
---|
| 242 | position, prec |
---|
[1] | 243 | LOGICAL :: found, ldum |
---|
[291] | 244 | REAL :: gradient, maxn, maxp, remote = 0.0, & |
---|
| 245 | simulation_time_since_reference |
---|
[1] | 246 | |
---|
| 247 | ! |
---|
| 248 | !-- Warning, if host is not set |
---|
| 249 | IF ( host(1:1) == ' ' ) THEN |
---|
[213] | 250 | message_string = '"host" is not set. Please check that environment ' // & |
---|
| 251 | 'variable "localhost" & is set before running PALM' |
---|
[226] | 252 | CALL message( 'check_parameters', 'PA0001', 0, 0, 0, 6, 0 ) |
---|
[1] | 253 | ENDIF |
---|
| 254 | |
---|
| 255 | ! |
---|
[102] | 256 | !-- Check the coupling mode |
---|
| 257 | IF ( coupling_mode /= 'uncoupled' .AND. & |
---|
| 258 | coupling_mode /= 'atmosphere_to_ocean' .AND. & |
---|
| 259 | coupling_mode /= 'ocean_to_atmosphere' ) THEN |
---|
[213] | 260 | message_string = 'illegal coupling mode: ' // TRIM( coupling_mode ) |
---|
[226] | 261 | CALL message( 'check_parameters', 'PA0002', 1, 2, 0, 6, 0 ) |
---|
[102] | 262 | ENDIF |
---|
| 263 | |
---|
| 264 | ! |
---|
[108] | 265 | !-- Check dt_coupling, restart_time, dt_restart, end_time, dx, dy, nx and ny |
---|
[667] | 266 | IF ( coupling_mode /= 'uncoupled') THEN |
---|
[213] | 267 | |
---|
[108] | 268 | IF ( dt_coupling == 9999999.9 ) THEN |
---|
[213] | 269 | message_string = 'dt_coupling is not set but required for coup' // & |
---|
| 270 | 'ling mode "' // TRIM( coupling_mode ) // '"' |
---|
[226] | 271 | CALL message( 'check_parameters', 'PA0003', 1, 2, 0, 6, 0 ) |
---|
[108] | 272 | ENDIF |
---|
[213] | 273 | |
---|
[206] | 274 | #if defined( __parallel ) |
---|
[807] | 275 | |
---|
| 276 | ! |
---|
| 277 | !-- NOTE: coupled runs have not been implemented in the check_namelist_files |
---|
| 278 | !-- program. |
---|
| 279 | !-- check_namelist_files will need the following information of the other |
---|
| 280 | !-- model (atmosphere/ocean). |
---|
[845] | 281 | ! dt_coupling = remote |
---|
| 282 | ! dt_max = remote |
---|
| 283 | ! restart_time = remote |
---|
| 284 | ! dt_restart= remote |
---|
| 285 | ! simulation_time_since_reference = remote |
---|
| 286 | ! dx = remote |
---|
[807] | 287 | |
---|
| 288 | |
---|
[809] | 289 | #if ! defined( __check ) |
---|
[667] | 290 | IF ( myid == 0 ) THEN |
---|
| 291 | CALL MPI_SEND( dt_coupling, 1, MPI_REAL, target_id, 11, comm_inter, & |
---|
| 292 | ierr ) |
---|
| 293 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 11, comm_inter, & |
---|
| 294 | status, ierr ) |
---|
| 295 | ENDIF |
---|
| 296 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[807] | 297 | #endif |
---|
[108] | 298 | IF ( dt_coupling /= remote ) THEN |
---|
[213] | 299 | WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), & |
---|
| 300 | '": dt_coupling = ', dt_coupling, '& is not equal to ', & |
---|
| 301 | 'dt_coupling_remote = ', remote |
---|
[226] | 302 | CALL message( 'check_parameters', 'PA0004', 1, 2, 0, 6, 0 ) |
---|
[108] | 303 | ENDIF |
---|
[109] | 304 | IF ( dt_coupling <= 0.0 ) THEN |
---|
[809] | 305 | #if ! defined( __check ) |
---|
[667] | 306 | IF ( myid == 0 ) THEN |
---|
| 307 | CALL MPI_SEND( dt_max, 1, MPI_REAL, target_id, 19, comm_inter, ierr ) |
---|
| 308 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 19, comm_inter, & |
---|
| 309 | status, ierr ) |
---|
| 310 | ENDIF |
---|
| 311 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[807] | 312 | #endif |
---|
[109] | 313 | dt_coupling = MAX( dt_max, remote ) |
---|
[213] | 314 | WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), & |
---|
| 315 | '": dt_coupling <= 0.0 & is not allowed and is reset to ', & |
---|
| 316 | 'MAX(dt_max(A,O)) = ', dt_coupling |
---|
[226] | 317 | CALL message( 'check_parameters', 'PA0005', 0, 1, 0, 6, 0 ) |
---|
[109] | 318 | ENDIF |
---|
[809] | 319 | #if ! defined( __check ) |
---|
[667] | 320 | IF ( myid == 0 ) THEN |
---|
| 321 | CALL MPI_SEND( restart_time, 1, MPI_REAL, target_id, 12, comm_inter, & |
---|
| 322 | ierr ) |
---|
| 323 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 12, comm_inter, & |
---|
| 324 | status, ierr ) |
---|
| 325 | ENDIF |
---|
| 326 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[807] | 327 | #endif |
---|
[108] | 328 | IF ( restart_time /= remote ) THEN |
---|
[213] | 329 | WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), & |
---|
| 330 | '": restart_time = ', restart_time, '& is not equal to ', & |
---|
| 331 | 'restart_time_remote = ', remote |
---|
[226] | 332 | CALL message( 'check_parameters', 'PA0006', 1, 2, 0, 6, 0 ) |
---|
[108] | 333 | ENDIF |
---|
[809] | 334 | #if ! defined( __check ) |
---|
[667] | 335 | IF ( myid == 0 ) THEN |
---|
| 336 | CALL MPI_SEND( dt_restart, 1, MPI_REAL, target_id, 13, comm_inter, & |
---|
| 337 | ierr ) |
---|
| 338 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 13, comm_inter, & |
---|
| 339 | status, ierr ) |
---|
| 340 | ENDIF |
---|
| 341 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[807] | 342 | #endif |
---|
[108] | 343 | IF ( dt_restart /= remote ) THEN |
---|
[213] | 344 | WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), & |
---|
| 345 | '": dt_restart = ', dt_restart, '& is not equal to ', & |
---|
| 346 | 'dt_restart_remote = ', remote |
---|
[226] | 347 | CALL message( 'check_parameters', 'PA0007', 1, 2, 0, 6, 0 ) |
---|
[108] | 348 | ENDIF |
---|
[213] | 349 | |
---|
[291] | 350 | simulation_time_since_reference = end_time - coupling_start_time |
---|
[809] | 351 | #if ! defined( __check ) |
---|
[667] | 352 | IF ( myid == 0 ) THEN |
---|
| 353 | CALL MPI_SEND( simulation_time_since_reference, 1, MPI_REAL, target_id, & |
---|
| 354 | 14, comm_inter, ierr ) |
---|
| 355 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 14, comm_inter, & |
---|
| 356 | status, ierr ) |
---|
| 357 | ENDIF |
---|
| 358 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[807] | 359 | #endif |
---|
[291] | 360 | IF ( simulation_time_since_reference /= remote ) THEN |
---|
[213] | 361 | WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), & |
---|
[291] | 362 | '": simulation_time_since_reference = ', & |
---|
| 363 | simulation_time_since_reference, '& is not equal to ', & |
---|
| 364 | 'simulation_time_since_reference_remote = ', remote |
---|
[226] | 365 | CALL message( 'check_parameters', 'PA0008', 1, 2, 0, 6, 0 ) |
---|
[108] | 366 | ENDIF |
---|
[213] | 367 | |
---|
[809] | 368 | #if ! defined( __check ) |
---|
[667] | 369 | IF ( myid == 0 ) THEN |
---|
| 370 | CALL MPI_SEND( dx, 1, MPI_REAL, target_id, 15, comm_inter, ierr ) |
---|
| 371 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 15, comm_inter, & |
---|
| 372 | status, ierr ) |
---|
[108] | 373 | ENDIF |
---|
[667] | 374 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[213] | 375 | |
---|
[807] | 376 | #endif |
---|
[667] | 377 | IF ( coupling_mode == 'atmosphere_to_ocean') THEN |
---|
| 378 | |
---|
| 379 | IF ( dx < remote ) THEN |
---|
| 380 | WRITE( message_string, * ) 'coupling mode "', & |
---|
| 381 | TRIM( coupling_mode ), & |
---|
| 382 | '": dx in Atmosphere is not equal to or not larger then dx in ocean' |
---|
| 383 | CALL message( 'check_parameters', 'PA0009', 1, 2, 0, 6, 0 ) |
---|
| 384 | ENDIF |
---|
| 385 | |
---|
| 386 | IF ( (nx_a+1)*dx /= (nx_o+1)*remote ) THEN |
---|
| 387 | WRITE( message_string, * ) 'coupling mode "', & |
---|
| 388 | TRIM( coupling_mode ), & |
---|
| 389 | '": Domain size in x-direction is not equal in ocean and atmosphere' |
---|
| 390 | CALL message( 'check_parameters', 'PA0010', 1, 2, 0, 6, 0 ) |
---|
| 391 | ENDIF |
---|
| 392 | |
---|
[108] | 393 | ENDIF |
---|
[213] | 394 | |
---|
[809] | 395 | #if ! defined( __check ) |
---|
[667] | 396 | IF ( myid == 0) THEN |
---|
| 397 | CALL MPI_SEND( dy, 1, MPI_REAL, target_id, 16, comm_inter, ierr ) |
---|
| 398 | CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 16, comm_inter, & |
---|
| 399 | status, ierr ) |
---|
[108] | 400 | ENDIF |
---|
[667] | 401 | CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr) |
---|
[807] | 402 | #endif |
---|
[667] | 403 | IF ( coupling_mode == 'atmosphere_to_ocean') THEN |
---|
| 404 | |
---|
| 405 | IF ( dy < remote ) THEN |
---|
| 406 | WRITE( message_string, * ) 'coupling mode "', & |
---|
| 407 | TRIM( coupling_mode ), & |
---|
| 408 | '": dy in Atmosphere is not equal to or not larger then dy in ocean' |
---|
| 409 | CALL message( 'check_parameters', 'PA0011', 1, 2, 0, 6, 0 ) |
---|
| 410 | ENDIF |
---|
| 411 | |
---|
| 412 | IF ( (ny_a+1)*dy /= (ny_o+1)*remote ) THEN |
---|
| 413 | WRITE( message_string, * ) 'coupling mode "', & |
---|
| 414 | TRIM( coupling_mode ), & |
---|
| 415 | '": Domain size in y-direction is not equal in ocean and atmosphere' |
---|
| 416 | CALL message( 'check_parameters', 'PA0012', 1, 2, 0, 6, 0 ) |
---|
| 417 | ENDIF |
---|
| 418 | |
---|
| 419 | IF ( MOD(nx_o+1,nx_a+1) /= 0 ) THEN |
---|
| 420 | WRITE( message_string, * ) 'coupling mode "', & |
---|
| 421 | TRIM( coupling_mode ), & |
---|
| 422 | '": nx+1 in ocean is not divisible without remainder with nx+1 in', & |
---|
| 423 | ' atmosphere' |
---|
| 424 | CALL message( 'check_parameters', 'PA0339', 1, 2, 0, 6, 0 ) |
---|
| 425 | ENDIF |
---|
| 426 | |
---|
| 427 | IF ( MOD(ny_o+1,ny_a+1) /= 0 ) THEN |
---|
| 428 | WRITE( message_string, * ) 'coupling mode "', & |
---|
| 429 | TRIM( coupling_mode ), & |
---|
| 430 | '": ny+1 in ocean is not divisible without remainder with ny+1 in', & |
---|
| 431 | ' atmosphere' |
---|
| 432 | CALL message( 'check_parameters', 'PA0340', 1, 2, 0, 6, 0 ) |
---|
| 433 | ENDIF |
---|
| 434 | |
---|
[108] | 435 | ENDIF |
---|
[222] | 436 | #else |
---|
| 437 | WRITE( message_string, * ) 'coupling requires PALM to be called with', & |
---|
| 438 | ' ''mrun -K parallel''' |
---|
[226] | 439 | CALL message( 'check_parameters', 'PA0141', 1, 2, 0, 6, 0 ) |
---|
[108] | 440 | #endif |
---|
| 441 | ENDIF |
---|
| 442 | |
---|
[809] | 443 | #if defined( __parallel ) && ! defined ( __check ) |
---|
[108] | 444 | ! |
---|
| 445 | !-- Exchange via intercommunicator |
---|
[667] | 446 | IF ( coupling_mode == 'atmosphere_to_ocean' .AND. myid == 0 ) THEN |
---|
[206] | 447 | CALL MPI_SEND( humidity, 1, MPI_LOGICAL, target_id, 19, comm_inter, & |
---|
| 448 | ierr ) |
---|
[667] | 449 | ELSEIF ( coupling_mode == 'ocean_to_atmosphere' .AND. myid == 0) THEN |
---|
[206] | 450 | CALL MPI_RECV( humidity_remote, 1, MPI_LOGICAL, target_id, 19, & |
---|
| 451 | comm_inter, status, ierr ) |
---|
[108] | 452 | ENDIF |
---|
[667] | 453 | CALL MPI_BCAST( humidity_remote, 1, MPI_LOGICAL, 0, comm2d, ierr) |
---|
| 454 | |
---|
[108] | 455 | #endif |
---|
| 456 | |
---|
| 457 | |
---|
| 458 | ! |
---|
[1] | 459 | !-- Generate the file header which is used as a header for most of PALM's |
---|
| 460 | !-- output files |
---|
| 461 | CALL DATE_AND_TIME( date, time ) |
---|
| 462 | run_date = date(7:8)//'-'//date(5:6)//'-'//date(3:4) |
---|
| 463 | run_time = time(1:2)//':'//time(3:4)//':'//time(5:6) |
---|
[102] | 464 | IF ( coupling_mode == 'uncoupled' ) THEN |
---|
| 465 | coupling_string = '' |
---|
| 466 | ELSEIF ( coupling_mode == 'atmosphere_to_ocean' ) THEN |
---|
| 467 | coupling_string = ' coupled (atmosphere)' |
---|
| 468 | ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN |
---|
| 469 | coupling_string = ' coupled (ocean)' |
---|
| 470 | ENDIF |
---|
[1] | 471 | |
---|
[102] | 472 | WRITE ( run_description_header, & |
---|
| 473 | '(A,2X,A,2X,A,A,A,I2.2,A,2X,A,A,2X,A,1X,A)' ) & |
---|
| 474 | TRIM( version ), TRIM( revision ), 'run: ', & |
---|
| 475 | TRIM( run_identifier ), '.', runnr, TRIM( coupling_string ), & |
---|
| 476 | 'host: ', TRIM( host ), run_date, run_time |
---|
[1] | 477 | |
---|
| 478 | ! |
---|
[63] | 479 | !-- Check the general loop optimization method |
---|
| 480 | IF ( loop_optimization == 'default' ) THEN |
---|
| 481 | IF ( host(1:3) == 'nec' ) THEN |
---|
| 482 | loop_optimization = 'vector' |
---|
| 483 | ELSE |
---|
| 484 | loop_optimization = 'cache' |
---|
| 485 | ENDIF |
---|
| 486 | ENDIF |
---|
| 487 | |
---|
[1015] | 488 | SELECT CASE ( TRIM( loop_optimization ) ) |
---|
| 489 | |
---|
[1019] | 490 | CASE ( 'acc', 'cache', 'vector' ) |
---|
[1015] | 491 | CONTINUE |
---|
| 492 | |
---|
| 493 | CASE DEFAULT |
---|
| 494 | message_string = 'illegal value given for loop_optimization: "' // & |
---|
| 495 | TRIM( loop_optimization ) // '"' |
---|
| 496 | CALL message( 'check_parameters', 'PA0013', 1, 2, 0, 6, 0 ) |
---|
| 497 | |
---|
| 498 | END SELECT |
---|
| 499 | |
---|
[63] | 500 | ! |
---|
[1] | 501 | !-- Check topography setting (check for illegal parameter combinations) |
---|
| 502 | IF ( topography /= 'flat' ) THEN |
---|
| 503 | action = ' ' |
---|
[861] | 504 | IF ( scalar_advec /= 'pw-scheme' .AND. scalar_advec /= 'ws-scheme') THEN |
---|
[1] | 505 | WRITE( action, '(A,A)' ) 'scalar_advec = ', scalar_advec |
---|
| 506 | ENDIF |
---|
[861] | 507 | IF ( momentum_advec /= 'pw-scheme' .AND. momentum_advec /= 'ws-scheme' ) & |
---|
| 508 | THEN |
---|
[1] | 509 | WRITE( action, '(A,A)' ) 'momentum_advec = ', momentum_advec |
---|
| 510 | ENDIF |
---|
[114] | 511 | IF ( psolver == 'sor' ) THEN |
---|
[1] | 512 | WRITE( action, '(A,A)' ) 'psolver = ', psolver |
---|
| 513 | ENDIF |
---|
| 514 | IF ( sloping_surface ) THEN |
---|
| 515 | WRITE( action, '(A)' ) 'sloping surface = .TRUE.' |
---|
| 516 | ENDIF |
---|
| 517 | IF ( galilei_transformation ) THEN |
---|
| 518 | WRITE( action, '(A)' ) 'galilei_transformation = .TRUE.' |
---|
| 519 | ENDIF |
---|
| 520 | IF ( cloud_physics ) THEN |
---|
| 521 | WRITE( action, '(A)' ) 'cloud_physics = .TRUE.' |
---|
| 522 | ENDIF |
---|
| 523 | IF ( cloud_droplets ) THEN |
---|
| 524 | WRITE( action, '(A)' ) 'cloud_droplets = .TRUE.' |
---|
| 525 | ENDIF |
---|
| 526 | IF ( .NOT. prandtl_layer ) THEN |
---|
| 527 | WRITE( action, '(A)' ) 'prandtl_layer = .FALSE.' |
---|
| 528 | ENDIF |
---|
| 529 | IF ( action /= ' ' ) THEN |
---|
[213] | 530 | message_string = 'a non-flat topography does not allow ' // & |
---|
| 531 | TRIM( action ) |
---|
[226] | 532 | CALL message( 'check_parameters', 'PA0014', 1, 2, 0, 6, 0 ) |
---|
[1] | 533 | ENDIF |
---|
[256] | 534 | ! |
---|
| 535 | !-- In case of non-flat topography, check whether the convention how to |
---|
| 536 | !-- define the topography grid has been set correctly, or whether the default |
---|
| 537 | !-- is applicable. If this is not possible, abort. |
---|
| 538 | IF ( TRIM( topography_grid_convention ) == ' ' ) THEN |
---|
| 539 | IF ( TRIM( topography ) /= 'single_building' .AND. & |
---|
| 540 | TRIM( topography ) /= 'single_street_canyon' .AND. & |
---|
| 541 | TRIM( topography ) /= 'read_from_file' ) THEN |
---|
| 542 | !-- The default value is not applicable here, because it is only valid |
---|
| 543 | !-- for the two standard cases 'single_building' and 'read_from_file' |
---|
| 544 | !-- defined in init_grid. |
---|
| 545 | WRITE( message_string, * ) & |
---|
| 546 | 'The value for "topography_grid_convention" ', & |
---|
| 547 | 'is not set. Its default value is & only valid for ', & |
---|
| 548 | '"topography" = ''single_building'', ', & |
---|
| 549 | '''single_street_canyon'' & or ''read_from_file''.', & |
---|
| 550 | ' & Choose ''cell_edge'' or ''cell_center''.' |
---|
| 551 | CALL message( 'user_check_parameters', 'PA0239', 1, 2, 0, 6, 0 ) |
---|
| 552 | ELSE |
---|
| 553 | !-- The default value is applicable here. |
---|
| 554 | !-- Set convention according to topography. |
---|
| 555 | IF ( TRIM( topography ) == 'single_building' .OR. & |
---|
| 556 | TRIM( topography ) == 'single_street_canyon' ) THEN |
---|
| 557 | topography_grid_convention = 'cell_edge' |
---|
| 558 | ELSEIF ( TRIM( topography ) == 'read_from_file' ) THEN |
---|
| 559 | topography_grid_convention = 'cell_center' |
---|
| 560 | ENDIF |
---|
| 561 | ENDIF |
---|
| 562 | ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND. & |
---|
| 563 | TRIM( topography_grid_convention ) /= 'cell_center' ) THEN |
---|
| 564 | WRITE( message_string, * ) & |
---|
| 565 | 'The value for "topography_grid_convention" is ', & |
---|
| 566 | 'not recognized. & Choose ''cell_edge'' or ''cell_center''.' |
---|
| 567 | CALL message( 'user_check_parameters', 'PA0240', 1, 2, 0, 6, 0 ) |
---|
| 568 | ENDIF |
---|
| 569 | |
---|
[1] | 570 | ENDIF |
---|
[94] | 571 | |
---|
[1] | 572 | ! |
---|
[94] | 573 | !-- Check ocean setting |
---|
| 574 | IF ( ocean ) THEN |
---|
[332] | 575 | |
---|
[94] | 576 | action = ' ' |
---|
| 577 | IF ( action /= ' ' ) THEN |
---|
[213] | 578 | message_string = 'ocean = .T. does not allow ' // TRIM( action ) |
---|
[226] | 579 | CALL message( 'check_parameters', 'PA0015', 1, 2, 0, 6, 0 ) |
---|
[94] | 580 | ENDIF |
---|
| 581 | |
---|
[332] | 582 | ELSEIF ( TRIM( coupling_mode ) == 'uncoupled' .AND. & |
---|
| 583 | TRIM( coupling_char ) == '_O' ) THEN |
---|
[343] | 584 | |
---|
[94] | 585 | ! |
---|
[332] | 586 | !-- Check whether an (uncoupled) atmospheric run has been declared as an |
---|
| 587 | !-- ocean run (this setting is done via mrun-option -y) |
---|
[343] | 588 | |
---|
[291] | 589 | message_string = 'ocean = .F. does not allow coupling_char = "' // & |
---|
| 590 | TRIM( coupling_char ) // '" set by mrun-option "-y"' |
---|
| 591 | CALL message( 'check_parameters', 'PA0317', 1, 2, 0, 6, 0 ) |
---|
[332] | 592 | |
---|
[291] | 593 | ENDIF |
---|
| 594 | |
---|
| 595 | ! |
---|
[1] | 596 | !-- Check whether there are any illegal values |
---|
| 597 | !-- Pressure solver: |
---|
| 598 | IF ( psolver /= 'poisfft' .AND. psolver /= 'poisfft_hybrid' .AND. & |
---|
| 599 | psolver /= 'sor' .AND. psolver /= 'multigrid' ) THEN |
---|
[213] | 600 | message_string = 'unknown solver for perturbation pressure: psolver' // & |
---|
| 601 | ' = "' // TRIM( psolver ) // '"' |
---|
[226] | 602 | CALL message( 'check_parameters', 'PA0016', 1, 2, 0, 6, 0 ) |
---|
[1] | 603 | ENDIF |
---|
| 604 | |
---|
| 605 | #if defined( __parallel ) |
---|
| 606 | IF ( psolver == 'poisfft_hybrid' .AND. pdims(2) /= 1 ) THEN |
---|
[213] | 607 | message_string = 'psolver = "' // TRIM( psolver ) // '" only works ' // & |
---|
| 608 | 'for a 1d domain-decomposition along x & please do' // & |
---|
| 609 | ' not set npey/=1 in the parameter file' |
---|
[226] | 610 | CALL message( 'check_parameters', 'PA0017', 1, 2, 0, 6, 0 ) |
---|
[1] | 611 | ENDIF |
---|
| 612 | #else |
---|
| 613 | IF ( psolver == 'poisfft_hybrid' ) THEN |
---|
[213] | 614 | message_string = 'psolver = "' // TRIM( psolver ) // '" only works' // & |
---|
| 615 | ' for a parallel environment' |
---|
[226] | 616 | CALL message( 'check_parameters', 'PA0019', 1, 2, 0, 6, 0 ) |
---|
[1] | 617 | ENDIF |
---|
| 618 | #endif |
---|
| 619 | |
---|
| 620 | IF ( psolver == 'multigrid' ) THEN |
---|
| 621 | IF ( cycle_mg == 'w' ) THEN |
---|
| 622 | gamma_mg = 2 |
---|
| 623 | ELSEIF ( cycle_mg == 'v' ) THEN |
---|
| 624 | gamma_mg = 1 |
---|
| 625 | ELSE |
---|
[213] | 626 | message_string = 'unknown multigrid cycle: cycle_mg = "' // & |
---|
| 627 | TRIM( cycle_mg ) // '"' |
---|
[226] | 628 | CALL message( 'check_parameters', 'PA0020', 1, 2, 0, 6, 0 ) |
---|
[1] | 629 | ENDIF |
---|
| 630 | ENDIF |
---|
| 631 | |
---|
| 632 | IF ( fft_method /= 'singleton-algorithm' .AND. & |
---|
| 633 | fft_method /= 'temperton-algorithm' .AND. & |
---|
| 634 | fft_method /= 'system-specific' ) THEN |
---|
[213] | 635 | message_string = 'unknown fft-algorithm: fft_method = "' // & |
---|
| 636 | TRIM( fft_method ) // '"' |
---|
[226] | 637 | CALL message( 'check_parameters', 'PA0021', 1, 2, 0, 6, 0 ) |
---|
[1] | 638 | ENDIF |
---|
[667] | 639 | |
---|
| 640 | IF( momentum_advec == 'ws-scheme' .AND. & |
---|
[688] | 641 | .NOT. call_psolver_at_all_substeps ) THEN |
---|
[667] | 642 | message_string = 'psolver must be called at each RK3 substep when "'//& |
---|
| 643 | TRIM(momentum_advec) // ' "is used for momentum_advec' |
---|
[685] | 644 | CALL message( 'check_parameters', 'PA0344', 1, 2, 0, 6, 0 ) |
---|
[667] | 645 | END IF |
---|
[1] | 646 | ! |
---|
| 647 | !-- Advection schemes: |
---|
[1001] | 648 | IF ( momentum_advec /= 'pw-scheme' .AND. momentum_advec /= 'ws-scheme' ) & |
---|
| 649 | THEN |
---|
[214] | 650 | message_string = 'unknown advection scheme: momentum_advec = "' // & |
---|
| 651 | TRIM( momentum_advec ) // '"' |
---|
[226] | 652 | CALL message( 'check_parameters', 'PA0022', 1, 2, 0, 6, 0 ) |
---|
[1] | 653 | ENDIF |
---|
[1001] | 654 | IF ( ( momentum_advec == 'ws-scheme' .OR. scalar_advec == 'ws-scheme' ) & |
---|
| 655 | .AND. ( timestep_scheme == 'euler' .OR. & |
---|
| 656 | timestep_scheme == 'runge-kutta-2' ) ) & |
---|
| 657 | THEN |
---|
[667] | 658 | message_string = 'momentum_advec or scalar_advec = "' & |
---|
| 659 | // TRIM( momentum_advec ) // '" is not allowed with timestep_scheme = "' // & |
---|
| 660 | TRIM( timestep_scheme ) // '"' |
---|
[226] | 661 | CALL message( 'check_parameters', 'PA0023', 1, 2, 0, 6, 0 ) |
---|
[1] | 662 | ENDIF |
---|
[667] | 663 | IF ( scalar_advec /= 'pw-scheme' .AND. scalar_advec /= 'ws-scheme' .AND. & |
---|
[1001] | 664 | scalar_advec /= 'bc-scheme' ) & |
---|
| 665 | THEN |
---|
[214] | 666 | message_string = 'unknown advection scheme: scalar_advec = "' // & |
---|
| 667 | TRIM( scalar_advec ) // '"' |
---|
[226] | 668 | CALL message( 'check_parameters', 'PA0024', 1, 2, 0, 6, 0 ) |
---|
[1] | 669 | ENDIF |
---|
[1019] | 670 | IF ( scalar_advec == 'bc-scheme' .AND. loop_optimization == 'cache' ) & |
---|
| 671 | THEN |
---|
| 672 | message_string = 'advection_scheme scalar_advec = "' & |
---|
| 673 | // TRIM( scalar_advec ) // '" not implemented for & loop_optimization = "' // & |
---|
| 674 | TRIM( loop_optimization ) // '"' |
---|
| 675 | CALL message( 'check_parameters', 'PA0026', 1, 2, 0, 6, 0 ) |
---|
| 676 | ENDIF |
---|
[1] | 677 | |
---|
| 678 | IF ( use_sgs_for_particles .AND. .NOT. use_upstream_for_tke ) THEN |
---|
| 679 | use_upstream_for_tke = .TRUE. |
---|
[214] | 680 | message_string = 'use_upstream_for_tke set .TRUE. because ' // & |
---|
| 681 | 'use_sgs_for_particles = .TRUE.' |
---|
[226] | 682 | CALL message( 'check_parameters', 'PA0025', 0, 1, 0, 6, 0 ) |
---|
[1] | 683 | ENDIF |
---|
| 684 | |
---|
[824] | 685 | IF ( use_sgs_for_particles .AND. curvature_solution_effects ) THEN |
---|
| 686 | message_string = 'use_sgs_for_particles = .TRUE. not allowed with ' // & |
---|
| 687 | 'curvature_solution_effects = .TRUE.' |
---|
| 688 | CALL message( 'check_parameters', 'PA0349', 1, 2, 0, 6, 0 ) |
---|
| 689 | ENDIF |
---|
| 690 | |
---|
[1] | 691 | ! |
---|
[1019] | 692 | !-- Set LOGICAL switches to enhance performance |
---|
| 693 | IF ( momentum_advec == 'ws-scheme' ) ws_scheme_mom = .TRUE. |
---|
| 694 | IF ( scalar_advec == 'ws-scheme' ) ws_scheme_sca = .TRUE. |
---|
| 695 | |
---|
| 696 | ! |
---|
[1] | 697 | !-- Timestep schemes: |
---|
| 698 | SELECT CASE ( TRIM( timestep_scheme ) ) |
---|
| 699 | |
---|
| 700 | CASE ( 'euler' ) |
---|
| 701 | intermediate_timestep_count_max = 1 |
---|
| 702 | |
---|
| 703 | CASE ( 'runge-kutta-2' ) |
---|
| 704 | intermediate_timestep_count_max = 2 |
---|
| 705 | |
---|
| 706 | CASE ( 'runge-kutta-3' ) |
---|
| 707 | intermediate_timestep_count_max = 3 |
---|
| 708 | |
---|
| 709 | CASE DEFAULT |
---|
[214] | 710 | message_string = 'unknown timestep scheme: timestep_scheme = "' // & |
---|
| 711 | TRIM( timestep_scheme ) // '"' |
---|
[226] | 712 | CALL message( 'check_parameters', 'PA0027', 1, 2, 0, 6, 0 ) |
---|
[1] | 713 | |
---|
| 714 | END SELECT |
---|
| 715 | |
---|
[667] | 716 | IF ( (momentum_advec /= 'pw-scheme' .AND. momentum_advec /= 'ws-scheme') & |
---|
| 717 | .AND. timestep_scheme(1:5) == 'runge' ) THEN |
---|
[214] | 718 | message_string = 'momentum advection scheme "' // & |
---|
| 719 | TRIM( momentum_advec ) // '" & does not work with ' // & |
---|
| 720 | 'timestep_scheme "' // TRIM( timestep_scheme ) // '"' |
---|
[226] | 721 | CALL message( 'check_parameters', 'PA0029', 1, 2, 0, 6, 0 ) |
---|
[1] | 722 | ENDIF |
---|
| 723 | |
---|
[825] | 724 | ! |
---|
| 725 | !-- Collision kernels: |
---|
| 726 | SELECT CASE ( TRIM( collision_kernel ) ) |
---|
| 727 | |
---|
[828] | 728 | CASE ( 'hall', 'hall_fast' ) |
---|
[825] | 729 | hall_kernel = .TRUE. |
---|
| 730 | |
---|
| 731 | CASE ( 'palm' ) |
---|
| 732 | palm_kernel = .TRUE. |
---|
| 733 | |
---|
[828] | 734 | CASE ( 'wang', 'wang_fast' ) |
---|
[825] | 735 | wang_kernel = .TRUE. |
---|
| 736 | |
---|
| 737 | CASE ( 'none' ) |
---|
| 738 | |
---|
| 739 | |
---|
| 740 | CASE DEFAULT |
---|
| 741 | message_string = 'unknown collision kernel: collision_kernel = "' // & |
---|
| 742 | TRIM( collision_kernel ) // '"' |
---|
| 743 | CALL message( 'check_parameters', 'PA0350', 1, 2, 0, 6, 0 ) |
---|
| 744 | |
---|
| 745 | END SELECT |
---|
[828] | 746 | IF ( collision_kernel(6:9) == 'fast' ) use_kernel_tables = .TRUE. |
---|
[825] | 747 | |
---|
[147] | 748 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' .AND. & |
---|
[328] | 749 | TRIM( initializing_actions ) /= 'cyclic_fill' ) THEN |
---|
[1] | 750 | ! |
---|
[214] | 751 | !-- No restart run: several initialising actions are possible |
---|
[1] | 752 | action = initializing_actions |
---|
| 753 | DO WHILE ( TRIM( action ) /= '' ) |
---|
| 754 | position = INDEX( action, ' ' ) |
---|
| 755 | SELECT CASE ( action(1:position-1) ) |
---|
| 756 | |
---|
| 757 | CASE ( 'set_constant_profiles', 'set_1d-model_profiles', & |
---|
[46] | 758 | 'by_user', 'initialize_vortex', 'initialize_ptanom' ) |
---|
[1] | 759 | action = action(position+1:) |
---|
| 760 | |
---|
| 761 | CASE DEFAULT |
---|
[214] | 762 | message_string = 'initializing_action = "' // & |
---|
| 763 | TRIM( action ) // '" unkown or not allowed' |
---|
[226] | 764 | CALL message( 'check_parameters', 'PA0030', 1, 2, 0, 6, 0 ) |
---|
[1] | 765 | |
---|
| 766 | END SELECT |
---|
| 767 | ENDDO |
---|
| 768 | ENDIF |
---|
[214] | 769 | |
---|
[680] | 770 | IF ( TRIM( initializing_actions ) == 'initialize_vortex' .AND. & |
---|
| 771 | conserve_volume_flow ) THEN |
---|
| 772 | message_string = 'initializing_actions = "initialize_vortex"' // & |
---|
| 773 | ' ist not allowed with conserve_volume_flow = .T.' |
---|
| 774 | CALL message( 'check_parameters', 'PA0343', 1, 2, 0, 6, 0 ) |
---|
| 775 | ENDIF |
---|
| 776 | |
---|
| 777 | |
---|
[1] | 778 | IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 .AND. & |
---|
| 779 | INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 ) THEN |
---|
[214] | 780 | message_string = 'initializing_actions = "set_constant_profiles"' // & |
---|
| 781 | ' and "set_1d-model_profiles" are not allowed ' // & |
---|
| 782 | 'simultaneously' |
---|
[226] | 783 | CALL message( 'check_parameters', 'PA0031', 1, 2, 0, 6, 0 ) |
---|
[1] | 784 | ENDIF |
---|
[214] | 785 | |
---|
[46] | 786 | IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 .AND. & |
---|
| 787 | INDEX( initializing_actions, 'by_user' ) /= 0 ) THEN |
---|
[214] | 788 | message_string = 'initializing_actions = "set_constant_profiles"' // & |
---|
| 789 | ' and "by_user" are not allowed simultaneously' |
---|
[226] | 790 | CALL message( 'check_parameters', 'PA0032', 1, 2, 0, 6, 0 ) |
---|
[46] | 791 | ENDIF |
---|
[214] | 792 | |
---|
[46] | 793 | IF ( INDEX( initializing_actions, 'by_user' ) /= 0 .AND. & |
---|
| 794 | INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 ) THEN |
---|
[214] | 795 | message_string = 'initializing_actions = "by_user" and ' // & |
---|
| 796 | '"set_1d-model_profiles" are not allowed simultaneously' |
---|
[226] | 797 | CALL message( 'check_parameters', 'PA0033', 1, 2, 0, 6, 0 ) |
---|
[46] | 798 | ENDIF |
---|
[1] | 799 | |
---|
[75] | 800 | IF ( cloud_physics .AND. .NOT. humidity ) THEN |
---|
[214] | 801 | WRITE( message_string, * ) 'cloud_physics = ', cloud_physics, ' is ', & |
---|
| 802 | 'not allowed with humidity = ', humidity |
---|
[226] | 803 | CALL message( 'check_parameters', 'PA0034', 1, 2, 0, 6, 0 ) |
---|
[1] | 804 | ENDIF |
---|
| 805 | |
---|
[72] | 806 | IF ( precipitation .AND. .NOT. cloud_physics ) THEN |
---|
[214] | 807 | WRITE( message_string, * ) 'precipitation = ', precipitation, ' is ', & |
---|
| 808 | 'not allowed with cloud_physics = ', cloud_physics |
---|
[226] | 809 | CALL message( 'check_parameters', 'PA0035', 1, 2, 0, 6, 0 ) |
---|
[72] | 810 | ENDIF |
---|
| 811 | |
---|
[75] | 812 | IF ( humidity .AND. sloping_surface ) THEN |
---|
[214] | 813 | message_string = 'humidity = .TRUE. and sloping_surface = .TRUE. ' // & |
---|
| 814 | 'are not allowed simultaneously' |
---|
[226] | 815 | CALL message( 'check_parameters', 'PA0036', 1, 2, 0, 6, 0 ) |
---|
[1] | 816 | ENDIF |
---|
| 817 | |
---|
[75] | 818 | IF ( passive_scalar .AND. humidity ) THEN |
---|
[214] | 819 | message_string = 'humidity = .TRUE. and passive_scalar = .TRUE. ' // & |
---|
| 820 | 'is not allowed simultaneously' |
---|
[226] | 821 | CALL message( 'check_parameters', 'PA0038', 1, 2, 0, 6, 0 ) |
---|
[1] | 822 | ENDIF |
---|
| 823 | |
---|
[138] | 824 | IF ( plant_canopy .AND. ( drag_coefficient == 0.0 ) ) THEN |
---|
[214] | 825 | message_string = 'plant_canopy = .TRUE. requires a non-zero drag ' // & |
---|
| 826 | 'coefficient & given value is drag_coefficient = 0.0' |
---|
[226] | 827 | CALL message( 'check_parameters', 'PA0041', 1, 2, 0, 6, 0 ) |
---|
[138] | 828 | ENDIF |
---|
| 829 | |
---|
[1] | 830 | ! |
---|
| 831 | !-- In case of no model continuation run, check initialising parameters and |
---|
| 832 | !-- deduce further quantities |
---|
| 833 | IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN |
---|
| 834 | |
---|
| 835 | ! |
---|
[767] | 836 | !-- Initial profiles for 1D and 3D model, respectively (u,v further below) |
---|
[1] | 837 | pt_init = pt_surface |
---|
[94] | 838 | IF ( humidity ) q_init = q_surface |
---|
| 839 | IF ( ocean ) sa_init = sa_surface |
---|
| 840 | IF ( passive_scalar ) q_init = s_surface |
---|
[138] | 841 | IF ( plant_canopy ) lad = 0.0 |
---|
[1] | 842 | |
---|
| 843 | ! |
---|
| 844 | !-- |
---|
| 845 | !-- If required, compute initial profile of the geostrophic wind |
---|
| 846 | !-- (component ug) |
---|
| 847 | i = 1 |
---|
| 848 | gradient = 0.0 |
---|
[97] | 849 | |
---|
| 850 | IF ( .NOT. ocean ) THEN |
---|
| 851 | |
---|
| 852 | ug_vertical_gradient_level_ind(1) = 0 |
---|
| 853 | ug(0) = ug_surface |
---|
| 854 | DO k = 1, nzt+1 |
---|
[177] | 855 | IF ( i < 11 ) THEN |
---|
| 856 | IF ( ug_vertical_gradient_level(i) < zu(k) .AND. & |
---|
| 857 | ug_vertical_gradient_level(i) >= 0.0 ) THEN |
---|
| 858 | gradient = ug_vertical_gradient(i) / 100.0 |
---|
| 859 | ug_vertical_gradient_level_ind(i) = k - 1 |
---|
| 860 | i = i + 1 |
---|
[1] | 861 | ENDIF |
---|
[177] | 862 | ENDIF |
---|
[97] | 863 | IF ( gradient /= 0.0 ) THEN |
---|
| 864 | IF ( k /= 1 ) THEN |
---|
| 865 | ug(k) = ug(k-1) + dzu(k) * gradient |
---|
| 866 | ELSE |
---|
| 867 | ug(k) = ug_surface + 0.5 * dzu(k) * gradient |
---|
| 868 | ENDIF |
---|
[1] | 869 | ELSE |
---|
[97] | 870 | ug(k) = ug(k-1) |
---|
[1] | 871 | ENDIF |
---|
[97] | 872 | ENDDO |
---|
[1] | 873 | |
---|
[97] | 874 | ELSE |
---|
| 875 | |
---|
| 876 | ug_vertical_gradient_level_ind(1) = nzt+1 |
---|
[121] | 877 | ug(nzt+1) = ug_surface |
---|
[667] | 878 | DO k = nzt, nzb, -1 |
---|
[177] | 879 | IF ( i < 11 ) THEN |
---|
| 880 | IF ( ug_vertical_gradient_level(i) > zu(k) .AND. & |
---|
| 881 | ug_vertical_gradient_level(i) <= 0.0 ) THEN |
---|
| 882 | gradient = ug_vertical_gradient(i) / 100.0 |
---|
| 883 | ug_vertical_gradient_level_ind(i) = k + 1 |
---|
| 884 | i = i + 1 |
---|
[97] | 885 | ENDIF |
---|
| 886 | ENDIF |
---|
| 887 | IF ( gradient /= 0.0 ) THEN |
---|
| 888 | IF ( k /= nzt ) THEN |
---|
| 889 | ug(k) = ug(k+1) - dzu(k+1) * gradient |
---|
| 890 | ELSE |
---|
| 891 | ug(k) = ug_surface - 0.5 * dzu(k+1) * gradient |
---|
| 892 | ug(k+1) = ug_surface + 0.5 * dzu(k+1) * gradient |
---|
| 893 | ENDIF |
---|
| 894 | ELSE |
---|
| 895 | ug(k) = ug(k+1) |
---|
| 896 | ENDIF |
---|
| 897 | ENDDO |
---|
| 898 | |
---|
| 899 | ENDIF |
---|
| 900 | |
---|
[1] | 901 | ! |
---|
[767] | 902 | !-- In case of no given gradients for ug, choose a zero gradient |
---|
[97] | 903 | IF ( ug_vertical_gradient_level(1) == -9999999.9 ) THEN |
---|
[1] | 904 | ug_vertical_gradient_level(1) = 0.0 |
---|
| 905 | ENDIF |
---|
| 906 | |
---|
| 907 | ! |
---|
| 908 | !-- |
---|
| 909 | !-- If required, compute initial profile of the geostrophic wind |
---|
| 910 | !-- (component vg) |
---|
| 911 | i = 1 |
---|
| 912 | gradient = 0.0 |
---|
[97] | 913 | |
---|
| 914 | IF ( .NOT. ocean ) THEN |
---|
| 915 | |
---|
| 916 | vg_vertical_gradient_level_ind(1) = 0 |
---|
| 917 | vg(0) = vg_surface |
---|
| 918 | DO k = 1, nzt+1 |
---|
[177] | 919 | IF ( i < 11 ) THEN |
---|
| 920 | IF ( vg_vertical_gradient_level(i) < zu(k) .AND. & |
---|
| 921 | vg_vertical_gradient_level(i) >= 0.0 ) THEN |
---|
| 922 | gradient = vg_vertical_gradient(i) / 100.0 |
---|
| 923 | vg_vertical_gradient_level_ind(i) = k - 1 |
---|
| 924 | i = i + 1 |
---|
[1] | 925 | ENDIF |
---|
| 926 | ENDIF |
---|
[97] | 927 | IF ( gradient /= 0.0 ) THEN |
---|
| 928 | IF ( k /= 1 ) THEN |
---|
| 929 | vg(k) = vg(k-1) + dzu(k) * gradient |
---|
| 930 | ELSE |
---|
| 931 | vg(k) = vg_surface + 0.5 * dzu(k) * gradient |
---|
| 932 | ENDIF |
---|
[1] | 933 | ELSE |
---|
[97] | 934 | vg(k) = vg(k-1) |
---|
[1] | 935 | ENDIF |
---|
[97] | 936 | ENDDO |
---|
[1] | 937 | |
---|
[97] | 938 | ELSE |
---|
| 939 | |
---|
[121] | 940 | vg_vertical_gradient_level_ind(1) = nzt+1 |
---|
| 941 | vg(nzt+1) = vg_surface |
---|
[667] | 942 | DO k = nzt, nzb, -1 |
---|
[177] | 943 | IF ( i < 11 ) THEN |
---|
| 944 | IF ( vg_vertical_gradient_level(i) > zu(k) .AND. & |
---|
| 945 | vg_vertical_gradient_level(i) <= 0.0 ) THEN |
---|
| 946 | gradient = vg_vertical_gradient(i) / 100.0 |
---|
| 947 | vg_vertical_gradient_level_ind(i) = k + 1 |
---|
| 948 | i = i + 1 |
---|
[97] | 949 | ENDIF |
---|
| 950 | ENDIF |
---|
| 951 | IF ( gradient /= 0.0 ) THEN |
---|
| 952 | IF ( k /= nzt ) THEN |
---|
| 953 | vg(k) = vg(k+1) - dzu(k+1) * gradient |
---|
| 954 | ELSE |
---|
| 955 | vg(k) = vg_surface - 0.5 * dzu(k+1) * gradient |
---|
| 956 | vg(k+1) = vg_surface + 0.5 * dzu(k+1) * gradient |
---|
| 957 | ENDIF |
---|
| 958 | ELSE |
---|
| 959 | vg(k) = vg(k+1) |
---|
| 960 | ENDIF |
---|
| 961 | ENDDO |
---|
| 962 | |
---|
| 963 | ENDIF |
---|
| 964 | |
---|
[1] | 965 | ! |
---|
[767] | 966 | !-- In case of no given gradients for vg, choose a zero gradient |
---|
[97] | 967 | IF ( vg_vertical_gradient_level(1) == -9999999.9 ) THEN |
---|
[1] | 968 | vg_vertical_gradient_level(1) = 0.0 |
---|
| 969 | ENDIF |
---|
| 970 | |
---|
| 971 | ! |
---|
[767] | 972 | !-- Let the initial wind profiles be the calculated ug/vg profiles or |
---|
| 973 | !-- interpolate them from wind profile data (if given) |
---|
| 974 | IF ( u_profile(1) == 9999999.9 .AND. v_profile(1) == 9999999.9 ) THEN |
---|
| 975 | |
---|
| 976 | u_init = ug |
---|
| 977 | v_init = vg |
---|
| 978 | |
---|
| 979 | ELSEIF ( u_profile(1) == 0.0 .AND. v_profile(1) == 0.0 ) THEN |
---|
| 980 | |
---|
| 981 | IF ( uv_heights(1) /= 0.0 ) THEN |
---|
| 982 | message_string = 'uv_heights(1) must be 0.0' |
---|
| 983 | CALL message( 'check_parameters', 'PA0345', 1, 2, 0, 6, 0 ) |
---|
| 984 | ENDIF |
---|
| 985 | |
---|
| 986 | use_prescribed_profile_data = .TRUE. |
---|
| 987 | |
---|
| 988 | kk = 1 |
---|
| 989 | u_init(0) = 0.0 |
---|
| 990 | v_init(0) = 0.0 |
---|
| 991 | |
---|
| 992 | DO k = 1, nz+1 |
---|
| 993 | |
---|
| 994 | IF ( kk < 100 ) THEN |
---|
| 995 | DO WHILE ( uv_heights(kk+1) <= zu(k) ) |
---|
| 996 | kk = kk + 1 |
---|
| 997 | IF ( kk == 100 ) EXIT |
---|
| 998 | ENDDO |
---|
| 999 | ENDIF |
---|
| 1000 | |
---|
[774] | 1001 | IF ( kk < 100 .AND. uv_heights(kk+1) /= 9999999.9 ) THEN |
---|
[767] | 1002 | u_init(k) = u_profile(kk) + ( zu(k) - uv_heights(kk) ) / & |
---|
| 1003 | ( uv_heights(kk+1) - uv_heights(kk) ) * & |
---|
| 1004 | ( u_profile(kk+1) - u_profile(kk) ) |
---|
| 1005 | v_init(k) = v_profile(kk) + ( zu(k) - uv_heights(kk) ) / & |
---|
| 1006 | ( uv_heights(kk+1) - uv_heights(kk) ) * & |
---|
| 1007 | ( v_profile(kk+1) - v_profile(kk) ) |
---|
| 1008 | ELSE |
---|
| 1009 | u_init(k) = u_profile(kk) |
---|
| 1010 | v_init(k) = v_profile(kk) |
---|
| 1011 | ENDIF |
---|
| 1012 | |
---|
| 1013 | ENDDO |
---|
| 1014 | |
---|
| 1015 | ELSE |
---|
| 1016 | |
---|
| 1017 | message_string = 'u_profile(1) and v_profile(1) must be 0.0' |
---|
| 1018 | CALL message( 'check_parameters', 'PA0346', 1, 2, 0, 6, 0 ) |
---|
| 1019 | |
---|
| 1020 | ENDIF |
---|
| 1021 | |
---|
| 1022 | ! |
---|
[94] | 1023 | !-- Compute initial temperature profile using the given temperature gradients |
---|
[940] | 1024 | IF ( .NOT. neutral ) THEN |
---|
[94] | 1025 | |
---|
[940] | 1026 | i = 1 |
---|
| 1027 | gradient = 0.0 |
---|
[94] | 1028 | |
---|
[940] | 1029 | IF ( .NOT. ocean ) THEN |
---|
| 1030 | |
---|
| 1031 | pt_vertical_gradient_level_ind(1) = 0 |
---|
| 1032 | DO k = 1, nzt+1 |
---|
| 1033 | IF ( i < 11 ) THEN |
---|
| 1034 | IF ( pt_vertical_gradient_level(i) < zu(k) .AND. & |
---|
| 1035 | pt_vertical_gradient_level(i) >= 0.0 ) THEN |
---|
| 1036 | gradient = pt_vertical_gradient(i) / 100.0 |
---|
| 1037 | pt_vertical_gradient_level_ind(i) = k - 1 |
---|
| 1038 | i = i + 1 |
---|
| 1039 | ENDIF |
---|
[1] | 1040 | ENDIF |
---|
[940] | 1041 | IF ( gradient /= 0.0 ) THEN |
---|
| 1042 | IF ( k /= 1 ) THEN |
---|
| 1043 | pt_init(k) = pt_init(k-1) + dzu(k) * gradient |
---|
| 1044 | ELSE |
---|
| 1045 | pt_init(k) = pt_surface + 0.5 * dzu(k) * gradient |
---|
| 1046 | ENDIF |
---|
[94] | 1047 | ELSE |
---|
[940] | 1048 | pt_init(k) = pt_init(k-1) |
---|
[94] | 1049 | ENDIF |
---|
[940] | 1050 | ENDDO |
---|
[1] | 1051 | |
---|
[940] | 1052 | ELSE |
---|
[94] | 1053 | |
---|
[940] | 1054 | pt_vertical_gradient_level_ind(1) = nzt+1 |
---|
| 1055 | DO k = nzt, 0, -1 |
---|
| 1056 | IF ( i < 11 ) THEN |
---|
| 1057 | IF ( pt_vertical_gradient_level(i) > zu(k) .AND. & |
---|
| 1058 | pt_vertical_gradient_level(i) <= 0.0 ) THEN |
---|
| 1059 | gradient = pt_vertical_gradient(i) / 100.0 |
---|
| 1060 | pt_vertical_gradient_level_ind(i) = k + 1 |
---|
| 1061 | i = i + 1 |
---|
| 1062 | ENDIF |
---|
[94] | 1063 | ENDIF |
---|
[940] | 1064 | IF ( gradient /= 0.0 ) THEN |
---|
| 1065 | IF ( k /= nzt ) THEN |
---|
| 1066 | pt_init(k) = pt_init(k+1) - dzu(k+1) * gradient |
---|
| 1067 | ELSE |
---|
| 1068 | pt_init(k) = pt_surface - 0.5 * dzu(k+1) * gradient |
---|
| 1069 | pt_init(k+1) = pt_surface + 0.5 * dzu(k+1) * gradient |
---|
| 1070 | ENDIF |
---|
[94] | 1071 | ELSE |
---|
[940] | 1072 | pt_init(k) = pt_init(k+1) |
---|
[94] | 1073 | ENDIF |
---|
[940] | 1074 | ENDDO |
---|
[94] | 1075 | |
---|
[940] | 1076 | ENDIF |
---|
| 1077 | |
---|
[94] | 1078 | ENDIF |
---|
| 1079 | |
---|
[1] | 1080 | ! |
---|
| 1081 | !-- In case of no given temperature gradients, choose gradient of neutral |
---|
| 1082 | !-- stratification |
---|
[94] | 1083 | IF ( pt_vertical_gradient_level(1) == -9999999.9 ) THEN |
---|
[1] | 1084 | pt_vertical_gradient_level(1) = 0.0 |
---|
| 1085 | ENDIF |
---|
| 1086 | |
---|
| 1087 | ! |
---|
[94] | 1088 | !-- Store temperature gradient at the top boundary for possible Neumann |
---|
[1] | 1089 | !-- boundary condition |
---|
[19] | 1090 | bc_pt_t_val = ( pt_init(nzt+1) - pt_init(nzt) ) / dzu(nzt+1) |
---|
[1] | 1091 | |
---|
| 1092 | ! |
---|
| 1093 | !-- If required, compute initial humidity or scalar profile using the given |
---|
| 1094 | !-- humidity/scalar gradient. In case of scalar transport, initially store |
---|
| 1095 | !-- values of the scalar parameters on humidity parameters |
---|
| 1096 | IF ( passive_scalar ) THEN |
---|
| 1097 | bc_q_b = bc_s_b |
---|
| 1098 | bc_q_t = bc_s_t |
---|
| 1099 | q_surface = s_surface |
---|
| 1100 | q_surface_initial_change = s_surface_initial_change |
---|
| 1101 | q_vertical_gradient = s_vertical_gradient |
---|
| 1102 | q_vertical_gradient_level = s_vertical_gradient_level |
---|
| 1103 | surface_waterflux = surface_scalarflux |
---|
[407] | 1104 | wall_humidityflux = wall_scalarflux |
---|
[1] | 1105 | ENDIF |
---|
| 1106 | |
---|
[75] | 1107 | IF ( humidity .OR. passive_scalar ) THEN |
---|
[1] | 1108 | |
---|
| 1109 | i = 1 |
---|
| 1110 | gradient = 0.0 |
---|
| 1111 | q_vertical_gradient_level_ind(1) = 0 |
---|
| 1112 | DO k = 1, nzt+1 |
---|
[177] | 1113 | IF ( i < 11 ) THEN |
---|
| 1114 | IF ( q_vertical_gradient_level(i) < zu(k) .AND. & |
---|
| 1115 | q_vertical_gradient_level(i) >= 0.0 ) THEN |
---|
| 1116 | gradient = q_vertical_gradient(i) / 100.0 |
---|
| 1117 | q_vertical_gradient_level_ind(i) = k - 1 |
---|
| 1118 | i = i + 1 |
---|
[1] | 1119 | ENDIF |
---|
| 1120 | ENDIF |
---|
| 1121 | IF ( gradient /= 0.0 ) THEN |
---|
| 1122 | IF ( k /= 1 ) THEN |
---|
| 1123 | q_init(k) = q_init(k-1) + dzu(k) * gradient |
---|
| 1124 | ELSE |
---|
| 1125 | q_init(k) = q_init(k-1) + 0.5 * dzu(k) * gradient |
---|
| 1126 | ENDIF |
---|
| 1127 | ELSE |
---|
| 1128 | q_init(k) = q_init(k-1) |
---|
| 1129 | ENDIF |
---|
[72] | 1130 | ! |
---|
| 1131 | !-- Avoid negative humidities |
---|
| 1132 | IF ( q_init(k) < 0.0 ) THEN |
---|
| 1133 | q_init(k) = 0.0 |
---|
| 1134 | ENDIF |
---|
[1] | 1135 | ENDDO |
---|
| 1136 | |
---|
| 1137 | ! |
---|
| 1138 | !-- In case of no given humidity gradients, choose zero gradient |
---|
| 1139 | !-- conditions |
---|
| 1140 | IF ( q_vertical_gradient_level(1) == -1.0 ) THEN |
---|
| 1141 | q_vertical_gradient_level(1) = 0.0 |
---|
| 1142 | ENDIF |
---|
| 1143 | |
---|
| 1144 | ! |
---|
| 1145 | !-- Store humidity gradient at the top boundary for possile Neumann |
---|
| 1146 | !-- boundary condition |
---|
[19] | 1147 | bc_q_t_val = ( q_init(nzt+1) - q_init(nzt) ) / dzu(nzt+1) |
---|
[1] | 1148 | |
---|
| 1149 | ENDIF |
---|
| 1150 | |
---|
[94] | 1151 | ! |
---|
| 1152 | !-- If required, compute initial salinity profile using the given salinity |
---|
| 1153 | !-- gradients |
---|
| 1154 | IF ( ocean ) THEN |
---|
| 1155 | |
---|
| 1156 | i = 1 |
---|
| 1157 | gradient = 0.0 |
---|
| 1158 | |
---|
| 1159 | sa_vertical_gradient_level_ind(1) = nzt+1 |
---|
| 1160 | DO k = nzt, 0, -1 |
---|
[177] | 1161 | IF ( i < 11 ) THEN |
---|
| 1162 | IF ( sa_vertical_gradient_level(i) > zu(k) .AND. & |
---|
| 1163 | sa_vertical_gradient_level(i) <= 0.0 ) THEN |
---|
| 1164 | gradient = sa_vertical_gradient(i) / 100.0 |
---|
| 1165 | sa_vertical_gradient_level_ind(i) = k + 1 |
---|
| 1166 | i = i + 1 |
---|
[94] | 1167 | ENDIF |
---|
| 1168 | ENDIF |
---|
| 1169 | IF ( gradient /= 0.0 ) THEN |
---|
| 1170 | IF ( k /= nzt ) THEN |
---|
| 1171 | sa_init(k) = sa_init(k+1) - dzu(k+1) * gradient |
---|
| 1172 | ELSE |
---|
| 1173 | sa_init(k) = sa_surface - 0.5 * dzu(k+1) * gradient |
---|
| 1174 | sa_init(k+1) = sa_surface + 0.5 * dzu(k+1) * gradient |
---|
| 1175 | ENDIF |
---|
| 1176 | ELSE |
---|
| 1177 | sa_init(k) = sa_init(k+1) |
---|
| 1178 | ENDIF |
---|
| 1179 | ENDDO |
---|
| 1180 | |
---|
| 1181 | ENDIF |
---|
| 1182 | |
---|
[138] | 1183 | ! |
---|
[388] | 1184 | !-- If required compute the profile of leaf area density used in the plant |
---|
| 1185 | !-- canopy model |
---|
[138] | 1186 | IF ( plant_canopy ) THEN |
---|
| 1187 | |
---|
| 1188 | i = 1 |
---|
| 1189 | gradient = 0.0 |
---|
[1] | 1190 | |
---|
[138] | 1191 | IF ( .NOT. ocean ) THEN |
---|
[153] | 1192 | |
---|
| 1193 | lad(0) = lad_surface |
---|
[138] | 1194 | |
---|
| 1195 | lad_vertical_gradient_level_ind(1) = 0 |
---|
| 1196 | DO k = 1, pch_index |
---|
[177] | 1197 | IF ( i < 11 ) THEN |
---|
| 1198 | IF ( lad_vertical_gradient_level(i) < zu(k) .AND. & |
---|
| 1199 | lad_vertical_gradient_level(i) >= 0.0 ) THEN |
---|
| 1200 | gradient = lad_vertical_gradient(i) |
---|
| 1201 | lad_vertical_gradient_level_ind(i) = k - 1 |
---|
| 1202 | i = i + 1 |
---|
[138] | 1203 | ENDIF |
---|
| 1204 | ENDIF |
---|
| 1205 | IF ( gradient /= 0.0 ) THEN |
---|
| 1206 | IF ( k /= 1 ) THEN |
---|
| 1207 | lad(k) = lad(k-1) + dzu(k) * gradient |
---|
| 1208 | ELSE |
---|
| 1209 | lad(k) = lad_surface + 0.5 * dzu(k) *gradient |
---|
| 1210 | ENDIF |
---|
| 1211 | ELSE |
---|
| 1212 | lad(k) = lad(k-1) |
---|
| 1213 | ENDIF |
---|
| 1214 | ENDDO |
---|
| 1215 | |
---|
| 1216 | ENDIF |
---|
| 1217 | |
---|
[1] | 1218 | ! |
---|
[388] | 1219 | !-- In case of no given leaf area density gradients, choose a vanishing |
---|
| 1220 | !-- gradient |
---|
[138] | 1221 | IF ( lad_vertical_gradient_level(1) == -9999999.9 ) THEN |
---|
| 1222 | lad_vertical_gradient_level(1) = 0.0 |
---|
| 1223 | ENDIF |
---|
| 1224 | |
---|
| 1225 | ENDIF |
---|
| 1226 | |
---|
| 1227 | ENDIF |
---|
[411] | 1228 | |
---|
| 1229 | ! |
---|
| 1230 | !-- Initialize large scale subsidence if required |
---|
[580] | 1231 | IF ( subs_vertical_gradient_level(1) /= -9999999.9 ) THEN |
---|
[411] | 1232 | large_scale_subsidence = .TRUE. |
---|
| 1233 | CALL init_w_subsidence |
---|
| 1234 | END IF |
---|
| 1235 | |
---|
[138] | 1236 | |
---|
[667] | 1237 | |
---|
[138] | 1238 | ! |
---|
[1] | 1239 | !-- Compute Coriolis parameter |
---|
| 1240 | f = 2.0 * omega * SIN( phi / 180.0 * pi ) |
---|
| 1241 | fs = 2.0 * omega * COS( phi / 180.0 * pi ) |
---|
| 1242 | |
---|
| 1243 | ! |
---|
[97] | 1244 | !-- Ocean runs always use reference values in the buoyancy term. Therefore |
---|
| 1245 | !-- set the reference temperature equal to the surface temperature. |
---|
| 1246 | IF ( ocean .AND. pt_reference == 9999999.9 ) pt_reference = pt_surface |
---|
[57] | 1247 | |
---|
| 1248 | ! |
---|
[97] | 1249 | !-- Reference value has to be used in buoyancy terms |
---|
| 1250 | IF ( pt_reference /= 9999999.9 ) use_reference = .TRUE. |
---|
| 1251 | |
---|
| 1252 | ! |
---|
| 1253 | !-- Sign of buoyancy/stability terms |
---|
| 1254 | IF ( ocean ) atmos_ocean_sign = -1.0 |
---|
| 1255 | |
---|
| 1256 | ! |
---|
[108] | 1257 | !-- Ocean version must use flux boundary conditions at the top |
---|
| 1258 | IF ( ocean .AND. .NOT. use_top_fluxes ) THEN |
---|
[215] | 1259 | message_string = 'use_top_fluxes must be .TRUE. in ocean version' |
---|
[226] | 1260 | CALL message( 'check_parameters', 'PA0042', 1, 2, 0, 6, 0 ) |
---|
[108] | 1261 | ENDIF |
---|
[97] | 1262 | |
---|
| 1263 | ! |
---|
[1] | 1264 | !-- In case of a given slope, compute the relevant quantities |
---|
| 1265 | IF ( alpha_surface /= 0.0 ) THEN |
---|
| 1266 | IF ( ABS( alpha_surface ) > 90.0 ) THEN |
---|
[215] | 1267 | WRITE( message_string, * ) 'ABS( alpha_surface = ', alpha_surface, & |
---|
| 1268 | ' ) must be < 90.0' |
---|
[226] | 1269 | CALL message( 'check_parameters', 'PA0043', 1, 2, 0, 6, 0 ) |
---|
[1] | 1270 | ENDIF |
---|
| 1271 | sloping_surface = .TRUE. |
---|
| 1272 | cos_alpha_surface = COS( alpha_surface / 180.0 * pi ) |
---|
| 1273 | sin_alpha_surface = SIN( alpha_surface / 180.0 * pi ) |
---|
| 1274 | ENDIF |
---|
| 1275 | |
---|
| 1276 | ! |
---|
| 1277 | !-- Check time step and cfl_factor |
---|
| 1278 | IF ( dt /= -1.0 ) THEN |
---|
| 1279 | IF ( dt <= 0.0 .AND. dt /= -1.0 ) THEN |
---|
[215] | 1280 | WRITE( message_string, * ) 'dt = ', dt , ' <= 0.0' |
---|
[226] | 1281 | CALL message( 'check_parameters', 'PA0044', 1, 2, 0, 6, 0 ) |
---|
[1] | 1282 | ENDIF |
---|
| 1283 | dt_3d = dt |
---|
| 1284 | dt_fixed = .TRUE. |
---|
| 1285 | ENDIF |
---|
| 1286 | |
---|
| 1287 | IF ( cfl_factor <= 0.0 .OR. cfl_factor > 1.0 ) THEN |
---|
| 1288 | IF ( cfl_factor == -1.0 ) THEN |
---|
[1001] | 1289 | IF ( timestep_scheme == 'runge-kutta-2' ) THEN |
---|
[1] | 1290 | cfl_factor = 0.8 |
---|
[1001] | 1291 | ELSEIF ( timestep_scheme == 'runge-kutta-3' ) THEN |
---|
| 1292 | cfl_factor = 0.9 |
---|
[1] | 1293 | ELSE |
---|
[1001] | 1294 | cfl_factor = 0.9 |
---|
[1] | 1295 | ENDIF |
---|
| 1296 | ELSE |
---|
[215] | 1297 | WRITE( message_string, * ) 'cfl_factor = ', cfl_factor, & |
---|
| 1298 | ' out of range & 0.0 < cfl_factor <= 1.0 is required' |
---|
[226] | 1299 | CALL message( 'check_parameters', 'PA0045', 1, 2, 0, 6, 0 ) |
---|
[1] | 1300 | ENDIF |
---|
| 1301 | ENDIF |
---|
| 1302 | |
---|
| 1303 | ! |
---|
| 1304 | !-- Store simulated time at begin |
---|
| 1305 | simulated_time_at_begin = simulated_time |
---|
| 1306 | |
---|
| 1307 | ! |
---|
[291] | 1308 | !-- Store reference time for coupled runs and change the coupling flag, |
---|
| 1309 | !-- if ... |
---|
| 1310 | IF ( simulated_time == 0.0 ) THEN |
---|
| 1311 | IF ( coupling_start_time == 0.0 ) THEN |
---|
| 1312 | time_since_reference_point = 0.0 |
---|
| 1313 | ELSEIF ( time_since_reference_point < 0.0 ) THEN |
---|
| 1314 | run_coupled = .FALSE. |
---|
| 1315 | ENDIF |
---|
| 1316 | ENDIF |
---|
| 1317 | |
---|
| 1318 | ! |
---|
[1] | 1319 | !-- Set wind speed in the Galilei-transformed system |
---|
| 1320 | IF ( galilei_transformation ) THEN |
---|
| 1321 | IF ( use_ug_for_galilei_tr .AND. & |
---|
| 1322 | ug_vertical_gradient_level(1) == 0.0 .AND. & |
---|
| 1323 | vg_vertical_gradient_level(1) == 0.0 ) THEN |
---|
[866] | 1324 | u_gtrans = ug_surface * 0.6 |
---|
| 1325 | v_gtrans = vg_surface * 0.6 |
---|
[1] | 1326 | ELSEIF ( use_ug_for_galilei_tr .AND. & |
---|
| 1327 | ug_vertical_gradient_level(1) /= 0.0 ) THEN |
---|
[215] | 1328 | message_string = 'baroclinicity (ug) not allowed simultaneously' // & |
---|
| 1329 | ' with galilei transformation' |
---|
[226] | 1330 | CALL message( 'check_parameters', 'PA0046', 1, 2, 0, 6, 0 ) |
---|
[1] | 1331 | ELSEIF ( use_ug_for_galilei_tr .AND. & |
---|
| 1332 | vg_vertical_gradient_level(1) /= 0.0 ) THEN |
---|
[215] | 1333 | message_string = 'baroclinicity (vg) not allowed simultaneously' // & |
---|
| 1334 | ' with galilei transformation' |
---|
[226] | 1335 | CALL message( 'check_parameters', 'PA0047', 1, 2, 0, 6, 0 ) |
---|
[1] | 1336 | ELSE |
---|
[215] | 1337 | message_string = 'variable translation speed used for galilei-' // & |
---|
| 1338 | 'transformation, which may cause & instabilities in stably ' // & |
---|
| 1339 | 'stratified regions' |
---|
[226] | 1340 | CALL message( 'check_parameters', 'PA0048', 0, 1, 0, 6, 0 ) |
---|
[1] | 1341 | ENDIF |
---|
| 1342 | ENDIF |
---|
| 1343 | |
---|
| 1344 | ! |
---|
| 1345 | !-- In case of using a prandtl-layer, calculated (or prescribed) surface |
---|
| 1346 | !-- fluxes have to be used in the diffusion-terms |
---|
| 1347 | IF ( prandtl_layer ) use_surface_fluxes = .TRUE. |
---|
| 1348 | |
---|
| 1349 | ! |
---|
| 1350 | !-- Check boundary conditions and set internal variables: |
---|
| 1351 | !-- Lateral boundary conditions |
---|
[73] | 1352 | IF ( bc_lr /= 'cyclic' .AND. bc_lr /= 'dirichlet/radiation' .AND. & |
---|
[978] | 1353 | bc_lr /= 'radiation/dirichlet' .AND. bc_lr /= 'dirichlet/neumann' & |
---|
| 1354 | .AND. bc_lr /= 'neumann/dirichlet' ) THEN |
---|
[215] | 1355 | message_string = 'unknown boundary condition: bc_lr = "' // & |
---|
| 1356 | TRIM( bc_lr ) // '"' |
---|
[226] | 1357 | CALL message( 'check_parameters', 'PA0049', 1, 2, 0, 6, 0 ) |
---|
[1] | 1358 | ENDIF |
---|
[73] | 1359 | IF ( bc_ns /= 'cyclic' .AND. bc_ns /= 'dirichlet/radiation' .AND. & |
---|
[978] | 1360 | bc_ns /= 'radiation/dirichlet' .AND. bc_ns /= 'dirichlet/neumann' & |
---|
| 1361 | .AND. bc_ns /= 'neumann/dirichlet' ) THEN |
---|
[215] | 1362 | message_string = 'unknown boundary condition: bc_ns = "' // & |
---|
| 1363 | TRIM( bc_ns ) // '"' |
---|
[226] | 1364 | CALL message( 'check_parameters', 'PA0050', 1, 2, 0, 6, 0 ) |
---|
[1] | 1365 | ENDIF |
---|
| 1366 | |
---|
| 1367 | ! |
---|
[366] | 1368 | !-- Internal variables used for speed optimization in if clauses |
---|
[707] | 1369 | IF ( bc_lr /= 'cyclic' ) bc_lr_cyc = .FALSE. |
---|
| 1370 | IF ( bc_lr == 'dirichlet/radiation' ) bc_lr_dirrad = .TRUE. |
---|
| 1371 | IF ( bc_lr == 'radiation/dirichlet' ) bc_lr_raddir = .TRUE. |
---|
[978] | 1372 | IF ( bc_lr == 'dirichlet/neumann' ) bc_lr_dirneu = .TRUE. |
---|
| 1373 | IF ( bc_lr == 'neumann/dirichlet' ) bc_lr_neudir = .TRUE. |
---|
[707] | 1374 | IF ( bc_ns /= 'cyclic' ) bc_ns_cyc = .FALSE. |
---|
| 1375 | IF ( bc_ns == 'dirichlet/radiation' ) bc_ns_dirrad = .TRUE. |
---|
| 1376 | IF ( bc_ns == 'radiation/dirichlet' ) bc_ns_raddir = .TRUE. |
---|
[978] | 1377 | IF ( bc_ns == 'dirichlet/neumann' ) bc_ns_dirneu = .TRUE. |
---|
| 1378 | IF ( bc_ns == 'neumann/dirichlet' ) bc_ns_neudir = .TRUE. |
---|
[366] | 1379 | |
---|
| 1380 | ! |
---|
[1] | 1381 | !-- Non-cyclic lateral boundaries require the multigrid method and Piascek- |
---|
[667] | 1382 | !-- Willimas or Wicker - Skamarock advection scheme. Several schemes |
---|
| 1383 | !-- and tools do not work with non-cyclic boundary conditions. |
---|
[1] | 1384 | IF ( bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' ) THEN |
---|
| 1385 | IF ( psolver /= 'multigrid' ) THEN |
---|
[215] | 1386 | message_string = 'non-cyclic lateral boundaries do not allow ' // & |
---|
| 1387 | 'psolver = "' // TRIM( psolver ) // '"' |
---|
[226] | 1388 | CALL message( 'check_parameters', 'PA0051', 1, 2, 0, 6, 0 ) |
---|
[1] | 1389 | ENDIF |
---|
[667] | 1390 | IF ( momentum_advec /= 'pw-scheme' .AND. & |
---|
| 1391 | momentum_advec /= 'ws-scheme') THEN |
---|
[215] | 1392 | message_string = 'non-cyclic lateral boundaries do not allow ' // & |
---|
| 1393 | 'momentum_advec = "' // TRIM( momentum_advec ) // '"' |
---|
[226] | 1394 | CALL message( 'check_parameters', 'PA0052', 1, 2, 0, 6, 0 ) |
---|
[1] | 1395 | ENDIF |
---|
[667] | 1396 | IF ( scalar_advec /= 'pw-scheme' .AND. & |
---|
| 1397 | scalar_advec /= 'ws-scheme' ) THEN |
---|
[215] | 1398 | message_string = 'non-cyclic lateral boundaries do not allow ' // & |
---|
| 1399 | 'scalar_advec = "' // TRIM( scalar_advec ) // '"' |
---|
[226] | 1400 | CALL message( 'check_parameters', 'PA0053', 1, 2, 0, 6, 0 ) |
---|
[1] | 1401 | ENDIF |
---|
| 1402 | IF ( galilei_transformation ) THEN |
---|
[215] | 1403 | message_string = 'non-cyclic lateral boundaries do not allow ' // & |
---|
| 1404 | 'galilei_transformation = .T.' |
---|
[226] | 1405 | CALL message( 'check_parameters', 'PA0054', 1, 2, 0, 6, 0 ) |
---|
[1] | 1406 | ENDIF |
---|
| 1407 | ENDIF |
---|
| 1408 | |
---|
| 1409 | ! |
---|
| 1410 | !-- Bottom boundary condition for the turbulent Kinetic energy |
---|
| 1411 | IF ( bc_e_b == 'neumann' ) THEN |
---|
| 1412 | ibc_e_b = 1 |
---|
| 1413 | ELSEIF ( bc_e_b == '(u*)**2+neumann' ) THEN |
---|
| 1414 | ibc_e_b = 2 |
---|
[1015] | 1415 | IF ( prandtl_layer ) THEN |
---|
| 1416 | message_string = 'adjust mixing length = FALSE and bc_e_b = "' // & |
---|
[215] | 1417 | TRIM( bc_e_b ) // '"' |
---|
[226] | 1418 | CALL message( 'check_parameters', 'PA0056', 0, 1, 0, 6, 0 ) |
---|
[1] | 1419 | ENDIF |
---|
| 1420 | IF ( .NOT. prandtl_layer ) THEN |
---|
| 1421 | bc_e_b = 'neumann' |
---|
| 1422 | ibc_e_b = 1 |
---|
[215] | 1423 | message_string = 'boundary condition bc_e_b changed to "' // & |
---|
| 1424 | TRIM( bc_e_b ) // '"' |
---|
[226] | 1425 | CALL message( 'check_parameters', 'PA0057', 0, 1, 0, 6, 0 ) |
---|
[1] | 1426 | ENDIF |
---|
| 1427 | ELSE |
---|
[215] | 1428 | message_string = 'unknown boundary condition: bc_e_b = "' // & |
---|
| 1429 | TRIM( bc_e_b ) // '"' |
---|
[226] | 1430 | CALL message( 'check_parameters', 'PA0058', 1, 2, 0, 6, 0 ) |
---|
[1] | 1431 | ENDIF |
---|
| 1432 | |
---|
| 1433 | ! |
---|
| 1434 | !-- Boundary conditions for perturbation pressure |
---|
| 1435 | IF ( bc_p_b == 'dirichlet' ) THEN |
---|
| 1436 | ibc_p_b = 0 |
---|
| 1437 | ELSEIF ( bc_p_b == 'neumann' ) THEN |
---|
| 1438 | ibc_p_b = 1 |
---|
| 1439 | ELSEIF ( bc_p_b == 'neumann+inhomo' ) THEN |
---|
| 1440 | ibc_p_b = 2 |
---|
| 1441 | ELSE |
---|
[215] | 1442 | message_string = 'unknown boundary condition: bc_p_b = "' // & |
---|
| 1443 | TRIM( bc_p_b ) // '"' |
---|
[226] | 1444 | CALL message( 'check_parameters', 'PA0059', 1, 2, 0, 6, 0 ) |
---|
[1] | 1445 | ENDIF |
---|
| 1446 | IF ( ibc_p_b == 2 .AND. .NOT. prandtl_layer ) THEN |
---|
[215] | 1447 | message_string = 'boundary condition: bc_p_b = "' // TRIM( bc_p_b ) // & |
---|
| 1448 | '" not allowed with prandtl_layer = .FALSE.' |
---|
[226] | 1449 | CALL message( 'check_parameters', 'PA0060', 1, 2, 0, 6, 0 ) |
---|
[1] | 1450 | ENDIF |
---|
| 1451 | IF ( bc_p_t == 'dirichlet' ) THEN |
---|
| 1452 | ibc_p_t = 0 |
---|
| 1453 | ELSEIF ( bc_p_t == 'neumann' ) THEN |
---|
| 1454 | ibc_p_t = 1 |
---|
| 1455 | ELSE |
---|
[215] | 1456 | message_string = 'unknown boundary condition: bc_p_t = "' // & |
---|
| 1457 | TRIM( bc_p_t ) // '"' |
---|
[226] | 1458 | CALL message( 'check_parameters', 'PA0061', 1, 2, 0, 6, 0 ) |
---|
[1] | 1459 | ENDIF |
---|
| 1460 | |
---|
| 1461 | ! |
---|
| 1462 | !-- Boundary conditions for potential temperature |
---|
[102] | 1463 | IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN |
---|
| 1464 | ibc_pt_b = 2 |
---|
[1] | 1465 | ELSE |
---|
[102] | 1466 | IF ( bc_pt_b == 'dirichlet' ) THEN |
---|
| 1467 | ibc_pt_b = 0 |
---|
| 1468 | ELSEIF ( bc_pt_b == 'neumann' ) THEN |
---|
| 1469 | ibc_pt_b = 1 |
---|
| 1470 | ELSE |
---|
[215] | 1471 | message_string = 'unknown boundary condition: bc_pt_b = "' // & |
---|
| 1472 | TRIM( bc_pt_b ) // '"' |
---|
[226] | 1473 | CALL message( 'check_parameters', 'PA0062', 1, 2, 0, 6, 0 ) |
---|
[1] | 1474 | ENDIF |
---|
| 1475 | ENDIF |
---|
[102] | 1476 | |
---|
[1] | 1477 | IF ( bc_pt_t == 'dirichlet' ) THEN |
---|
| 1478 | ibc_pt_t = 0 |
---|
| 1479 | ELSEIF ( bc_pt_t == 'neumann' ) THEN |
---|
| 1480 | ibc_pt_t = 1 |
---|
[19] | 1481 | ELSEIF ( bc_pt_t == 'initial_gradient' ) THEN |
---|
| 1482 | ibc_pt_t = 2 |
---|
[1] | 1483 | ELSE |
---|
[215] | 1484 | message_string = 'unknown boundary condition: bc_pt_t = "' // & |
---|
| 1485 | TRIM( bc_pt_t ) // '"' |
---|
[226] | 1486 | CALL message( 'check_parameters', 'PA0063', 1, 2, 0, 6, 0 ) |
---|
[1] | 1487 | ENDIF |
---|
| 1488 | |
---|
[20] | 1489 | IF ( surface_heatflux == 9999999.9 ) constant_heatflux = .FALSE. |
---|
| 1490 | IF ( top_heatflux == 9999999.9 ) constant_top_heatflux = .FALSE. |
---|
[940] | 1491 | |
---|
| 1492 | IF ( neutral ) THEN |
---|
| 1493 | |
---|
| 1494 | IF ( surface_heatflux /= 0.0 .AND. surface_heatflux /= 9999999.9 ) & |
---|
| 1495 | THEN |
---|
| 1496 | message_string = 'heatflux must not be set for pure neutral flow' |
---|
| 1497 | CALL message( 'check_parameters', 'PA0351', 1, 2, 0, 6, 0 ) |
---|
| 1498 | ENDIF |
---|
| 1499 | |
---|
| 1500 | IF ( top_heatflux /= 0.0 .AND. top_heatflux /= 9999999.9 ) & |
---|
| 1501 | THEN |
---|
| 1502 | message_string = 'heatflux must not be set for pure neutral flow' |
---|
| 1503 | CALL message( 'check_parameters', 'PA0351', 1, 2, 0, 6, 0 ) |
---|
| 1504 | ENDIF |
---|
| 1505 | |
---|
| 1506 | ENDIF |
---|
| 1507 | |
---|
[103] | 1508 | IF ( top_momentumflux_u /= 9999999.9 .AND. & |
---|
| 1509 | top_momentumflux_v /= 9999999.9 ) THEN |
---|
| 1510 | constant_top_momentumflux = .TRUE. |
---|
| 1511 | ELSEIF ( .NOT. ( top_momentumflux_u == 9999999.9 .AND. & |
---|
[215] | 1512 | top_momentumflux_v == 9999999.9 ) ) THEN |
---|
| 1513 | message_string = 'both, top_momentumflux_u AND top_momentumflux_v ' // & |
---|
| 1514 | 'must be set' |
---|
[226] | 1515 | CALL message( 'check_parameters', 'PA0064', 1, 2, 0, 6, 0 ) |
---|
[103] | 1516 | ENDIF |
---|
[1] | 1517 | |
---|
| 1518 | ! |
---|
| 1519 | !-- A given surface temperature implies Dirichlet boundary condition for |
---|
| 1520 | !-- temperature. In this case specification of a constant heat flux is |
---|
| 1521 | !-- forbidden. |
---|
| 1522 | IF ( ibc_pt_b == 0 .AND. constant_heatflux .AND. & |
---|
| 1523 | surface_heatflux /= 0.0 ) THEN |
---|
[215] | 1524 | message_string = 'boundary_condition: bc_pt_b = "' // TRIM( bc_pt_b ) //& |
---|
| 1525 | '& is not allowed with constant_heatflux = .TRUE.' |
---|
[226] | 1526 | CALL message( 'check_parameters', 'PA0065', 1, 2, 0, 6, 0 ) |
---|
[1] | 1527 | ENDIF |
---|
| 1528 | IF ( constant_heatflux .AND. pt_surface_initial_change /= 0.0 ) THEN |
---|
[215] | 1529 | WRITE ( message_string, * ) 'constant_heatflux = .TRUE. is not allo', & |
---|
| 1530 | 'wed with pt_surface_initial_change (/=0) = ', & |
---|
| 1531 | pt_surface_initial_change |
---|
[226] | 1532 | CALL message( 'check_parameters', 'PA0066', 1, 2, 0, 6, 0 ) |
---|
[1] | 1533 | ENDIF |
---|
| 1534 | |
---|
| 1535 | ! |
---|
[19] | 1536 | !-- A given temperature at the top implies Dirichlet boundary condition for |
---|
| 1537 | !-- temperature. In this case specification of a constant heat flux is |
---|
| 1538 | !-- forbidden. |
---|
| 1539 | IF ( ibc_pt_t == 0 .AND. constant_top_heatflux .AND. & |
---|
| 1540 | top_heatflux /= 0.0 ) THEN |
---|
[215] | 1541 | message_string = 'boundary_condition: bc_pt_t = "' // TRIM( bc_pt_t ) //& |
---|
| 1542 | '" is not allowed with constant_top_heatflux = .TRUE.' |
---|
[226] | 1543 | CALL message( 'check_parameters', 'PA0067', 1, 2, 0, 6, 0 ) |
---|
[19] | 1544 | ENDIF |
---|
| 1545 | |
---|
| 1546 | ! |
---|
[95] | 1547 | !-- Boundary conditions for salinity |
---|
| 1548 | IF ( ocean ) THEN |
---|
| 1549 | IF ( bc_sa_t == 'dirichlet' ) THEN |
---|
| 1550 | ibc_sa_t = 0 |
---|
| 1551 | ELSEIF ( bc_sa_t == 'neumann' ) THEN |
---|
| 1552 | ibc_sa_t = 1 |
---|
| 1553 | ELSE |
---|
[215] | 1554 | message_string = 'unknown boundary condition: bc_sa_t = "' // & |
---|
| 1555 | TRIM( bc_sa_t ) // '"' |
---|
[226] | 1556 | CALL message( 'check_parameters', 'PA0068', 1, 2, 0, 6, 0 ) |
---|
[95] | 1557 | ENDIF |
---|
| 1558 | |
---|
| 1559 | IF ( top_salinityflux == 9999999.9 ) constant_top_salinityflux = .FALSE. |
---|
[97] | 1560 | IF ( ibc_sa_t == 1 .AND. top_salinityflux == 9999999.9 ) THEN |
---|
[215] | 1561 | message_string = 'boundary condition: bc_sa_t = "' // & |
---|
| 1562 | TRIM( bc_sa_t ) // '" requires to set ' // & |
---|
| 1563 | 'top_salinityflux' |
---|
[226] | 1564 | CALL message( 'check_parameters', 'PA0069', 1, 2, 0, 6, 0 ) |
---|
[97] | 1565 | ENDIF |
---|
[95] | 1566 | |
---|
| 1567 | ! |
---|
| 1568 | !-- A fixed salinity at the top implies Dirichlet boundary condition for |
---|
| 1569 | !-- salinity. In this case specification of a constant salinity flux is |
---|
| 1570 | !-- forbidden. |
---|
| 1571 | IF ( ibc_sa_t == 0 .AND. constant_top_salinityflux .AND. & |
---|
| 1572 | top_salinityflux /= 0.0 ) THEN |
---|
[215] | 1573 | message_string = 'boundary condition: bc_sa_t = "' // & |
---|
| 1574 | TRIM( bc_sa_t ) // '" is not allowed with ' // & |
---|
| 1575 | 'constant_top_salinityflux = .TRUE.' |
---|
[226] | 1576 | CALL message( 'check_parameters', 'PA0070', 1, 2, 0, 6, 0 ) |
---|
[95] | 1577 | ENDIF |
---|
| 1578 | |
---|
| 1579 | ENDIF |
---|
| 1580 | |
---|
| 1581 | ! |
---|
[75] | 1582 | !-- In case of humidity or passive scalar, set boundary conditions for total |
---|
[1] | 1583 | !-- water content / scalar |
---|
[75] | 1584 | IF ( humidity .OR. passive_scalar ) THEN |
---|
| 1585 | IF ( humidity ) THEN |
---|
[1] | 1586 | sq = 'q' |
---|
| 1587 | ELSE |
---|
| 1588 | sq = 's' |
---|
| 1589 | ENDIF |
---|
| 1590 | IF ( bc_q_b == 'dirichlet' ) THEN |
---|
| 1591 | ibc_q_b = 0 |
---|
| 1592 | ELSEIF ( bc_q_b == 'neumann' ) THEN |
---|
| 1593 | ibc_q_b = 1 |
---|
| 1594 | ELSE |
---|
[215] | 1595 | message_string = 'unknown boundary condition: bc_' // TRIM( sq ) // & |
---|
| 1596 | '_b ="' // TRIM( bc_q_b ) // '"' |
---|
[226] | 1597 | CALL message( 'check_parameters', 'PA0071', 1, 2, 0, 6, 0 ) |
---|
[1] | 1598 | ENDIF |
---|
| 1599 | IF ( bc_q_t == 'dirichlet' ) THEN |
---|
| 1600 | ibc_q_t = 0 |
---|
| 1601 | ELSEIF ( bc_q_t == 'neumann' ) THEN |
---|
| 1602 | ibc_q_t = 1 |
---|
| 1603 | ELSE |
---|
[215] | 1604 | message_string = 'unknown boundary condition: bc_' // TRIM( sq ) // & |
---|
| 1605 | '_t ="' // TRIM( bc_q_t ) // '"' |
---|
[226] | 1606 | CALL message( 'check_parameters', 'PA0072', 1, 2, 0, 6, 0 ) |
---|
[1] | 1607 | ENDIF |
---|
| 1608 | |
---|
[600] | 1609 | IF ( surface_waterflux == 9999999.9 ) constant_waterflux = .FALSE. |
---|
[1] | 1610 | |
---|
| 1611 | ! |
---|
| 1612 | !-- A given surface humidity implies Dirichlet boundary condition for |
---|
[75] | 1613 | !-- humidity. In this case specification of a constant water flux is |
---|
[1] | 1614 | !-- forbidden. |
---|
| 1615 | IF ( ibc_q_b == 0 .AND. constant_waterflux ) THEN |
---|
[215] | 1616 | message_string = 'boundary condition: bc_' // TRIM( sq ) // '_b ' // & |
---|
| 1617 | '= "' // TRIM( bc_q_b ) // '" is not allowed wi' // & |
---|
| 1618 | 'th prescribed surface flux' |
---|
[226] | 1619 | CALL message( 'check_parameters', 'PA0073', 1, 2, 0, 6, 0 ) |
---|
[1] | 1620 | ENDIF |
---|
| 1621 | IF ( constant_waterflux .AND. q_surface_initial_change /= 0.0 ) THEN |
---|
[215] | 1622 | WRITE( message_string, * ) 'a prescribed surface flux is not allo', & |
---|
| 1623 | 'wed with ', sq, '_surface_initial_change (/=0) = ', & |
---|
| 1624 | q_surface_initial_change |
---|
[226] | 1625 | CALL message( 'check_parameters', 'PA0074', 1, 2, 0, 6, 0 ) |
---|
[1] | 1626 | ENDIF |
---|
| 1627 | |
---|
| 1628 | ENDIF |
---|
| 1629 | |
---|
| 1630 | ! |
---|
| 1631 | !-- Boundary conditions for horizontal components of wind speed |
---|
| 1632 | IF ( bc_uv_b == 'dirichlet' ) THEN |
---|
| 1633 | ibc_uv_b = 0 |
---|
| 1634 | ELSEIF ( bc_uv_b == 'neumann' ) THEN |
---|
| 1635 | ibc_uv_b = 1 |
---|
| 1636 | IF ( prandtl_layer ) THEN |
---|
[215] | 1637 | message_string = 'boundary condition: bc_uv_b = "' // & |
---|
| 1638 | TRIM( bc_uv_b ) // '" is not allowed with prandtl_layer = .TRUE.' |
---|
[226] | 1639 | CALL message( 'check_parameters', 'PA0075', 1, 2, 0, 6, 0 ) |
---|
[1] | 1640 | ENDIF |
---|
| 1641 | ELSE |
---|
[215] | 1642 | message_string = 'unknown boundary condition: bc_uv_b = "' // & |
---|
| 1643 | TRIM( bc_uv_b ) // '"' |
---|
[226] | 1644 | CALL message( 'check_parameters', 'PA0076', 1, 2, 0, 6, 0 ) |
---|
[1] | 1645 | ENDIF |
---|
[667] | 1646 | ! |
---|
| 1647 | !-- In case of coupled simulations u and v at the ground in atmosphere will be |
---|
| 1648 | !-- assigned with the u and v values of the ocean surface |
---|
| 1649 | IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN |
---|
| 1650 | ibc_uv_b = 2 |
---|
| 1651 | ENDIF |
---|
[215] | 1652 | |
---|
[108] | 1653 | IF ( coupling_mode == 'ocean_to_atmosphere' ) THEN |
---|
| 1654 | bc_uv_t = 'neumann' |
---|
[1] | 1655 | ibc_uv_t = 1 |
---|
| 1656 | ELSE |
---|
[132] | 1657 | IF ( bc_uv_t == 'dirichlet' .OR. bc_uv_t == 'dirichlet_0' ) THEN |
---|
[108] | 1658 | ibc_uv_t = 0 |
---|
[767] | 1659 | IF ( bc_uv_t == 'dirichlet_0' ) THEN |
---|
| 1660 | ! |
---|
| 1661 | !-- Velocities for the initial u,v-profiles are set zero at the top |
---|
| 1662 | !-- in case of dirichlet_0 conditions |
---|
| 1663 | u_init(nzt+1) = 0.0 |
---|
| 1664 | v_init(nzt+1) = 0.0 |
---|
| 1665 | ENDIF |
---|
[108] | 1666 | ELSEIF ( bc_uv_t == 'neumann' ) THEN |
---|
| 1667 | ibc_uv_t = 1 |
---|
| 1668 | ELSE |
---|
[215] | 1669 | message_string = 'unknown boundary condition: bc_uv_t = "' // & |
---|
| 1670 | TRIM( bc_uv_t ) // '"' |
---|
[226] | 1671 | CALL message( 'check_parameters', 'PA0077', 1, 2, 0, 6, 0 ) |
---|
[1] | 1672 | ENDIF |
---|
| 1673 | ENDIF |
---|
| 1674 | |
---|
| 1675 | ! |
---|
| 1676 | !-- Compute and check, respectively, the Rayleigh Damping parameter |
---|
| 1677 | IF ( rayleigh_damping_factor == -1.0 ) THEN |
---|
[1001] | 1678 | rayleigh_damping_factor = 0.0 |
---|
[1] | 1679 | ELSE |
---|
| 1680 | IF ( rayleigh_damping_factor < 0.0 .OR. rayleigh_damping_factor > 1.0 ) & |
---|
| 1681 | THEN |
---|
[215] | 1682 | WRITE( message_string, * ) 'rayleigh_damping_factor = ', & |
---|
| 1683 | rayleigh_damping_factor, ' out of range [0.0,1.0]' |
---|
[226] | 1684 | CALL message( 'check_parameters', 'PA0078', 1, 2, 0, 6, 0 ) |
---|
[1] | 1685 | ENDIF |
---|
| 1686 | ENDIF |
---|
| 1687 | |
---|
| 1688 | IF ( rayleigh_damping_height == -1.0 ) THEN |
---|
[108] | 1689 | IF ( .NOT. ocean ) THEN |
---|
| 1690 | rayleigh_damping_height = 0.66666666666 * zu(nzt) |
---|
| 1691 | ELSE |
---|
| 1692 | rayleigh_damping_height = 0.66666666666 * zu(nzb) |
---|
| 1693 | ENDIF |
---|
[1] | 1694 | ELSE |
---|
[108] | 1695 | IF ( .NOT. ocean ) THEN |
---|
| 1696 | IF ( rayleigh_damping_height < 0.0 .OR. & |
---|
| 1697 | rayleigh_damping_height > zu(nzt) ) THEN |
---|
[215] | 1698 | WRITE( message_string, * ) 'rayleigh_damping_height = ', & |
---|
| 1699 | rayleigh_damping_height, ' out of range [0.0,', zu(nzt), ']' |
---|
[226] | 1700 | CALL message( 'check_parameters', 'PA0079', 1, 2, 0, 6, 0 ) |
---|
[1] | 1701 | ENDIF |
---|
[108] | 1702 | ELSE |
---|
| 1703 | IF ( rayleigh_damping_height > 0.0 .OR. & |
---|
| 1704 | rayleigh_damping_height < zu(nzb) ) THEN |
---|
[215] | 1705 | WRITE( message_string, * ) 'rayleigh_damping_height = ', & |
---|
| 1706 | rayleigh_damping_height, ' out of range [0.0,', zu(nzb), ']' |
---|
[226] | 1707 | CALL message( 'check_parameters', 'PA0079', 1, 2, 0, 6, 0 ) |
---|
[108] | 1708 | ENDIF |
---|
[1] | 1709 | ENDIF |
---|
| 1710 | ENDIF |
---|
| 1711 | |
---|
| 1712 | ! |
---|
| 1713 | !-- Check number of chosen statistic regions. More than 10 regions are not |
---|
| 1714 | !-- allowed, because so far no more than 10 corresponding output files can |
---|
| 1715 | !-- be opened (cf. check_open) |
---|
| 1716 | IF ( statistic_regions > 9 .OR. statistic_regions < 0 ) THEN |
---|
[215] | 1717 | WRITE ( message_string, * ) 'number of statistic_regions = ', & |
---|
| 1718 | statistic_regions+1, ' but only 10 regions are allowed' |
---|
[226] | 1719 | CALL message( 'check_parameters', 'PA0082', 1, 2, 0, 6, 0 ) |
---|
[1] | 1720 | ENDIF |
---|
| 1721 | IF ( normalizing_region > statistic_regions .OR. & |
---|
| 1722 | normalizing_region < 0) THEN |
---|
[215] | 1723 | WRITE ( message_string, * ) 'normalizing_region = ', & |
---|
| 1724 | normalizing_region, ' must be >= 0 and <= ',statistic_regions, & |
---|
| 1725 | ' (value of statistic_regions)' |
---|
[226] | 1726 | CALL message( 'check_parameters', 'PA0083', 1, 2, 0, 6, 0 ) |
---|
[1] | 1727 | ENDIF |
---|
| 1728 | |
---|
| 1729 | ! |
---|
[116] | 1730 | !-- Check the interval for sorting particles. |
---|
| 1731 | !-- Using particles as cloud droplets requires sorting after each timestep. |
---|
| 1732 | IF ( dt_sort_particles /= 0.0 .AND. cloud_droplets ) THEN |
---|
| 1733 | dt_sort_particles = 0.0 |
---|
[215] | 1734 | message_string = 'dt_sort_particles is reset to 0.0 because of cloud' //& |
---|
| 1735 | '_droplets = .TRUE.' |
---|
[226] | 1736 | CALL message( 'check_parameters', 'PA0084', 0, 1, 0, 6, 0 ) |
---|
[116] | 1737 | ENDIF |
---|
| 1738 | |
---|
| 1739 | ! |
---|
[1] | 1740 | !-- Set the default intervals for data output, if necessary |
---|
| 1741 | !-- NOTE: dt_dosp has already been set in package_parin |
---|
| 1742 | IF ( dt_data_output /= 9999999.9 ) THEN |
---|
| 1743 | IF ( dt_dopr == 9999999.9 ) dt_dopr = dt_data_output |
---|
| 1744 | IF ( dt_dopts == 9999999.9 ) dt_dopts = dt_data_output |
---|
| 1745 | IF ( dt_do2d_xy == 9999999.9 ) dt_do2d_xy = dt_data_output |
---|
| 1746 | IF ( dt_do2d_xz == 9999999.9 ) dt_do2d_xz = dt_data_output |
---|
| 1747 | IF ( dt_do2d_yz == 9999999.9 ) dt_do2d_yz = dt_data_output |
---|
| 1748 | IF ( dt_do3d == 9999999.9 ) dt_do3d = dt_data_output |
---|
| 1749 | IF ( dt_data_output_av == 9999999.9 ) dt_data_output_av = dt_data_output |
---|
[564] | 1750 | DO mid = 1, max_masks |
---|
[410] | 1751 | IF ( dt_domask(mid) == 9999999.9 ) dt_domask(mid) = dt_data_output |
---|
| 1752 | ENDDO |
---|
[1] | 1753 | ENDIF |
---|
| 1754 | |
---|
| 1755 | ! |
---|
| 1756 | !-- Set the default skip time intervals for data output, if necessary |
---|
| 1757 | IF ( skip_time_dopr == 9999999.9 ) & |
---|
| 1758 | skip_time_dopr = skip_time_data_output |
---|
| 1759 | IF ( skip_time_dosp == 9999999.9 ) & |
---|
| 1760 | skip_time_dosp = skip_time_data_output |
---|
| 1761 | IF ( skip_time_do2d_xy == 9999999.9 ) & |
---|
| 1762 | skip_time_do2d_xy = skip_time_data_output |
---|
| 1763 | IF ( skip_time_do2d_xz == 9999999.9 ) & |
---|
| 1764 | skip_time_do2d_xz = skip_time_data_output |
---|
| 1765 | IF ( skip_time_do2d_yz == 9999999.9 ) & |
---|
| 1766 | skip_time_do2d_yz = skip_time_data_output |
---|
| 1767 | IF ( skip_time_do3d == 9999999.9 ) & |
---|
| 1768 | skip_time_do3d = skip_time_data_output |
---|
| 1769 | IF ( skip_time_data_output_av == 9999999.9 ) & |
---|
| 1770 | skip_time_data_output_av = skip_time_data_output |
---|
[564] | 1771 | DO mid = 1, max_masks |
---|
[410] | 1772 | IF ( skip_time_domask(mid) == 9999999.9 ) & |
---|
| 1773 | skip_time_domask(mid) = skip_time_data_output |
---|
| 1774 | ENDDO |
---|
[1] | 1775 | |
---|
| 1776 | ! |
---|
| 1777 | !-- Check the average intervals (first for 3d-data, then for profiles and |
---|
| 1778 | !-- spectra) |
---|
| 1779 | IF ( averaging_interval > dt_data_output_av ) THEN |
---|
[215] | 1780 | WRITE( message_string, * ) 'averaging_interval = ', & |
---|
| 1781 | averaging_interval, ' must be <= dt_data_output = ', dt_data_output |
---|
[226] | 1782 | CALL message( 'check_parameters', 'PA0085', 1, 2, 0, 6, 0 ) |
---|
[1] | 1783 | ENDIF |
---|
| 1784 | |
---|
| 1785 | IF ( averaging_interval_pr == 9999999.9 ) THEN |
---|
| 1786 | averaging_interval_pr = averaging_interval |
---|
| 1787 | ENDIF |
---|
| 1788 | |
---|
| 1789 | IF ( averaging_interval_pr > dt_dopr ) THEN |
---|
[215] | 1790 | WRITE( message_string, * ) 'averaging_interval_pr = ', & |
---|
| 1791 | averaging_interval_pr, ' must be <= dt_dopr = ', dt_dopr |
---|
[226] | 1792 | CALL message( 'check_parameters', 'PA0086', 1, 2, 0, 6, 0 ) |
---|
[1] | 1793 | ENDIF |
---|
| 1794 | |
---|
| 1795 | IF ( averaging_interval_sp == 9999999.9 ) THEN |
---|
| 1796 | averaging_interval_sp = averaging_interval |
---|
| 1797 | ENDIF |
---|
| 1798 | |
---|
| 1799 | IF ( averaging_interval_sp > dt_dosp ) THEN |
---|
[215] | 1800 | WRITE( message_string, * ) 'averaging_interval_sp = ', & |
---|
| 1801 | averaging_interval_sp, ' must be <= dt_dosp = ', dt_dosp |
---|
[226] | 1802 | CALL message( 'check_parameters', 'PA0087', 1, 2, 0, 6, 0 ) |
---|
[1] | 1803 | ENDIF |
---|
| 1804 | |
---|
| 1805 | ! |
---|
| 1806 | !-- Set the default interval for profiles entering the temporal average |
---|
| 1807 | IF ( dt_averaging_input_pr == 9999999.9 ) THEN |
---|
| 1808 | dt_averaging_input_pr = dt_averaging_input |
---|
| 1809 | ENDIF |
---|
| 1810 | |
---|
| 1811 | ! |
---|
| 1812 | !-- Set the default interval for the output of timeseries to a reasonable |
---|
| 1813 | !-- value (tries to minimize the number of calls of flow_statistics) |
---|
| 1814 | IF ( dt_dots == 9999999.9 ) THEN |
---|
| 1815 | IF ( averaging_interval_pr == 0.0 ) THEN |
---|
| 1816 | dt_dots = MIN( dt_run_control, dt_dopr ) |
---|
| 1817 | ELSE |
---|
| 1818 | dt_dots = MIN( dt_run_control, dt_averaging_input_pr ) |
---|
| 1819 | ENDIF |
---|
| 1820 | ENDIF |
---|
| 1821 | |
---|
| 1822 | ! |
---|
| 1823 | !-- Check the sample rate for averaging (first for 3d-data, then for profiles) |
---|
| 1824 | IF ( dt_averaging_input > averaging_interval ) THEN |
---|
[215] | 1825 | WRITE( message_string, * ) 'dt_averaging_input = ', & |
---|
| 1826 | dt_averaging_input, ' must be <= averaging_interval = ', & |
---|
| 1827 | averaging_interval |
---|
[226] | 1828 | CALL message( 'check_parameters', 'PA0088', 1, 2, 0, 6, 0 ) |
---|
[1] | 1829 | ENDIF |
---|
| 1830 | |
---|
| 1831 | IF ( dt_averaging_input_pr > averaging_interval_pr ) THEN |
---|
[215] | 1832 | WRITE( message_string, * ) 'dt_averaging_input_pr = ', & |
---|
| 1833 | dt_averaging_input_pr, ' must be <= averaging_interval_pr = ', & |
---|
| 1834 | averaging_interval_pr |
---|
[226] | 1835 | CALL message( 'check_parameters', 'PA0089', 1, 2, 0, 6, 0 ) |
---|
[1] | 1836 | ENDIF |
---|
| 1837 | |
---|
| 1838 | ! |
---|
[72] | 1839 | !-- Set the default value for the integration interval of precipitation amount |
---|
| 1840 | IF ( precipitation ) THEN |
---|
| 1841 | IF ( precipitation_amount_interval == 9999999.9 ) THEN |
---|
| 1842 | precipitation_amount_interval = dt_do2d_xy |
---|
| 1843 | ELSE |
---|
| 1844 | IF ( precipitation_amount_interval > dt_do2d_xy ) THEN |
---|
[215] | 1845 | WRITE( message_string, * ) 'precipitation_amount_interval = ', & |
---|
| 1846 | precipitation_amount_interval, ' must not be larger than ', & |
---|
| 1847 | 'dt_do2d_xy = ', dt_do2d_xy |
---|
[226] | 1848 | CALL message( 'check_parameters', 'PA0090', 1, 2, 0, 6, 0 ) |
---|
[72] | 1849 | ENDIF |
---|
| 1850 | ENDIF |
---|
| 1851 | ENDIF |
---|
| 1852 | |
---|
| 1853 | ! |
---|
[1] | 1854 | !-- Determine the number of output profiles and check whether they are |
---|
| 1855 | !-- permissible |
---|
| 1856 | DO WHILE ( data_output_pr(dopr_n+1) /= ' ' ) |
---|
| 1857 | |
---|
| 1858 | dopr_n = dopr_n + 1 |
---|
| 1859 | i = dopr_n |
---|
| 1860 | |
---|
| 1861 | ! |
---|
| 1862 | !-- Determine internal profile number (for hom, homs) |
---|
| 1863 | !-- and store height levels |
---|
| 1864 | SELECT CASE ( TRIM( data_output_pr(i) ) ) |
---|
| 1865 | |
---|
| 1866 | CASE ( 'u', '#u' ) |
---|
| 1867 | dopr_index(i) = 1 |
---|
[87] | 1868 | dopr_unit(i) = 'm/s' |
---|
[1] | 1869 | hom(:,2,1,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1870 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1871 | dopr_initial_index(i) = 5 |
---|
| 1872 | hom(:,2,5,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1873 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1874 | ENDIF |
---|
| 1875 | |
---|
| 1876 | CASE ( 'v', '#v' ) |
---|
| 1877 | dopr_index(i) = 2 |
---|
[87] | 1878 | dopr_unit(i) = 'm/s' |
---|
| 1879 | hom(:,2,2,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[1] | 1880 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1881 | dopr_initial_index(i) = 6 |
---|
| 1882 | hom(:,2,6,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1883 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1884 | ENDIF |
---|
| 1885 | |
---|
| 1886 | CASE ( 'w' ) |
---|
| 1887 | dopr_index(i) = 3 |
---|
[87] | 1888 | dopr_unit(i) = 'm/s' |
---|
| 1889 | hom(:,2,3,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
[1] | 1890 | |
---|
| 1891 | CASE ( 'pt', '#pt' ) |
---|
| 1892 | IF ( .NOT. cloud_physics ) THEN |
---|
| 1893 | dopr_index(i) = 4 |
---|
[87] | 1894 | dopr_unit(i) = 'K' |
---|
[1] | 1895 | hom(:,2,4,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1896 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1897 | dopr_initial_index(i) = 7 |
---|
| 1898 | hom(:,2,7,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[87] | 1899 | hom(nzb,2,7,:) = 0.0 ! because zu(nzb) is negative |
---|
[1] | 1900 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1901 | ENDIF |
---|
| 1902 | ELSE |
---|
| 1903 | dopr_index(i) = 43 |
---|
[87] | 1904 | dopr_unit(i) = 'K' |
---|
[1] | 1905 | hom(:,2,43,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1906 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1907 | dopr_initial_index(i) = 28 |
---|
| 1908 | hom(:,2,28,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[87] | 1909 | hom(nzb,2,28,:) = 0.0 ! because zu(nzb) is negative |
---|
[1] | 1910 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1911 | ENDIF |
---|
| 1912 | ENDIF |
---|
| 1913 | |
---|
| 1914 | CASE ( 'e' ) |
---|
| 1915 | dopr_index(i) = 8 |
---|
[87] | 1916 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1917 | hom(:,2,8,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1918 | hom(nzb,2,8,:) = 0.0 |
---|
| 1919 | |
---|
| 1920 | CASE ( 'km', '#km' ) |
---|
| 1921 | dopr_index(i) = 9 |
---|
[87] | 1922 | dopr_unit(i) = 'm2/s' |
---|
[1] | 1923 | hom(:,2,9,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1924 | hom(nzb,2,9,:) = 0.0 |
---|
| 1925 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1926 | dopr_initial_index(i) = 23 |
---|
| 1927 | hom(:,2,23,:) = hom(:,2,9,:) |
---|
| 1928 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1929 | ENDIF |
---|
| 1930 | |
---|
| 1931 | CASE ( 'kh', '#kh' ) |
---|
| 1932 | dopr_index(i) = 10 |
---|
[87] | 1933 | dopr_unit(i) = 'm2/s' |
---|
[1] | 1934 | hom(:,2,10,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1935 | hom(nzb,2,10,:) = 0.0 |
---|
| 1936 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1937 | dopr_initial_index(i) = 24 |
---|
| 1938 | hom(:,2,24,:) = hom(:,2,10,:) |
---|
| 1939 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1940 | ENDIF |
---|
| 1941 | |
---|
| 1942 | CASE ( 'l', '#l' ) |
---|
| 1943 | dopr_index(i) = 11 |
---|
[87] | 1944 | dopr_unit(i) = 'm' |
---|
[1] | 1945 | hom(:,2,11,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 1946 | hom(nzb,2,11,:) = 0.0 |
---|
| 1947 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 1948 | dopr_initial_index(i) = 25 |
---|
| 1949 | hom(:,2,25,:) = hom(:,2,11,:) |
---|
| 1950 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 1951 | ENDIF |
---|
| 1952 | |
---|
| 1953 | CASE ( 'w"u"' ) |
---|
| 1954 | dopr_index(i) = 12 |
---|
[87] | 1955 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1956 | hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1957 | IF ( prandtl_layer ) hom(nzb,2,12,:) = zu(1) |
---|
| 1958 | |
---|
| 1959 | CASE ( 'w*u*' ) |
---|
| 1960 | dopr_index(i) = 13 |
---|
[87] | 1961 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1962 | hom(:,2,13,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1963 | |
---|
| 1964 | CASE ( 'w"v"' ) |
---|
| 1965 | dopr_index(i) = 14 |
---|
[87] | 1966 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1967 | hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1968 | IF ( prandtl_layer ) hom(nzb,2,14,:) = zu(1) |
---|
| 1969 | |
---|
| 1970 | CASE ( 'w*v*' ) |
---|
| 1971 | dopr_index(i) = 15 |
---|
[87] | 1972 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1973 | hom(:,2,15,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1974 | |
---|
| 1975 | CASE ( 'w"pt"' ) |
---|
| 1976 | dopr_index(i) = 16 |
---|
[87] | 1977 | dopr_unit(i) = 'K m/s' |
---|
[1] | 1978 | hom(:,2,16,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1979 | |
---|
| 1980 | CASE ( 'w*pt*' ) |
---|
| 1981 | dopr_index(i) = 17 |
---|
[87] | 1982 | dopr_unit(i) = 'K m/s' |
---|
[1] | 1983 | hom(:,2,17,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1984 | |
---|
| 1985 | CASE ( 'wpt' ) |
---|
| 1986 | dopr_index(i) = 18 |
---|
[87] | 1987 | dopr_unit(i) = 'K m/s' |
---|
[1] | 1988 | hom(:,2,18,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1989 | |
---|
| 1990 | CASE ( 'wu' ) |
---|
| 1991 | dopr_index(i) = 19 |
---|
[87] | 1992 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1993 | hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 1994 | IF ( prandtl_layer ) hom(nzb,2,19,:) = zu(1) |
---|
| 1995 | |
---|
| 1996 | CASE ( 'wv' ) |
---|
| 1997 | dopr_index(i) = 20 |
---|
[87] | 1998 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 1999 | hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2000 | IF ( prandtl_layer ) hom(nzb,2,20,:) = zu(1) |
---|
| 2001 | |
---|
| 2002 | CASE ( 'w*pt*BC' ) |
---|
| 2003 | dopr_index(i) = 21 |
---|
[87] | 2004 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2005 | hom(:,2,21,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2006 | |
---|
| 2007 | CASE ( 'wptBC' ) |
---|
| 2008 | dopr_index(i) = 22 |
---|
[87] | 2009 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2010 | hom(:,2,22,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2011 | |
---|
[96] | 2012 | CASE ( 'sa', '#sa' ) |
---|
| 2013 | IF ( .NOT. ocean ) THEN |
---|
[215] | 2014 | message_string = 'data_output_pr = ' // & |
---|
| 2015 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2016 | 'lemented for ocean = .FALSE.' |
---|
[226] | 2017 | CALL message( 'check_parameters', 'PA0091', 1, 2, 0, 6, 0 ) |
---|
[96] | 2018 | ELSE |
---|
| 2019 | dopr_index(i) = 23 |
---|
| 2020 | dopr_unit(i) = 'psu' |
---|
| 2021 | hom(:,2,23,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2022 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2023 | dopr_initial_index(i) = 26 |
---|
| 2024 | hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2025 | hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2026 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2027 | ENDIF |
---|
| 2028 | ENDIF |
---|
| 2029 | |
---|
[1] | 2030 | CASE ( 'u*2' ) |
---|
| 2031 | dopr_index(i) = 30 |
---|
[87] | 2032 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 2033 | hom(:,2,30,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2034 | |
---|
| 2035 | CASE ( 'v*2' ) |
---|
| 2036 | dopr_index(i) = 31 |
---|
[87] | 2037 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 2038 | hom(:,2,31,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2039 | |
---|
| 2040 | CASE ( 'w*2' ) |
---|
| 2041 | dopr_index(i) = 32 |
---|
[87] | 2042 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 2043 | hom(:,2,32,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2044 | |
---|
| 2045 | CASE ( 'pt*2' ) |
---|
| 2046 | dopr_index(i) = 33 |
---|
[87] | 2047 | dopr_unit(i) = 'K2' |
---|
[1] | 2048 | hom(:,2,33,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2049 | |
---|
| 2050 | CASE ( 'e*' ) |
---|
| 2051 | dopr_index(i) = 34 |
---|
[87] | 2052 | dopr_unit(i) = 'm2/s2' |
---|
[1] | 2053 | hom(:,2,34,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2054 | |
---|
| 2055 | CASE ( 'w*2pt*' ) |
---|
| 2056 | dopr_index(i) = 35 |
---|
[87] | 2057 | dopr_unit(i) = 'K m2/s2' |
---|
[1] | 2058 | hom(:,2,35,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2059 | |
---|
| 2060 | CASE ( 'w*pt*2' ) |
---|
| 2061 | dopr_index(i) = 36 |
---|
[87] | 2062 | dopr_unit(i) = 'K2 m/s' |
---|
[1] | 2063 | hom(:,2,36,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2064 | |
---|
| 2065 | CASE ( 'w*e*' ) |
---|
| 2066 | dopr_index(i) = 37 |
---|
[87] | 2067 | dopr_unit(i) = 'm3/s3' |
---|
[1] | 2068 | hom(:,2,37,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2069 | |
---|
| 2070 | CASE ( 'w*3' ) |
---|
| 2071 | dopr_index(i) = 38 |
---|
[87] | 2072 | dopr_unit(i) = 'm3/s3' |
---|
[1] | 2073 | hom(:,2,38,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2074 | |
---|
| 2075 | CASE ( 'Sw' ) |
---|
| 2076 | dopr_index(i) = 39 |
---|
[89] | 2077 | dopr_unit(i) = 'none' |
---|
[1] | 2078 | hom(:,2,39,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2079 | |
---|
[232] | 2080 | CASE ( 'p' ) |
---|
| 2081 | dopr_index(i) = 40 |
---|
| 2082 | dopr_unit(i) = 'Pa' |
---|
| 2083 | hom(:,2,40,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2084 | |
---|
[1] | 2085 | CASE ( 'q', '#q' ) |
---|
[108] | 2086 | IF ( .NOT. humidity ) THEN |
---|
[215] | 2087 | message_string = 'data_output_pr = ' // & |
---|
| 2088 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2089 | 'lemented for humidity = .FALSE.' |
---|
[226] | 2090 | CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 ) |
---|
[1] | 2091 | ELSE |
---|
| 2092 | dopr_index(i) = 41 |
---|
[87] | 2093 | dopr_unit(i) = 'kg/kg' |
---|
| 2094 | hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[1] | 2095 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2096 | dopr_initial_index(i) = 26 |
---|
| 2097 | hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2098 | hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2099 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2100 | ENDIF |
---|
| 2101 | ENDIF |
---|
| 2102 | |
---|
| 2103 | CASE ( 's', '#s' ) |
---|
| 2104 | IF ( .NOT. passive_scalar ) THEN |
---|
[215] | 2105 | message_string = 'data_output_pr = ' // & |
---|
| 2106 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2107 | 'lemented for passive_scalar = .FALSE.' |
---|
[226] | 2108 | CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) |
---|
[1] | 2109 | ELSE |
---|
| 2110 | dopr_index(i) = 41 |
---|
[87] | 2111 | dopr_unit(i) = 'kg/m3' |
---|
| 2112 | hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[1] | 2113 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2114 | dopr_initial_index(i) = 26 |
---|
| 2115 | hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2116 | hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2117 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2118 | ENDIF |
---|
| 2119 | ENDIF |
---|
| 2120 | |
---|
| 2121 | CASE ( 'qv', '#qv' ) |
---|
| 2122 | IF ( .NOT. cloud_physics ) THEN |
---|
| 2123 | dopr_index(i) = 41 |
---|
[87] | 2124 | dopr_unit(i) = 'kg/kg' |
---|
| 2125 | hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[1] | 2126 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2127 | dopr_initial_index(i) = 26 |
---|
| 2128 | hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2129 | hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2130 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2131 | ENDIF |
---|
| 2132 | ELSE |
---|
| 2133 | dopr_index(i) = 42 |
---|
[87] | 2134 | dopr_unit(i) = 'kg/kg' |
---|
| 2135 | hom(:,2,42,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[1] | 2136 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2137 | dopr_initial_index(i) = 27 |
---|
| 2138 | hom(:,2,27,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2139 | hom(nzb,2,27,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2140 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2141 | ENDIF |
---|
| 2142 | ENDIF |
---|
| 2143 | |
---|
| 2144 | CASE ( 'lpt', '#lpt' ) |
---|
| 2145 | IF ( .NOT. cloud_physics ) THEN |
---|
[215] | 2146 | message_string = 'data_output_pr = ' // & |
---|
| 2147 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2148 | 'lemented for cloud_physics = .FALSE.' |
---|
[226] | 2149 | CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 ) |
---|
[1] | 2150 | ELSE |
---|
| 2151 | dopr_index(i) = 4 |
---|
[87] | 2152 | dopr_unit(i) = 'K' |
---|
[1] | 2153 | hom(:,2,4,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2154 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2155 | dopr_initial_index(i) = 7 |
---|
| 2156 | hom(:,2,7,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2157 | hom(nzb,2,7,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2158 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2159 | ENDIF |
---|
| 2160 | ENDIF |
---|
| 2161 | |
---|
| 2162 | CASE ( 'vpt', '#vpt' ) |
---|
| 2163 | dopr_index(i) = 44 |
---|
[87] | 2164 | dopr_unit(i) = 'K' |
---|
| 2165 | hom(:,2,44,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[1] | 2166 | IF ( data_output_pr(i)(1:1) == '#' ) THEN |
---|
| 2167 | dopr_initial_index(i) = 29 |
---|
| 2168 | hom(:,2,29,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2169 | hom(nzb,2,29,:) = 0.0 ! weil zu(nzb) negativ ist |
---|
| 2170 | data_output_pr(i) = data_output_pr(i)(2:) |
---|
| 2171 | ENDIF |
---|
| 2172 | |
---|
| 2173 | CASE ( 'w"vpt"' ) |
---|
| 2174 | dopr_index(i) = 45 |
---|
[87] | 2175 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2176 | hom(:,2,45,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2177 | |
---|
| 2178 | CASE ( 'w*vpt*' ) |
---|
| 2179 | dopr_index(i) = 46 |
---|
[87] | 2180 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2181 | hom(:,2,46,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2182 | |
---|
| 2183 | CASE ( 'wvpt' ) |
---|
| 2184 | dopr_index(i) = 47 |
---|
[87] | 2185 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2186 | hom(:,2,47,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2187 | |
---|
| 2188 | CASE ( 'w"q"' ) |
---|
[108] | 2189 | IF ( .NOT. humidity ) THEN |
---|
[215] | 2190 | message_string = 'data_output_pr = ' // & |
---|
| 2191 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2192 | 'lemented for humidity = .FALSE.' |
---|
[226] | 2193 | CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 ) |
---|
[1] | 2194 | ELSE |
---|
| 2195 | dopr_index(i) = 48 |
---|
[87] | 2196 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2197 | hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2198 | ENDIF |
---|
| 2199 | |
---|
| 2200 | CASE ( 'w*q*' ) |
---|
[108] | 2201 | IF ( .NOT. humidity ) THEN |
---|
[215] | 2202 | message_string = 'data_output_pr = ' // & |
---|
| 2203 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2204 | 'lemented for humidity = .FALSE.' |
---|
[226] | 2205 | CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 ) |
---|
[1] | 2206 | ELSE |
---|
| 2207 | dopr_index(i) = 49 |
---|
[87] | 2208 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2209 | hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2210 | ENDIF |
---|
| 2211 | |
---|
| 2212 | CASE ( 'wq' ) |
---|
[108] | 2213 | IF ( .NOT. humidity ) THEN |
---|
[215] | 2214 | message_string = 'data_output_pr = ' // & |
---|
| 2215 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2216 | 'lemented for humidity = .FALSE.' |
---|
[226] | 2217 | CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 ) |
---|
[1] | 2218 | ELSE |
---|
| 2219 | dopr_index(i) = 50 |
---|
[87] | 2220 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2221 | hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2222 | ENDIF |
---|
| 2223 | |
---|
| 2224 | CASE ( 'w"s"' ) |
---|
| 2225 | IF ( .NOT. passive_scalar ) THEN |
---|
[215] | 2226 | message_string = 'data_output_pr = ' // & |
---|
| 2227 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2228 | 'lemented for passive_scalar = .FALSE.' |
---|
[226] | 2229 | CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) |
---|
[1] | 2230 | ELSE |
---|
| 2231 | dopr_index(i) = 48 |
---|
[87] | 2232 | dopr_unit(i) = 'kg/m3 m/s' |
---|
[1] | 2233 | hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2234 | ENDIF |
---|
| 2235 | |
---|
| 2236 | CASE ( 'w*s*' ) |
---|
| 2237 | IF ( .NOT. passive_scalar ) THEN |
---|
[215] | 2238 | message_string = 'data_output_pr = ' // & |
---|
| 2239 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2240 | 'lemented for passive_scalar = .FALSE.' |
---|
[226] | 2241 | CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) |
---|
[1] | 2242 | ELSE |
---|
| 2243 | dopr_index(i) = 49 |
---|
[87] | 2244 | dopr_unit(i) = 'kg/m3 m/s' |
---|
[1] | 2245 | hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2246 | ENDIF |
---|
| 2247 | |
---|
| 2248 | CASE ( 'ws' ) |
---|
| 2249 | IF ( .NOT. passive_scalar ) THEN |
---|
[215] | 2250 | message_string = 'data_output_pr = ' // & |
---|
| 2251 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2252 | 'lemented for passive_scalar = .FALSE.' |
---|
[226] | 2253 | CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 ) |
---|
[1] | 2254 | ELSE |
---|
| 2255 | dopr_index(i) = 50 |
---|
[87] | 2256 | dopr_unit(i) = 'kg/m3 m/s' |
---|
[1] | 2257 | hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2258 | ENDIF |
---|
| 2259 | |
---|
| 2260 | CASE ( 'w"qv"' ) |
---|
[75] | 2261 | IF ( humidity .AND. .NOT. cloud_physics ) & |
---|
[1] | 2262 | THEN |
---|
| 2263 | dopr_index(i) = 48 |
---|
[87] | 2264 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2265 | hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
[75] | 2266 | ELSEIF( humidity .AND. cloud_physics ) THEN |
---|
[1] | 2267 | dopr_index(i) = 51 |
---|
[87] | 2268 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2269 | hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2270 | ELSE |
---|
[215] | 2271 | message_string = 'data_output_pr = ' // & |
---|
| 2272 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2273 | 'lemented for cloud_physics = .FALSE. an&' // & |
---|
| 2274 | 'd humidity = .FALSE.' |
---|
[226] | 2275 | CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 ) |
---|
[1] | 2276 | ENDIF |
---|
| 2277 | |
---|
| 2278 | CASE ( 'w*qv*' ) |
---|
[75] | 2279 | IF ( humidity .AND. .NOT. cloud_physics ) & |
---|
[1] | 2280 | THEN |
---|
| 2281 | dopr_index(i) = 49 |
---|
[87] | 2282 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2283 | hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
[75] | 2284 | ELSEIF( humidity .AND. cloud_physics ) THEN |
---|
[1] | 2285 | dopr_index(i) = 52 |
---|
[87] | 2286 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2287 | hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2288 | ELSE |
---|
[215] | 2289 | message_string = 'data_output_pr = ' // & |
---|
| 2290 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2291 | 'lemented for cloud_physics = .FALSE. an&' // & |
---|
| 2292 | 'd humidity = .FALSE.' |
---|
[226] | 2293 | CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 ) |
---|
[1] | 2294 | ENDIF |
---|
| 2295 | |
---|
| 2296 | CASE ( 'wqv' ) |
---|
[75] | 2297 | IF ( humidity .AND. .NOT. cloud_physics ) & |
---|
[1] | 2298 | THEN |
---|
| 2299 | dopr_index(i) = 50 |
---|
[87] | 2300 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2301 | hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
[75] | 2302 | ELSEIF( humidity .AND. cloud_physics ) THEN |
---|
[1] | 2303 | dopr_index(i) = 53 |
---|
[87] | 2304 | dopr_unit(i) = 'kg/kg m/s' |
---|
[1] | 2305 | hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2306 | ELSE |
---|
[215] | 2307 | message_string = 'data_output_pr = ' // & |
---|
| 2308 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2309 | 'lemented for cloud_physics = .FALSE. an&' // & |
---|
| 2310 | 'd humidity = .FALSE.' |
---|
[226] | 2311 | CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 ) |
---|
[1] | 2312 | ENDIF |
---|
| 2313 | |
---|
| 2314 | CASE ( 'ql' ) |
---|
| 2315 | IF ( .NOT. cloud_physics .AND. .NOT. cloud_droplets ) THEN |
---|
[215] | 2316 | message_string = 'data_output_pr = ' // & |
---|
| 2317 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2318 | 'lemented for cloud_physics = .FALSE. or' // & |
---|
| 2319 | '&cloud_droplets = .FALSE.' |
---|
[226] | 2320 | CALL message( 'check_parameters', 'PA0096', 1, 2, 0, 6, 0 ) |
---|
[1] | 2321 | ELSE |
---|
| 2322 | dopr_index(i) = 54 |
---|
[87] | 2323 | dopr_unit(i) = 'kg/kg' |
---|
[1] | 2324 | hom(:,2,54,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2325 | ENDIF |
---|
| 2326 | |
---|
[524] | 2327 | CASE ( 'w*u*u*:dz' ) |
---|
[1] | 2328 | dopr_index(i) = 55 |
---|
[87] | 2329 | dopr_unit(i) = 'm2/s3' |
---|
[1] | 2330 | hom(:,2,55,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2331 | |
---|
[524] | 2332 | CASE ( 'w*p*:dz' ) |
---|
[1] | 2333 | dopr_index(i) = 56 |
---|
[87] | 2334 | dopr_unit(i) = 'm2/s3' |
---|
[106] | 2335 | hom(:,2,56,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
[1] | 2336 | |
---|
[524] | 2337 | CASE ( 'w"e:dz' ) |
---|
[1] | 2338 | dopr_index(i) = 57 |
---|
[87] | 2339 | dopr_unit(i) = 'm2/s3' |
---|
[1] | 2340 | hom(:,2,57,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2341 | |
---|
[667] | 2342 | |
---|
[1] | 2343 | CASE ( 'u"pt"' ) |
---|
| 2344 | dopr_index(i) = 58 |
---|
[87] | 2345 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2346 | hom(:,2,58,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2347 | |
---|
| 2348 | CASE ( 'u*pt*' ) |
---|
| 2349 | dopr_index(i) = 59 |
---|
[87] | 2350 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2351 | hom(:,2,59,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2352 | |
---|
| 2353 | CASE ( 'upt_t' ) |
---|
| 2354 | dopr_index(i) = 60 |
---|
[87] | 2355 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2356 | hom(:,2,60,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2357 | |
---|
| 2358 | CASE ( 'v"pt"' ) |
---|
| 2359 | dopr_index(i) = 61 |
---|
[87] | 2360 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2361 | hom(:,2,61,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2362 | |
---|
| 2363 | CASE ( 'v*pt*' ) |
---|
| 2364 | dopr_index(i) = 62 |
---|
[87] | 2365 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2366 | hom(:,2,62,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2367 | |
---|
| 2368 | CASE ( 'vpt_t' ) |
---|
| 2369 | dopr_index(i) = 63 |
---|
[87] | 2370 | dopr_unit(i) = 'K m/s' |
---|
[1] | 2371 | hom(:,2,63,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2372 | |
---|
[96] | 2373 | CASE ( 'rho' ) |
---|
[388] | 2374 | IF ( .NOT. ocean ) THEN |
---|
| 2375 | message_string = 'data_output_pr = ' // & |
---|
| 2376 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2377 | 'lemented for ocean = .FALSE.' |
---|
| 2378 | CALL message( 'check_parameters', 'PA0091', 1, 2, 0, 6, 0 ) |
---|
| 2379 | ELSE |
---|
| 2380 | dopr_index(i) = 64 |
---|
| 2381 | dopr_unit(i) = 'kg/m3' |
---|
| 2382 | hom(:,2,64,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2383 | ENDIF |
---|
[1] | 2384 | |
---|
[96] | 2385 | CASE ( 'w"sa"' ) |
---|
| 2386 | IF ( .NOT. ocean ) THEN |
---|
[215] | 2387 | message_string = 'data_output_pr = ' // & |
---|
| 2388 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2389 | 'lemented for ocean = .FALSE.' |
---|
[226] | 2390 | CALL message( 'check_parameters', 'PA0091', 1, 2, 0, 6, 0 ) |
---|
[96] | 2391 | ELSE |
---|
| 2392 | dopr_index(i) = 65 |
---|
| 2393 | dopr_unit(i) = 'psu m/s' |
---|
| 2394 | hom(:,2,65,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2395 | ENDIF |
---|
| 2396 | |
---|
| 2397 | CASE ( 'w*sa*' ) |
---|
| 2398 | IF ( .NOT. ocean ) THEN |
---|
[215] | 2399 | message_string = 'data_output_pr = ' // & |
---|
| 2400 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2401 | 'lemented for ocean = .FALSE.' |
---|
[226] | 2402 | CALL message( 'check_parameters', 'PA0091', 1, 2, 0, 6, 0 ) |
---|
[96] | 2403 | ELSE |
---|
| 2404 | dopr_index(i) = 66 |
---|
| 2405 | dopr_unit(i) = 'psu m/s' |
---|
| 2406 | hom(:,2,66,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2407 | ENDIF |
---|
| 2408 | |
---|
| 2409 | CASE ( 'wsa' ) |
---|
| 2410 | IF ( .NOT. ocean ) THEN |
---|
[215] | 2411 | message_string = 'data_output_pr = ' // & |
---|
| 2412 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2413 | 'lemented for ocean = .FALSE.' |
---|
[226] | 2414 | CALL message( 'check_parameters', 'PA0091', 1, 2, 0, 6, 0 ) |
---|
[96] | 2415 | ELSE |
---|
| 2416 | dopr_index(i) = 67 |
---|
| 2417 | dopr_unit(i) = 'psu m/s' |
---|
| 2418 | hom(:,2,67,:) = SPREAD( zw, 2, statistic_regions+1 ) |
---|
| 2419 | ENDIF |
---|
| 2420 | |
---|
[106] | 2421 | CASE ( 'w*p*' ) |
---|
| 2422 | dopr_index(i) = 68 |
---|
| 2423 | dopr_unit(i) = 'm3/s3' |
---|
| 2424 | hom(:,2,68,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
[96] | 2425 | |
---|
[106] | 2426 | CASE ( 'w"e' ) |
---|
| 2427 | dopr_index(i) = 69 |
---|
| 2428 | dopr_unit(i) = 'm3/s3' |
---|
| 2429 | hom(:,2,69,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2430 | |
---|
[197] | 2431 | CASE ( 'q*2' ) |
---|
| 2432 | IF ( .NOT. humidity ) THEN |
---|
[215] | 2433 | message_string = 'data_output_pr = ' // & |
---|
| 2434 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2435 | 'lemented for humidity = .FALSE.' |
---|
[226] | 2436 | CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 ) |
---|
[197] | 2437 | ELSE |
---|
| 2438 | dopr_index(i) = 70 |
---|
| 2439 | dopr_unit(i) = 'kg2/kg2' |
---|
| 2440 | hom(:,2,70,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2441 | ENDIF |
---|
[106] | 2442 | |
---|
[388] | 2443 | CASE ( 'prho' ) |
---|
| 2444 | IF ( .NOT. ocean ) THEN |
---|
| 2445 | message_string = 'data_output_pr = ' // & |
---|
| 2446 | TRIM( data_output_pr(i) ) // ' is not imp' // & |
---|
| 2447 | 'lemented for ocean = .FALSE.' |
---|
| 2448 | CALL message( 'check_parameters', 'PA0091', 1, 2, 0, 6, 0 ) |
---|
| 2449 | ELSE |
---|
| 2450 | dopr_index(i) = 71 |
---|
| 2451 | dopr_unit(i) = 'kg/m3' |
---|
| 2452 | hom(:,2,71,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2453 | ENDIF |
---|
| 2454 | |
---|
| 2455 | CASE ( 'hyp' ) |
---|
| 2456 | dopr_index(i) = 72 |
---|
[531] | 2457 | dopr_unit(i) = 'dbar' |
---|
[388] | 2458 | hom(:,2,72,:) = SPREAD( zu, 2, statistic_regions+1 ) |
---|
| 2459 | |
---|
[1] | 2460 | CASE DEFAULT |
---|
[87] | 2461 | |
---|
| 2462 | CALL user_check_data_output_pr( data_output_pr(i), i, unit ) |
---|
| 2463 | |
---|
| 2464 | IF ( unit == 'illegal' ) THEN |
---|
[215] | 2465 | IF ( data_output_pr_user(1) /= ' ' ) THEN |
---|
| 2466 | message_string = 'illegal value for data_output_pr or ' // & |
---|
| 2467 | 'data_output_pr_user = "' // & |
---|
| 2468 | TRIM( data_output_pr(i) ) // '"' |
---|
[226] | 2469 | CALL message( 'check_parameters', 'PA0097', 1, 2, 0, 6, 0 ) |
---|
[215] | 2470 | ELSE |
---|
| 2471 | message_string = 'illegal value for data_output_pr = "' // & |
---|
| 2472 | TRIM( data_output_pr(i) ) // '"' |
---|
[226] | 2473 | CALL message( 'check_parameters', 'PA0098', 1, 2, 0, 6, 0 ) |
---|
[87] | 2474 | ENDIF |
---|
[1] | 2475 | ENDIF |
---|
| 2476 | |
---|
| 2477 | END SELECT |
---|
[667] | 2478 | |
---|
[1] | 2479 | ENDDO |
---|
| 2480 | |
---|
| 2481 | |
---|
| 2482 | ! |
---|
| 2483 | !-- Append user-defined data output variables to the standard data output |
---|
| 2484 | IF ( data_output_user(1) /= ' ' ) THEN |
---|
| 2485 | i = 1 |
---|
| 2486 | DO WHILE ( data_output(i) /= ' ' .AND. i <= 100 ) |
---|
| 2487 | i = i + 1 |
---|
| 2488 | ENDDO |
---|
| 2489 | j = 1 |
---|
| 2490 | DO WHILE ( data_output_user(j) /= ' ' .AND. j <= 100 ) |
---|
| 2491 | IF ( i > 100 ) THEN |
---|
[215] | 2492 | message_string = 'number of output quantitities given by data' // & |
---|
| 2493 | '_output and data_output_user exceeds the limit of 100' |
---|
[226] | 2494 | CALL message( 'check_parameters', 'PA0102', 1, 2, 0, 6, 0 ) |
---|
[1] | 2495 | ENDIF |
---|
| 2496 | data_output(i) = data_output_user(j) |
---|
| 2497 | i = i + 1 |
---|
| 2498 | j = j + 1 |
---|
| 2499 | ENDDO |
---|
| 2500 | ENDIF |
---|
| 2501 | |
---|
| 2502 | ! |
---|
| 2503 | !-- Check and set steering parameters for 2d/3d data output and averaging |
---|
| 2504 | i = 1 |
---|
| 2505 | DO WHILE ( data_output(i) /= ' ' .AND. i <= 100 ) |
---|
| 2506 | ! |
---|
| 2507 | !-- Check for data averaging |
---|
| 2508 | ilen = LEN_TRIM( data_output(i) ) |
---|
| 2509 | j = 0 ! no data averaging |
---|
| 2510 | IF ( ilen > 3 ) THEN |
---|
| 2511 | IF ( data_output(i)(ilen-2:ilen) == '_av' ) THEN |
---|
| 2512 | j = 1 ! data averaging |
---|
| 2513 | data_output(i) = data_output(i)(1:ilen-3) |
---|
| 2514 | ENDIF |
---|
| 2515 | ENDIF |
---|
| 2516 | ! |
---|
| 2517 | !-- Check for cross section or volume data |
---|
| 2518 | ilen = LEN_TRIM( data_output(i) ) |
---|
| 2519 | k = 0 ! 3d data |
---|
| 2520 | var = data_output(i)(1:ilen) |
---|
| 2521 | IF ( ilen > 3 ) THEN |
---|
| 2522 | IF ( data_output(i)(ilen-2:ilen) == '_xy' .OR. & |
---|
| 2523 | data_output(i)(ilen-2:ilen) == '_xz' .OR. & |
---|
| 2524 | data_output(i)(ilen-2:ilen) == '_yz' ) THEN |
---|
| 2525 | k = 1 ! 2d data |
---|
| 2526 | var = data_output(i)(1:ilen-3) |
---|
| 2527 | ENDIF |
---|
| 2528 | ENDIF |
---|
| 2529 | ! |
---|
| 2530 | !-- Check for allowed value and set units |
---|
| 2531 | SELECT CASE ( TRIM( var ) ) |
---|
| 2532 | |
---|
| 2533 | CASE ( 'e' ) |
---|
| 2534 | IF ( constant_diffusion ) THEN |
---|
[215] | 2535 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2536 | 'res constant_diffusion = .FALSE.' |
---|
[226] | 2537 | CALL message( 'check_parameters', 'PA0103', 1, 2, 0, 6, 0 ) |
---|
[1] | 2538 | ENDIF |
---|
| 2539 | unit = 'm2/s2' |
---|
| 2540 | |
---|
[771] | 2541 | CASE ( 'lpt' ) |
---|
| 2542 | IF ( .NOT. cloud_physics ) THEN |
---|
| 2543 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
[773] | 2544 | 'res cloud_physics = .TRUE.' |
---|
| 2545 | CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) |
---|
[771] | 2546 | ENDIF |
---|
| 2547 | unit = 'K' |
---|
| 2548 | |
---|
[1] | 2549 | CASE ( 'pc', 'pr' ) |
---|
| 2550 | IF ( .NOT. particle_advection ) THEN |
---|
[215] | 2551 | message_string = 'output of "' // TRIM( var ) // '" requir' // & |
---|
| 2552 | 'es a "particles_par"-NAMELIST in the parameter file (PARIN)' |
---|
[226] | 2553 | CALL message( 'check_parameters', 'PA0104', 1, 2, 0, 6, 0 ) |
---|
[1] | 2554 | ENDIF |
---|
| 2555 | IF ( TRIM( var ) == 'pc' ) unit = 'number' |
---|
| 2556 | IF ( TRIM( var ) == 'pr' ) unit = 'm' |
---|
| 2557 | |
---|
| 2558 | CASE ( 'q', 'vpt' ) |
---|
[75] | 2559 | IF ( .NOT. humidity ) THEN |
---|
[215] | 2560 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2561 | 'res humidity = .TRUE.' |
---|
[226] | 2562 | CALL message( 'check_parameters', 'PA0105', 1, 2, 0, 6, 0 ) |
---|
[1] | 2563 | ENDIF |
---|
| 2564 | IF ( TRIM( var ) == 'q' ) unit = 'kg/kg' |
---|
| 2565 | IF ( TRIM( var ) == 'vpt' ) unit = 'K' |
---|
| 2566 | |
---|
| 2567 | CASE ( 'ql' ) |
---|
| 2568 | IF ( .NOT. ( cloud_physics .OR. cloud_droplets ) ) THEN |
---|
[215] | 2569 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2570 | 'res cloud_physics = .TRUE. or cloud_droplets = .TRUE.' |
---|
[226] | 2571 | CALL message( 'check_parameters', 'PA0106', 1, 2, 0, 6, 0 ) |
---|
[1] | 2572 | ENDIF |
---|
| 2573 | unit = 'kg/kg' |
---|
| 2574 | |
---|
| 2575 | CASE ( 'ql_c', 'ql_v', 'ql_vp' ) |
---|
| 2576 | IF ( .NOT. cloud_droplets ) THEN |
---|
[215] | 2577 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2578 | 'res cloud_droplets = .TRUE.' |
---|
[226] | 2579 | CALL message( 'check_parameters', 'PA0107', 1, 2, 0, 6, 0 ) |
---|
[1] | 2580 | ENDIF |
---|
| 2581 | IF ( TRIM( var ) == 'ql_c' ) unit = 'kg/kg' |
---|
| 2582 | IF ( TRIM( var ) == 'ql_v' ) unit = 'm3' |
---|
| 2583 | IF ( TRIM( var ) == 'ql_vp' ) unit = 'none' |
---|
| 2584 | |
---|
| 2585 | CASE ( 'qv' ) |
---|
| 2586 | IF ( .NOT. cloud_physics ) THEN |
---|
[215] | 2587 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2588 | 'res cloud_physics = .TRUE.' |
---|
[226] | 2589 | CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) |
---|
[1] | 2590 | ENDIF |
---|
| 2591 | unit = 'kg/kg' |
---|
| 2592 | |
---|
[96] | 2593 | CASE ( 'rho' ) |
---|
| 2594 | IF ( .NOT. ocean ) THEN |
---|
[215] | 2595 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2596 | 'res ocean = .TRUE.' |
---|
[226] | 2597 | CALL message( 'check_parameters', 'PA0109', 1, 2, 0, 6, 0 ) |
---|
[96] | 2598 | ENDIF |
---|
| 2599 | unit = 'kg/m3' |
---|
| 2600 | |
---|
[1] | 2601 | CASE ( 's' ) |
---|
| 2602 | IF ( .NOT. passive_scalar ) THEN |
---|
[215] | 2603 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2604 | 'res passive_scalar = .TRUE.' |
---|
[226] | 2605 | CALL message( 'check_parameters', 'PA0110', 1, 2, 0, 6, 0 ) |
---|
[1] | 2606 | ENDIF |
---|
| 2607 | unit = 'conc' |
---|
| 2608 | |
---|
[96] | 2609 | CASE ( 'sa' ) |
---|
| 2610 | IF ( .NOT. ocean ) THEN |
---|
[215] | 2611 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2612 | 'res ocean = .TRUE.' |
---|
[226] | 2613 | CALL message( 'check_parameters', 'PA0109', 1, 2, 0, 6, 0 ) |
---|
[96] | 2614 | ENDIF |
---|
| 2615 | unit = 'psu' |
---|
| 2616 | |
---|
[978] | 2617 | CASE ( 'u*', 't*', 'lwp*', 'pra*', 'prr*', 'qsws*', 'shf*', 'z0*', 'z0h*' ) |
---|
[1] | 2618 | IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN |
---|
[215] | 2619 | message_string = 'illegal value for data_output: "' // & |
---|
| 2620 | TRIM( var ) // '" & only 2d-horizontal ' // & |
---|
| 2621 | 'cross sections are allowed for this value' |
---|
[226] | 2622 | CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 ) |
---|
[1] | 2623 | ENDIF |
---|
| 2624 | IF ( TRIM( var ) == 'lwp*' .AND. .NOT. cloud_physics ) THEN |
---|
[215] | 2625 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2626 | 'res cloud_physics = .TRUE.' |
---|
[226] | 2627 | CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 ) |
---|
[1] | 2628 | ENDIF |
---|
[72] | 2629 | IF ( TRIM( var ) == 'pra*' .AND. .NOT. precipitation ) THEN |
---|
[215] | 2630 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2631 | 'res precipitation = .TRUE.' |
---|
[226] | 2632 | CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 ) |
---|
[72] | 2633 | ENDIF |
---|
| 2634 | IF ( TRIM( var ) == 'pra*' .AND. j == 1 ) THEN |
---|
[215] | 2635 | message_string = 'temporal averaging of precipitation ' // & |
---|
| 2636 | 'amount "' // TRIM( var ) // '" is not possible' |
---|
[226] | 2637 | CALL message( 'check_parameters', 'PA0113', 1, 2, 0, 6, 0 ) |
---|
[72] | 2638 | ENDIF |
---|
| 2639 | IF ( TRIM( var ) == 'prr*' .AND. .NOT. precipitation ) THEN |
---|
[215] | 2640 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2641 | 'res precipitation = .TRUE.' |
---|
[226] | 2642 | CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 ) |
---|
[72] | 2643 | ENDIF |
---|
[354] | 2644 | IF ( TRIM( var ) == 'qsws*' .AND. .NOT. humidity ) THEN |
---|
| 2645 | message_string = 'output of "' // TRIM( var ) // '" requi' // & |
---|
| 2646 | 'res humidity = .TRUE.' |
---|
| 2647 | CALL message( 'check_parameters', 'PA0322', 1, 2, 0, 6, 0 ) |
---|
| 2648 | ENDIF |
---|
[72] | 2649 | |
---|
[354] | 2650 | IF ( TRIM( var ) == 'lwp*' ) unit = 'kg/kg*m' |
---|
| 2651 | IF ( TRIM( var ) == 'pra*' ) unit = 'mm' |
---|
| 2652 | IF ( TRIM( var ) == 'prr*' ) unit = 'mm/s' |
---|
| 2653 | IF ( TRIM( var ) == 'qsws*' ) unit = 'kgm/kgs' |
---|
| 2654 | IF ( TRIM( var ) == 'shf*' ) unit = 'K*m/s' |
---|
| 2655 | IF ( TRIM( var ) == 't*' ) unit = 'K' |
---|
| 2656 | IF ( TRIM( var ) == 'u*' ) unit = 'm/s' |
---|
| 2657 | IF ( TRIM( var ) == 'z0*' ) unit = 'm' |
---|
[996] | 2658 | IF ( TRIM( var ) == 'z0h*' ) unit = 'm' |
---|
[72] | 2659 | |
---|
[1] | 2660 | |
---|
| 2661 | CASE ( 'p', 'pt', 'u', 'v', 'w' ) |
---|
| 2662 | IF ( TRIM( var ) == 'p' ) unit = 'Pa' |
---|
| 2663 | IF ( TRIM( var ) == 'pt' ) unit = 'K' |
---|
| 2664 | IF ( TRIM( var ) == 'u' ) unit = 'm/s' |
---|
| 2665 | IF ( TRIM( var ) == 'v' ) unit = 'm/s' |
---|
| 2666 | IF ( TRIM( var ) == 'w' ) unit = 'm/s' |
---|
| 2667 | CONTINUE |
---|
| 2668 | |
---|
| 2669 | CASE DEFAULT |
---|
| 2670 | CALL user_check_data_output( var, unit ) |
---|
| 2671 | |
---|
| 2672 | IF ( unit == 'illegal' ) THEN |
---|
[215] | 2673 | IF ( data_output_user(1) /= ' ' ) THEN |
---|
| 2674 | message_string = 'illegal value for data_output or ' // & |
---|
| 2675 | 'data_output_user = "' // TRIM( data_output(i) ) // '"' |
---|
[226] | 2676 | CALL message( 'check_parameters', 'PA0114', 1, 2, 0, 6, 0 ) |
---|
[215] | 2677 | ELSE |
---|
| 2678 | message_string = 'illegal value for data_output =' // & |
---|
| 2679 | TRIM( data_output(i) ) // '"' |
---|
[226] | 2680 | CALL message( 'check_parameters', 'PA0115', 1, 2, 0, 6, 0 ) |
---|
[1] | 2681 | ENDIF |
---|
| 2682 | ENDIF |
---|
| 2683 | |
---|
| 2684 | END SELECT |
---|
| 2685 | ! |
---|
| 2686 | !-- Set the internal steering parameters appropriately |
---|
| 2687 | IF ( k == 0 ) THEN |
---|
| 2688 | do3d_no(j) = do3d_no(j) + 1 |
---|
| 2689 | do3d(j,do3d_no(j)) = data_output(i) |
---|
| 2690 | do3d_unit(j,do3d_no(j)) = unit |
---|
| 2691 | ELSE |
---|
| 2692 | do2d_no(j) = do2d_no(j) + 1 |
---|
| 2693 | do2d(j,do2d_no(j)) = data_output(i) |
---|
| 2694 | do2d_unit(j,do2d_no(j)) = unit |
---|
| 2695 | IF ( data_output(i)(ilen-2:ilen) == '_xy' ) THEN |
---|
| 2696 | data_output_xy(j) = .TRUE. |
---|
| 2697 | ENDIF |
---|
| 2698 | IF ( data_output(i)(ilen-2:ilen) == '_xz' ) THEN |
---|
| 2699 | data_output_xz(j) = .TRUE. |
---|
| 2700 | ENDIF |
---|
| 2701 | IF ( data_output(i)(ilen-2:ilen) == '_yz' ) THEN |
---|
| 2702 | data_output_yz(j) = .TRUE. |
---|
| 2703 | ENDIF |
---|
| 2704 | ENDIF |
---|
| 2705 | |
---|
| 2706 | IF ( j == 1 ) THEN |
---|
| 2707 | ! |
---|
| 2708 | !-- Check, if variable is already subject to averaging |
---|
| 2709 | found = .FALSE. |
---|
| 2710 | DO k = 1, doav_n |
---|
| 2711 | IF ( TRIM( doav(k) ) == TRIM( var ) ) found = .TRUE. |
---|
| 2712 | ENDDO |
---|
| 2713 | |
---|
| 2714 | IF ( .NOT. found ) THEN |
---|
| 2715 | doav_n = doav_n + 1 |
---|
| 2716 | doav(doav_n) = var |
---|
| 2717 | ENDIF |
---|
| 2718 | ENDIF |
---|
| 2719 | |
---|
| 2720 | i = i + 1 |
---|
| 2721 | ENDDO |
---|
| 2722 | |
---|
| 2723 | ! |
---|
[376] | 2724 | !-- Averaged 2d or 3d output requires that an averaging interval has been set |
---|
| 2725 | IF ( doav_n > 0 .AND. averaging_interval == 0.0 ) THEN |
---|
| 2726 | WRITE( message_string, * ) 'output of averaged quantity "', & |
---|
| 2727 | TRIM( doav(1) ), '_av" requires to set a ', & |
---|
| 2728 | 'non-zero & averaging interval' |
---|
| 2729 | CALL message( 'check_parameters', 'PA0323', 1, 2, 0, 6, 0 ) |
---|
| 2730 | ENDIF |
---|
| 2731 | |
---|
| 2732 | ! |
---|
[308] | 2733 | !-- Check sectional planes and store them in one shared array |
---|
| 2734 | IF ( ANY( section_xy > nz + 1 ) ) THEN |
---|
| 2735 | WRITE( message_string, * ) 'section_xy must be <= nz + 1 = ', nz + 1 |
---|
| 2736 | CALL message( 'check_parameters', 'PA0319', 1, 2, 0, 6, 0 ) |
---|
| 2737 | ENDIF |
---|
| 2738 | IF ( ANY( section_xz > ny + 1 ) ) THEN |
---|
| 2739 | WRITE( message_string, * ) 'section_xz must be <= ny + 1 = ', ny + 1 |
---|
| 2740 | CALL message( 'check_parameters', 'PA0320', 1, 2, 0, 6, 0 ) |
---|
| 2741 | ENDIF |
---|
| 2742 | IF ( ANY( section_yz > nx + 1 ) ) THEN |
---|
| 2743 | WRITE( message_string, * ) 'section_yz must be <= nx + 1 = ', nx + 1 |
---|
| 2744 | CALL message( 'check_parameters', 'PA0321', 1, 2, 0, 6, 0 ) |
---|
| 2745 | ENDIF |
---|
[1] | 2746 | section(:,1) = section_xy |
---|
| 2747 | section(:,2) = section_xz |
---|
| 2748 | section(:,3) = section_yz |
---|
| 2749 | |
---|
| 2750 | ! |
---|
| 2751 | !-- Upper plot limit for 2D vertical sections |
---|
| 2752 | IF ( z_max_do2d == -1.0 ) z_max_do2d = zu(nzt) |
---|
| 2753 | IF ( z_max_do2d < zu(nzb+1) .OR. z_max_do2d > zu(nzt) ) THEN |
---|
[215] | 2754 | WRITE( message_string, * ) 'z_max_do2d = ', z_max_do2d, & |
---|
| 2755 | ' must be >= ', zu(nzb+1), '(zu(nzb+1)) and <= ', zu(nzt), & |
---|
| 2756 | ' (zu(nzt))' |
---|
[226] | 2757 | CALL message( 'check_parameters', 'PA0116', 1, 2, 0, 6, 0 ) |
---|
[1] | 2758 | ENDIF |
---|
| 2759 | |
---|
| 2760 | ! |
---|
| 2761 | !-- Upper plot limit for 3D arrays |
---|
| 2762 | IF ( nz_do3d == -9999 ) nz_do3d = nzt + 1 |
---|
| 2763 | |
---|
| 2764 | ! |
---|
| 2765 | !-- Determine and check accuracy for compressed 3D plot output |
---|
| 2766 | IF ( do3d_compress ) THEN |
---|
| 2767 | ! |
---|
| 2768 | !-- Compression only permissible on T3E machines |
---|
| 2769 | IF ( host(1:3) /= 't3e' ) THEN |
---|
[215] | 2770 | message_string = 'do3d_compress = .TRUE. not allowed on host "' // & |
---|
| 2771 | TRIM( host ) // '"' |
---|
[226] | 2772 | CALL message( 'check_parameters', 'PA0117', 1, 2, 0, 6, 0 ) |
---|
[1] | 2773 | ENDIF |
---|
| 2774 | |
---|
| 2775 | i = 1 |
---|
| 2776 | DO WHILE ( do3d_comp_prec(i) /= ' ' ) |
---|
| 2777 | |
---|
| 2778 | ilen = LEN_TRIM( do3d_comp_prec(i) ) |
---|
| 2779 | IF ( LLT( do3d_comp_prec(i)(ilen:ilen), '0' ) .OR. & |
---|
| 2780 | LGT( do3d_comp_prec(i)(ilen:ilen), '9' ) ) THEN |
---|
[215] | 2781 | WRITE( message_string, * ) 'illegal precision: do3d_comp_prec', & |
---|
| 2782 | '(', i, ') = "', TRIM(do3d_comp_prec(i)),'"' |
---|
[226] | 2783 | CALL message( 'check_parameters', 'PA0118', 1, 2, 0, 6, 0 ) |
---|
[1] | 2784 | ENDIF |
---|
| 2785 | |
---|
| 2786 | prec = IACHAR( do3d_comp_prec(i)(ilen:ilen) ) - IACHAR( '0' ) |
---|
| 2787 | var = do3d_comp_prec(i)(1:ilen-1) |
---|
| 2788 | |
---|
| 2789 | SELECT CASE ( var ) |
---|
| 2790 | |
---|
| 2791 | CASE ( 'u' ) |
---|
| 2792 | j = 1 |
---|
| 2793 | CASE ( 'v' ) |
---|
| 2794 | j = 2 |
---|
| 2795 | CASE ( 'w' ) |
---|
| 2796 | j = 3 |
---|
| 2797 | CASE ( 'p' ) |
---|
| 2798 | j = 4 |
---|
| 2799 | CASE ( 'pt' ) |
---|
| 2800 | j = 5 |
---|
| 2801 | |
---|
| 2802 | CASE DEFAULT |
---|
[215] | 2803 | WRITE( message_string, * ) 'unknown variable "', & |
---|
| 2804 | TRIM( do3d_comp_prec(i) ), '" given for do3d_comp_prec(', & |
---|
| 2805 | i, ')' |
---|
[226] | 2806 | CALL message( 'check_parameters', 'PA0119', 1, 2, 0, 6, 0 ) |
---|
[1] | 2807 | |
---|
| 2808 | END SELECT |
---|
| 2809 | |
---|
| 2810 | plot_3d_precision(j)%precision = prec |
---|
| 2811 | i = i + 1 |
---|
| 2812 | |
---|
| 2813 | ENDDO |
---|
| 2814 | ENDIF |
---|
| 2815 | |
---|
| 2816 | ! |
---|
| 2817 | !-- Check the data output format(s) |
---|
| 2818 | IF ( data_output_format(1) == ' ' ) THEN |
---|
| 2819 | ! |
---|
| 2820 | !-- Default value |
---|
| 2821 | netcdf_output = .TRUE. |
---|
| 2822 | ELSE |
---|
| 2823 | i = 1 |
---|
| 2824 | DO WHILE ( data_output_format(i) /= ' ' ) |
---|
| 2825 | |
---|
| 2826 | SELECT CASE ( data_output_format(i) ) |
---|
| 2827 | |
---|
| 2828 | CASE ( 'netcdf' ) |
---|
| 2829 | netcdf_output = .TRUE. |
---|
| 2830 | CASE ( 'iso2d' ) |
---|
| 2831 | iso2d_output = .TRUE. |
---|
| 2832 | CASE ( 'avs' ) |
---|
| 2833 | avs_output = .TRUE. |
---|
| 2834 | |
---|
| 2835 | CASE DEFAULT |
---|
[215] | 2836 | message_string = 'unknown value for data_output_format "' // & |
---|
| 2837 | TRIM( data_output_format(i) ) // '"' |
---|
[226] | 2838 | CALL message( 'check_parameters', 'PA0120', 1, 2, 0, 6, 0 ) |
---|
[1] | 2839 | |
---|
| 2840 | END SELECT |
---|
| 2841 | |
---|
| 2842 | i = i + 1 |
---|
| 2843 | IF ( i > 10 ) EXIT |
---|
| 2844 | |
---|
| 2845 | ENDDO |
---|
| 2846 | |
---|
| 2847 | ENDIF |
---|
| 2848 | |
---|
| 2849 | ! |
---|
[410] | 2850 | !-- Check mask conditions |
---|
[553] | 2851 | DO mid = 1, max_masks |
---|
[567] | 2852 | IF ( data_output_masks(mid,1) /= ' ' .OR. & |
---|
| 2853 | data_output_masks_user(mid,1) /= ' ' ) THEN |
---|
[553] | 2854 | masks = masks + 1 |
---|
| 2855 | ENDIF |
---|
| 2856 | ENDDO |
---|
| 2857 | |
---|
[410] | 2858 | IF ( masks < 0 .OR. masks > max_masks ) THEN |
---|
| 2859 | WRITE( message_string, * ) 'illegal value: masks must be >= 0 and ', & |
---|
| 2860 | '<= ', max_masks, ' (=max_masks)' |
---|
[564] | 2861 | CALL message( 'check_parameters', 'PA0325', 1, 2, 0, 6, 0 ) |
---|
[410] | 2862 | ENDIF |
---|
| 2863 | IF ( masks > 0 ) THEN |
---|
| 2864 | mask_scale(1) = mask_scale_x |
---|
| 2865 | mask_scale(2) = mask_scale_y |
---|
| 2866 | mask_scale(3) = mask_scale_z |
---|
| 2867 | IF ( ANY( mask_scale <= 0.0 ) ) THEN |
---|
| 2868 | WRITE( message_string, * ) & |
---|
| 2869 | 'illegal value: mask_scale_x, mask_scale_y and mask_scale_z', & |
---|
| 2870 | 'must be > 0.0' |
---|
[564] | 2871 | CALL message( 'check_parameters', 'PA0326', 1, 2, 0, 6, 0 ) |
---|
[410] | 2872 | ENDIF |
---|
| 2873 | ! |
---|
| 2874 | !-- Generate masks for masked data output |
---|
| 2875 | CALL init_masks |
---|
| 2876 | ENDIF |
---|
| 2877 | |
---|
| 2878 | ! |
---|
[493] | 2879 | !-- Check the NetCDF data format |
---|
[924] | 2880 | #if ! defined ( __check ) |
---|
[493] | 2881 | IF ( netcdf_data_format > 2 ) THEN |
---|
[924] | 2882 | #if defined( __netcdf4 ) |
---|
[493] | 2883 | CONTINUE |
---|
| 2884 | #else |
---|
| 2885 | message_string = 'NetCDF: NetCDF4 format requested but no ' // & |
---|
| 2886 | 'cpp-directive __netcdf4 given & switch ' // & |
---|
| 2887 | 'back to 64-bit offset format' |
---|
| 2888 | CALL message( 'check_parameters', 'PA0171', 0, 1, 0, 6, 0 ) |
---|
| 2889 | netcdf_data_format = 2 |
---|
| 2890 | #endif |
---|
| 2891 | ENDIF |
---|
[892] | 2892 | #endif |
---|
[493] | 2893 | ! |
---|
[667] | 2894 | |
---|
[809] | 2895 | #if ! defined( __check ) |
---|
[1] | 2896 | !-- Check netcdf precison |
---|
| 2897 | ldum = .FALSE. |
---|
| 2898 | CALL define_netcdf_header( 'ch', ldum, 0 ) |
---|
[807] | 2899 | #endif |
---|
[1] | 2900 | ! |
---|
| 2901 | !-- Check, whether a constant diffusion coefficient shall be used |
---|
| 2902 | IF ( km_constant /= -1.0 ) THEN |
---|
| 2903 | IF ( km_constant < 0.0 ) THEN |
---|
[215] | 2904 | WRITE( message_string, * ) 'km_constant = ', km_constant, ' < 0.0' |
---|
[226] | 2905 | CALL message( 'check_parameters', 'PA0121', 1, 2, 0, 6, 0 ) |
---|
[1] | 2906 | ELSE |
---|
| 2907 | IF ( prandtl_number < 0.0 ) THEN |
---|
[215] | 2908 | WRITE( message_string, * ) 'prandtl_number = ', prandtl_number, & |
---|
| 2909 | ' < 0.0' |
---|
[226] | 2910 | CALL message( 'check_parameters', 'PA0122', 1, 2, 0, 6, 0 ) |
---|
[1] | 2911 | ENDIF |
---|
| 2912 | constant_diffusion = .TRUE. |
---|
| 2913 | |
---|
| 2914 | IF ( prandtl_layer ) THEN |
---|
[215] | 2915 | message_string = 'prandtl_layer is not allowed with fixed ' // & |
---|
| 2916 | 'value of km' |
---|
[226] | 2917 | CALL message( 'check_parameters', 'PA0123', 1, 2, 0, 6, 0 ) |
---|
[1] | 2918 | ENDIF |
---|
| 2919 | ENDIF |
---|
| 2920 | ENDIF |
---|
| 2921 | |
---|
| 2922 | ! |
---|
[978] | 2923 | !-- In case of non-cyclic lateral boundaries and a damping layer for the |
---|
| 2924 | !-- potential temperature, check the width of the damping layer |
---|
[1] | 2925 | IF ( bc_lr /= 'cyclic' ) THEN |
---|
[996] | 2926 | IF ( pt_damping_width < 0.0 .OR. pt_damping_width > REAL( nx * dx ) ) THEN |
---|
[978] | 2927 | message_string = 'pt_damping_width out of range' |
---|
[226] | 2928 | CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 ) |
---|
[1] | 2929 | ENDIF |
---|
| 2930 | ENDIF |
---|
| 2931 | |
---|
| 2932 | IF ( bc_ns /= 'cyclic' ) THEN |
---|
[996] | 2933 | IF ( pt_damping_width < 0.0 .OR. pt_damping_width > REAL( ny * dy ) ) THEN |
---|
[978] | 2934 | message_string = 'pt_damping_width out of range' |
---|
[226] | 2935 | CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 ) |
---|
[1] | 2936 | ENDIF |
---|
| 2937 | ENDIF |
---|
| 2938 | |
---|
| 2939 | ! |
---|
| 2940 | !-- Check value range for rif |
---|
| 2941 | IF ( rif_min >= rif_max ) THEN |
---|
[215] | 2942 | WRITE( message_string, * ) 'rif_min = ', rif_min, ' must be less ', & |
---|
| 2943 | 'than rif_max = ', rif_max |
---|
[226] | 2944 | CALL message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 ) |
---|
[1] | 2945 | ENDIF |
---|
| 2946 | |
---|
| 2947 | ! |
---|
| 2948 | !-- Determine upper and lower hight level indices for random perturbations |
---|
[97] | 2949 | IF ( disturbance_level_b == -9999999.9 ) THEN |
---|
| 2950 | IF ( ocean ) THEN |
---|
| 2951 | disturbance_level_b = zu((nzt*2)/3) |
---|
| 2952 | disturbance_level_ind_b = ( nzt * 2 ) / 3 |
---|
| 2953 | ELSE |
---|
| 2954 | disturbance_level_b = zu(nzb+3) |
---|
| 2955 | disturbance_level_ind_b = nzb + 3 |
---|
| 2956 | ENDIF |
---|
[1] | 2957 | ELSEIF ( disturbance_level_b < zu(3) ) THEN |
---|
[215] | 2958 | WRITE( message_string, * ) 'disturbance_level_b = ', & |
---|
| 2959 | disturbance_level_b, ' must be >= ', zu(3), '(zu(3))' |
---|
[226] | 2960 | CALL message( 'check_parameters', 'PA0126', 1, 2, 0, 6, 0 ) |
---|
[1] | 2961 | ELSEIF ( disturbance_level_b > zu(nzt-2) ) THEN |
---|
[215] | 2962 | WRITE( message_string, * ) 'disturbance_level_b = ', & |
---|
| 2963 | disturbance_level_b, ' must be <= ', zu(nzt-2), '(zu(nzt-2))' |
---|
[226] | 2964 | CALL message( 'check_parameters', 'PA0127', 1, 2, 0, 6, 0 ) |
---|
[1] | 2965 | ELSE |
---|
| 2966 | DO k = 3, nzt-2 |
---|
| 2967 | IF ( disturbance_level_b <= zu(k) ) THEN |
---|
| 2968 | disturbance_level_ind_b = k |
---|
| 2969 | EXIT |
---|
| 2970 | ENDIF |
---|
| 2971 | ENDDO |
---|
| 2972 | ENDIF |
---|
| 2973 | |
---|
[97] | 2974 | IF ( disturbance_level_t == -9999999.9 ) THEN |
---|
| 2975 | IF ( ocean ) THEN |
---|
| 2976 | disturbance_level_t = zu(nzt-3) |
---|
| 2977 | disturbance_level_ind_t = nzt - 3 |
---|
| 2978 | ELSE |
---|
| 2979 | disturbance_level_t = zu(nzt/3) |
---|
| 2980 | disturbance_level_ind_t = nzt / 3 |
---|
| 2981 | ENDIF |
---|
[1] | 2982 | ELSEIF ( disturbance_level_t > zu(nzt-2) ) THEN |
---|
[215] | 2983 | WRITE( message_string, * ) 'disturbance_level_t = ', & |
---|
| 2984 | disturbance_level_t, ' must be <= ', zu(nzt-2), '(zu(nzt-2))' |
---|
[226] | 2985 | CALL message( 'check_parameters', 'PA0128', 1, 2, 0, 6, 0 ) |
---|
[1] | 2986 | ELSEIF ( disturbance_level_t < disturbance_level_b ) THEN |
---|
[215] | 2987 | WRITE( message_string, * ) 'disturbance_level_t = ', & |
---|
| 2988 | disturbance_level_t, ' must be >= disturbance_level_b = ', & |
---|
| 2989 | disturbance_level_b |
---|
[226] | 2990 | CALL message( 'check_parameters', 'PA0129', 1, 2, 0, 6, 0 ) |
---|
[1] | 2991 | ELSE |
---|
| 2992 | DO k = 3, nzt-2 |
---|
| 2993 | IF ( disturbance_level_t <= zu(k) ) THEN |
---|
| 2994 | disturbance_level_ind_t = k |
---|
| 2995 | EXIT |
---|
| 2996 | ENDIF |
---|
| 2997 | ENDDO |
---|
| 2998 | ENDIF |
---|
| 2999 | |
---|
| 3000 | ! |
---|
| 3001 | !-- Check again whether the levels determined this way are ok. |
---|
| 3002 | !-- Error may occur at automatic determination and too few grid points in |
---|
| 3003 | !-- z-direction. |
---|
| 3004 | IF ( disturbance_level_ind_t < disturbance_level_ind_b ) THEN |
---|
[215] | 3005 | WRITE( message_string, * ) 'disturbance_level_ind_t = ', & |
---|
| 3006 | disturbance_level_ind_t, ' must be >= disturbance_level_b = ', & |
---|
| 3007 | disturbance_level_b |
---|
[226] | 3008 | CALL message( 'check_parameters', 'PA0130', 1, 2, 0, 6, 0 ) |
---|
[1] | 3009 | ENDIF |
---|
| 3010 | |
---|
| 3011 | ! |
---|
| 3012 | !-- Determine the horizontal index range for random perturbations. |
---|
| 3013 | !-- In case of non-cyclic horizontal boundaries, no perturbations are imposed |
---|
| 3014 | !-- near the inflow and the perturbation area is further limited to ...(1) |
---|
| 3015 | !-- after the initial phase of the flow. |
---|
| 3016 | dist_nxl = 0; dist_nxr = nx |
---|
| 3017 | dist_nys = 0; dist_nyn = ny |
---|
| 3018 | IF ( bc_lr /= 'cyclic' ) THEN |
---|
| 3019 | IF ( inflow_disturbance_begin == -1 ) THEN |
---|
| 3020 | inflow_disturbance_begin = MIN( 10, nx/2 ) |
---|
| 3021 | ENDIF |
---|
| 3022 | IF ( inflow_disturbance_begin < 0 .OR. inflow_disturbance_begin > nx )& |
---|
| 3023 | THEN |
---|
[215] | 3024 | message_string = 'inflow_disturbance_begin out of range' |
---|
[226] | 3025 | CALL message( 'check_parameters', 'PA0131', 1, 2, 0, 6, 0 ) |
---|
[1] | 3026 | ENDIF |
---|
| 3027 | IF ( inflow_disturbance_end == -1 ) THEN |
---|
| 3028 | inflow_disturbance_end = MIN( 100, 3*nx/4 ) |
---|
| 3029 | ENDIF |
---|
| 3030 | IF ( inflow_disturbance_end < 0 .OR. inflow_disturbance_end > nx ) & |
---|
| 3031 | THEN |
---|
[215] | 3032 | message_string = 'inflow_disturbance_end out of range' |
---|
[226] | 3033 | CALL message( 'check_parameters', 'PA0132', 1, 2, 0, 6, 0 ) |
---|
[1] | 3034 | ENDIF |
---|
| 3035 | ELSEIF ( bc_ns /= 'cyclic' ) THEN |
---|
| 3036 | IF ( inflow_disturbance_begin == -1 ) THEN |
---|
| 3037 | inflow_disturbance_begin = MIN( 10, ny/2 ) |
---|
| 3038 | ENDIF |
---|
| 3039 | IF ( inflow_disturbance_begin < 0 .OR. inflow_disturbance_begin > ny )& |
---|
| 3040 | THEN |
---|
[215] | 3041 | message_string = 'inflow_disturbance_begin out of range' |
---|
[226] | 3042 | CALL message( 'check_parameters', 'PA0131', 1, 2, 0, 6, 0 ) |
---|
[1] | 3043 | ENDIF |
---|
| 3044 | IF ( inflow_disturbance_end == -1 ) THEN |
---|
| 3045 | inflow_disturbance_end = MIN( 100, 3*ny/4 ) |
---|
| 3046 | ENDIF |
---|
| 3047 | IF ( inflow_disturbance_end < 0 .OR. inflow_disturbance_end > ny ) & |
---|
| 3048 | THEN |
---|
[215] | 3049 | message_string = 'inflow_disturbance_end out of range' |
---|
[226] | 3050 | CALL message( 'check_parameters', 'PA0132', 1, 2, 0, 6, 0 ) |
---|
[1] | 3051 | ENDIF |
---|
| 3052 | ENDIF |
---|
| 3053 | |
---|
[978] | 3054 | IF ( bc_lr == 'radiation/dirichlet' .OR. bc_lr == 'neumann/dirichlet' ) THEN |
---|
[1] | 3055 | dist_nxr = nx - inflow_disturbance_begin |
---|
| 3056 | dist_nxl(1) = nx - inflow_disturbance_end |
---|
[978] | 3057 | ELSEIF ( bc_lr == 'dirichlet/radiation' .OR. bc_lr == 'dirichlet/neumann' ) THEN |
---|
[1] | 3058 | dist_nxl = inflow_disturbance_begin |
---|
| 3059 | dist_nxr(1) = inflow_disturbance_end |
---|
[73] | 3060 | ENDIF |
---|
[978] | 3061 | IF ( bc_ns == 'dirichlet/radiation' .OR. bc_ns == 'dirichlet/neumann' ) THEN |
---|
[1] | 3062 | dist_nyn = ny - inflow_disturbance_begin |
---|
| 3063 | dist_nys(1) = ny - inflow_disturbance_end |
---|
[978] | 3064 | ELSEIF ( bc_ns == 'radiation/dirichlet' .OR. bc_ns == 'neumann/dirichlet' ) THEN |
---|
[1] | 3065 | dist_nys = inflow_disturbance_begin |
---|
| 3066 | dist_nyn(1) = inflow_disturbance_end |
---|
| 3067 | ENDIF |
---|
| 3068 | |
---|
| 3069 | ! |
---|
[151] | 3070 | !-- A turbulent inflow requires Dirichlet conditions at the respective inflow |
---|
| 3071 | !-- boundary (so far, a turbulent inflow is realized from the left side only) |
---|
[978] | 3072 | IF ( turbulent_inflow .AND. bc_lr /= 'dirichlet/radiation' .AND. bc_lr /= 'dirichlet/neumann' ) THEN |
---|
[215] | 3073 | message_string = 'turbulent_inflow = .T. requires a Dirichlet ' // & |
---|
| 3074 | 'condition at the inflow boundary' |
---|
[226] | 3075 | CALL message( 'check_parameters', 'PA0133', 1, 2, 0, 6, 0 ) |
---|
[151] | 3076 | ENDIF |
---|
| 3077 | |
---|
| 3078 | ! |
---|
| 3079 | !-- In case of turbulent inflow calculate the index of the recycling plane |
---|
| 3080 | IF ( turbulent_inflow ) THEN |
---|
| 3081 | IF ( recycling_width == 9999999.9 ) THEN |
---|
| 3082 | ! |
---|
| 3083 | !-- Set the default value for the width of the recycling domain |
---|
| 3084 | recycling_width = 0.1 * nx * dx |
---|
| 3085 | ELSE |
---|
| 3086 | IF ( recycling_width < dx .OR. recycling_width > nx * dx ) THEN |
---|
[215] | 3087 | WRITE( message_string, * ) 'illegal value for recycling_width:', & |
---|
| 3088 | ' ', recycling_width |
---|
[226] | 3089 | CALL message( 'check_parameters', 'PA0134', 1, 2, 0, 6, 0 ) |
---|
[151] | 3090 | ENDIF |
---|
| 3091 | ENDIF |
---|
| 3092 | ! |
---|
| 3093 | !-- Calculate the index |
---|
| 3094 | recycling_plane = recycling_width / dx |
---|
| 3095 | ENDIF |
---|
| 3096 | |
---|
| 3097 | ! |
---|
[1] | 3098 | !-- Check random generator |
---|
| 3099 | IF ( random_generator /= 'system-specific' .AND. & |
---|
| 3100 | random_generator /= 'numerical-recipes' ) THEN |
---|
[215] | 3101 | message_string = 'unknown random generator: random_generator = "' // & |
---|
| 3102 | TRIM( random_generator ) // '"' |
---|
[226] | 3103 | CALL message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 ) |
---|
[1] | 3104 | ENDIF |
---|
| 3105 | |
---|
| 3106 | ! |
---|
| 3107 | !-- Determine damping level index for 1D model |
---|
| 3108 | IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 ) THEN |
---|
| 3109 | IF ( damp_level_1d == -1.0 ) THEN |
---|
| 3110 | damp_level_1d = zu(nzt+1) |
---|
| 3111 | damp_level_ind_1d = nzt + 1 |
---|
| 3112 | ELSEIF ( damp_level_1d < 0.0 .OR. damp_level_1d > zu(nzt+1) ) THEN |
---|
[215] | 3113 | WRITE( message_string, * ) 'damp_level_1d = ', damp_level_1d, & |
---|
| 3114 | ' must be > 0.0 and < ', zu(nzt+1), '(zu(nzt+1))' |
---|
[226] | 3115 | CALL message( 'check_parameters', 'PA0136', 1, 2, 0, 6, 0 ) |
---|
[1] | 3116 | ELSE |
---|
| 3117 | DO k = 1, nzt+1 |
---|
| 3118 | IF ( damp_level_1d <= zu(k) ) THEN |
---|
| 3119 | damp_level_ind_1d = k |
---|
| 3120 | EXIT |
---|
| 3121 | ENDIF |
---|
| 3122 | ENDDO |
---|
| 3123 | ENDIF |
---|
| 3124 | ENDIF |
---|
[215] | 3125 | |
---|
[1] | 3126 | ! |
---|
| 3127 | !-- Check some other 1d-model parameters |
---|
| 3128 | IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model' .AND. & |
---|
| 3129 | TRIM( mixing_length_1d ) /= 'blackadar' ) THEN |
---|
[215] | 3130 | message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) // & |
---|
| 3131 | '" is unknown' |
---|
[226] | 3132 | CALL message( 'check_parameters', 'PA0137', 1, 2, 0, 6, 0 ) |
---|
[1] | 3133 | ENDIF |
---|
| 3134 | IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model' .AND. & |
---|
| 3135 | TRIM( dissipation_1d ) /= 'detering' ) THEN |
---|
[215] | 3136 | message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) // & |
---|
| 3137 | '" is unknown' |
---|
[226] | 3138 | CALL message( 'check_parameters', 'PA0138', 1, 2, 0, 6, 0 ) |
---|
[1] | 3139 | ENDIF |
---|
| 3140 | |
---|
| 3141 | ! |
---|
| 3142 | !-- Set time for the next user defined restart (time_restart is the |
---|
| 3143 | !-- internal parameter for steering restart events) |
---|
| 3144 | IF ( restart_time /= 9999999.9 ) THEN |
---|
[291] | 3145 | IF ( restart_time > time_since_reference_point ) THEN |
---|
| 3146 | time_restart = restart_time |
---|
| 3147 | ENDIF |
---|
[1] | 3148 | ELSE |
---|
| 3149 | ! |
---|
| 3150 | !-- In case of a restart run, set internal parameter to default (no restart) |
---|
| 3151 | !-- if the NAMELIST-parameter restart_time is omitted |
---|
| 3152 | time_restart = 9999999.9 |
---|
| 3153 | ENDIF |
---|
| 3154 | |
---|
| 3155 | ! |
---|
| 3156 | !-- Set default value of the time needed to terminate a model run |
---|
| 3157 | IF ( termination_time_needed == -1.0 ) THEN |
---|
| 3158 | IF ( host(1:3) == 'ibm' ) THEN |
---|
| 3159 | termination_time_needed = 300.0 |
---|
| 3160 | ELSE |
---|
| 3161 | termination_time_needed = 35.0 |
---|
| 3162 | ENDIF |
---|
| 3163 | ENDIF |
---|
| 3164 | |
---|
| 3165 | ! |
---|
| 3166 | !-- Check the time needed to terminate a model run |
---|
| 3167 | IF ( host(1:3) == 't3e' ) THEN |
---|
| 3168 | ! |
---|
| 3169 | !-- Time needed must be at least 30 seconds on all CRAY machines, because |
---|
| 3170 | !-- MPP_TREMAIN gives the remaining CPU time only in steps of 30 seconds |
---|
| 3171 | IF ( termination_time_needed <= 30.0 ) THEN |
---|
[215] | 3172 | WRITE( message_string, * ) 'termination_time_needed = ', & |
---|
| 3173 | termination_time_needed, ' must be > 30.0 on host "', & |
---|
| 3174 | TRIM( host ), '"' |
---|
[226] | 3175 | CALL message( 'check_parameters', 'PA0139', 1, 2, 0, 6, 0 ) |
---|
[1] | 3176 | ENDIF |
---|
| 3177 | ELSEIF ( host(1:3) == 'ibm' ) THEN |
---|
| 3178 | ! |
---|
| 3179 | !-- On IBM-regatta machines the time should be at least 300 seconds, |
---|
| 3180 | !-- because the job time consumed before executing palm (for compiling, |
---|
| 3181 | !-- copying of files, etc.) has to be regarded |
---|
| 3182 | IF ( termination_time_needed < 300.0 ) THEN |
---|
[215] | 3183 | WRITE( message_string, * ) 'termination_time_needed = ', & |
---|
| 3184 | termination_time_needed, ' should be >= 300.0 on host "', & |
---|
| 3185 | TRIM( host ), '"' |
---|
[226] | 3186 | CALL message( 'check_parameters', 'PA0140', 1, 2, 0, 6, 0 ) |
---|
[1] | 3187 | ENDIF |
---|
| 3188 | ENDIF |
---|
| 3189 | |
---|
[217] | 3190 | ! |
---|
[240] | 3191 | !-- Check pressure gradient conditions |
---|
| 3192 | IF ( dp_external .AND. conserve_volume_flow ) THEN |
---|
[388] | 3193 | WRITE( message_string, * ) 'Both dp_external and conserve_volume_flo', & |
---|
| 3194 | 'w are .TRUE. but one of them must be .FALSE.' |
---|
[240] | 3195 | CALL message( 'check_parameters', 'PA0150', 1, 2, 0, 6, 0 ) |
---|
| 3196 | ENDIF |
---|
| 3197 | IF ( dp_external ) THEN |
---|
| 3198 | IF ( dp_level_b < zu(nzb) .OR. dp_level_b > zu(nzt) ) THEN |
---|
| 3199 | WRITE( message_string, * ) 'dp_level_b = ', dp_level_b, ' is out ', & |
---|
| 3200 | ' of range' |
---|
| 3201 | CALL message( 'check_parameters', 'PA0151', 1, 2, 0, 6, 0 ) |
---|
| 3202 | ENDIF |
---|
| 3203 | IF ( .NOT. ANY( dpdxy /= 0.0 ) ) THEN |
---|
[388] | 3204 | WRITE( message_string, * ) 'dp_external is .TRUE. but dpdxy is ze', & |
---|
| 3205 | 'ro, i.e. the external pressure gradient & will not be applied' |
---|
[240] | 3206 | CALL message( 'check_parameters', 'PA0152', 0, 1, 0, 6, 0 ) |
---|
| 3207 | ENDIF |
---|
| 3208 | ENDIF |
---|
| 3209 | IF ( ANY( dpdxy /= 0.0 ) .AND. .NOT. dp_external ) THEN |
---|
| 3210 | WRITE( message_string, * ) 'dpdxy is nonzero but dp_external is ', & |
---|
| 3211 | '.FALSE., i.e. the external pressure gradient & will not be applied' |
---|
| 3212 | CALL message( 'check_parameters', 'PA0153', 0, 1, 0, 6, 0 ) |
---|
| 3213 | ENDIF |
---|
[241] | 3214 | IF ( conserve_volume_flow ) THEN |
---|
| 3215 | IF ( TRIM( conserve_volume_flow_mode ) == 'default' ) THEN |
---|
[667] | 3216 | |
---|
| 3217 | conserve_volume_flow_mode = 'initial_profiles' |
---|
| 3218 | |
---|
[241] | 3219 | ELSEIF ( TRIM( conserve_volume_flow_mode ) /= 'initial_profiles' .AND. & |
---|
| 3220 | TRIM( conserve_volume_flow_mode ) /= 'inflow_profile' .AND. & |
---|
| 3221 | TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' ) THEN |
---|
| 3222 | WRITE( message_string, * ) 'unknown conserve_volume_flow_mode: ', & |
---|
| 3223 | conserve_volume_flow_mode |
---|
| 3224 | CALL message( 'check_parameters', 'PA0154', 1, 2, 0, 6, 0 ) |
---|
| 3225 | ENDIF |
---|
[667] | 3226 | IF ( (bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic') .AND. & |
---|
| 3227 | TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' ) THEN |
---|
| 3228 | WRITE( message_string, * ) 'non-cyclic boundary conditions ', & |
---|
| 3229 | 'require conserve_volume_flow_mode = ''initial_profiles''' |
---|
[241] | 3230 | CALL message( 'check_parameters', 'PA0155', 1, 2, 0, 6, 0 ) |
---|
| 3231 | ENDIF |
---|
| 3232 | IF ( bc_lr == 'cyclic' .AND. bc_ns == 'cyclic' .AND. & |
---|
| 3233 | TRIM( conserve_volume_flow_mode ) == 'inflow_profile' ) THEN |
---|
| 3234 | WRITE( message_string, * ) 'cyclic boundary conditions ', & |
---|
[667] | 3235 | 'require conserve_volume_flow_mode = ''initial_profiles''', & |
---|
[241] | 3236 | ' or ''bulk_velocity''' |
---|
| 3237 | CALL message( 'check_parameters', 'PA0156', 1, 2, 0, 6, 0 ) |
---|
| 3238 | ENDIF |
---|
| 3239 | ENDIF |
---|
| 3240 | IF ( ( u_bulk /= 0.0 .OR. v_bulk /= 0.0 ) .AND. & |
---|
| 3241 | ( .NOT. conserve_volume_flow .OR. & |
---|
| 3242 | TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' ) ) THEN |
---|
| 3243 | WRITE( message_string, * ) 'nonzero bulk velocity requires ', & |
---|
[667] | 3244 | 'conserve_volume_flow = .T. and ', & |
---|
[241] | 3245 | 'conserve_volume_flow_mode = ''bulk_velocity''' |
---|
| 3246 | CALL message( 'check_parameters', 'PA0157', 1, 2, 0, 6, 0 ) |
---|
| 3247 | ENDIF |
---|
[240] | 3248 | |
---|
| 3249 | ! |
---|
[264] | 3250 | !-- Check particle attributes |
---|
| 3251 | IF ( particle_color /= 'none' ) THEN |
---|
| 3252 | IF ( particle_color /= 'absuv' .AND. particle_color /= 'pt*' .AND. & |
---|
| 3253 | particle_color /= 'z' ) THEN |
---|
| 3254 | message_string = 'illegal value for parameter particle_color: ' // & |
---|
| 3255 | TRIM( particle_color) |
---|
| 3256 | CALL message( 'check_parameters', 'PA0313', 1, 2, 0, 6, 0 ) |
---|
| 3257 | ELSE |
---|
| 3258 | IF ( color_interval(2) <= color_interval(1) ) THEN |
---|
| 3259 | message_string = 'color_interval(2) <= color_interval(1)' |
---|
| 3260 | CALL message( 'check_parameters', 'PA0315', 1, 2, 0, 6, 0 ) |
---|
| 3261 | ENDIF |
---|
| 3262 | ENDIF |
---|
| 3263 | ENDIF |
---|
| 3264 | |
---|
| 3265 | IF ( particle_dvrpsize /= 'none' ) THEN |
---|
| 3266 | IF ( particle_dvrpsize /= 'absw' ) THEN |
---|
| 3267 | message_string = 'illegal value for parameter particle_dvrpsize:' // & |
---|
| 3268 | ' ' // TRIM( particle_color) |
---|
| 3269 | CALL message( 'check_parameters', 'PA0314', 1, 2, 0, 6, 0 ) |
---|
| 3270 | ELSE |
---|
| 3271 | IF ( dvrpsize_interval(2) <= dvrpsize_interval(1) ) THEN |
---|
| 3272 | message_string = 'dvrpsize_interval(2) <= dvrpsize_interval(1)' |
---|
| 3273 | CALL message( 'check_parameters', 'PA0316', 1, 2, 0, 6, 0 ) |
---|
| 3274 | ENDIF |
---|
| 3275 | ENDIF |
---|
| 3276 | ENDIF |
---|
| 3277 | |
---|
| 3278 | ! |
---|
[217] | 3279 | !-- Check &userpar parameters |
---|
| 3280 | CALL user_check_parameters |
---|
[1] | 3281 | |
---|
[217] | 3282 | |
---|
[667] | 3283 | |
---|
[1] | 3284 | END SUBROUTINE check_parameters |
---|