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