[1] | 1 | SUBROUTINE read_var_list |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------! |
---|
| 4 | ! Actual revisions: |
---|
| 5 | ! ----------------- |
---|
[226] | 6 | ! |
---|
[198] | 7 | ! |
---|
| 8 | ! Former revisions: |
---|
| 9 | ! ----------------- |
---|
| 10 | ! $Id: read_var_list.f90 226 2009-02-02 07:39:34Z raasch $ |
---|
| 11 | ! |
---|
[226] | 12 | ! 216 2008-11-25 07:12:43Z raasch |
---|
| 13 | ! limitations for nx_on_file, ny_on_file removed (read_parts_of_var_list) |
---|
| 14 | ! |
---|
[198] | 15 | ! 173 2008-05-23 20:39:38Z raasch |
---|
[153] | 16 | ! +cthf, leaf_surface_concentration, scalar_exchange_coefficient |
---|
[151] | 17 | ! +numprocs_previous_run, hor_index_bounds_previous_run, inflow_damping_factor, |
---|
| 18 | ! inflow_damping_height, inflow_damping_width, mean_inflow_profiles, |
---|
| 19 | ! recycling_width, turbulent_inflow, |
---|
[145] | 20 | ! -cross_ts_*, npex, npey, |
---|
| 21 | ! hom_sum, volume_flow_area, volume_flow_initial moved from |
---|
[146] | 22 | ! read_3d_binary to here, |
---|
[147] | 23 | ! routines read_parts_of_var_list and skip_var_list added at the end |
---|
[138] | 24 | ! |
---|
[139] | 25 | ! 138 2007-11-28 10:03:58Z letzel |
---|
| 26 | ! +canopy_mode, drag_coefficient, lad, lad_surface, lad_vertical_gradient, |
---|
| 27 | ! lad_vertical_gradient_level, lad_vertical_gradient_level_ind, pch_index, |
---|
| 28 | ! plant_canopy, time_sort_particles |
---|
| 29 | ! |
---|
[110] | 30 | ! 102 2007-07-27 09:09:17Z raasch |
---|
| 31 | ! +time_coupling, top_momentumflux_u|v |
---|
| 32 | ! |
---|
[98] | 33 | ! 95 2007-06-02 16:48:38Z raasch |
---|
| 34 | ! +bc_sa_t, ocean, sa_init, sa_surface, sa_vertical_gradient, |
---|
| 35 | ! sa_vertical_gradient_level, bottom/top_salinity_flux |
---|
| 36 | ! |
---|
[90] | 37 | ! 87 2007-05-22 15:46:47Z raasch |
---|
| 38 | ! +max_pr_user (version 3.1), var_hom renamed pr_palm |
---|
| 39 | ! |
---|
[77] | 40 | ! 75 2007-03-22 09:54:05Z raasch |
---|
| 41 | ! +loop_optimization, pt_reference, moisture renamed humidity |
---|
| 42 | ! |
---|
[39] | 43 | ! 20 2007-02-26 00:12:32Z raasch |
---|
| 44 | ! +top_heatflux, use_top_fluxes |
---|
| 45 | ! |
---|
[3] | 46 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 47 | ! |
---|
[1] | 48 | ! Revision 1.34 2006/08/22 14:14:27 raasch |
---|
| 49 | ! +dz_max |
---|
| 50 | ! |
---|
| 51 | ! Revision 1.1 1998/03/18 20:18:48 raasch |
---|
| 52 | ! Initial revision |
---|
| 53 | ! |
---|
| 54 | ! |
---|
| 55 | ! Description: |
---|
| 56 | ! ------------ |
---|
[143] | 57 | ! Reading values of global control variables from restart-file (binary format) |
---|
[1] | 58 | !------------------------------------------------------------------------------! |
---|
| 59 | |
---|
| 60 | USE arrays_3d |
---|
| 61 | USE averaging |
---|
[87] | 62 | USE control_parameters |
---|
[1] | 63 | USE grid_variables |
---|
| 64 | USE indices |
---|
| 65 | USE model_1d |
---|
[116] | 66 | USE particle_attributes |
---|
[1] | 67 | USE pegrid |
---|
| 68 | USE profil_parameter |
---|
| 69 | USE statistics |
---|
| 70 | |
---|
| 71 | IMPLICIT NONE |
---|
| 72 | |
---|
| 73 | CHARACTER (LEN=10) :: binary_version, version_on_file |
---|
| 74 | CHARACTER (LEN=30) :: variable_chr |
---|
[87] | 75 | |
---|
[143] | 76 | |
---|
[1] | 77 | CALL check_open( 13 ) |
---|
| 78 | |
---|
| 79 | ! |
---|
| 80 | !-- Make version number check first |
---|
| 81 | READ ( 13 ) version_on_file |
---|
[145] | 82 | binary_version = '3.2' |
---|
[1] | 83 | IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN |
---|
| 84 | IF ( myid == 0 ) THEN |
---|
| 85 | PRINT*, '+++ read_var_list: version mismatch concerning control', & |
---|
| 86 | ' variables' |
---|
| 87 | PRINT*, ' version on file = "', & |
---|
| 88 | TRIM( version_on_file ), '"' |
---|
| 89 | PRINT*, ' version on program = "', & |
---|
| 90 | TRIM( binary_version ), '"' |
---|
| 91 | ENDIF |
---|
| 92 | CALL local_stop |
---|
| 93 | ENDIF |
---|
| 94 | |
---|
| 95 | ! |
---|
[145] | 96 | !-- Read number of PEs and horizontal index bounds of all PEs used in previous |
---|
| 97 | !-- run |
---|
| 98 | READ ( 13 ) variable_chr |
---|
| 99 | IF ( TRIM( variable_chr ) /= 'numprocs' ) THEN |
---|
| 100 | PRINT*, '+++ read_var_list: numprocs not found in data from prior run', & |
---|
| 101 | ' on PE ', myid |
---|
| 102 | CALL local_stop |
---|
| 103 | ENDIF |
---|
| 104 | READ ( 13 ) numprocs_previous_run |
---|
| 105 | |
---|
[146] | 106 | IF ( .NOT. ALLOCATED( hor_index_bounds_previous_run ) ) THEN |
---|
| 107 | ALLOCATE( hor_index_bounds_previous_run(4,0:numprocs_previous_run-1) ) |
---|
| 108 | ENDIF |
---|
[145] | 109 | |
---|
| 110 | READ ( 13 ) variable_chr |
---|
| 111 | IF ( TRIM( variable_chr ) /= 'hor_index_bounds' ) THEN |
---|
| 112 | PRINT*, '+++ read_var_list: hor_index_bounds not found in data from ', & |
---|
| 113 | 'prior run on PE ', myid |
---|
| 114 | CALL local_stop |
---|
| 115 | ENDIF |
---|
| 116 | READ ( 13 ) hor_index_bounds_previous_run |
---|
| 117 | |
---|
| 118 | ! |
---|
[1] | 119 | !-- Read vertical number of gridpoints and number of different areas used |
---|
| 120 | !-- for computing statistics. Allocate arrays depending on these values, |
---|
| 121 | !-- which are needed for the following read instructions. |
---|
| 122 | READ ( 13 ) variable_chr |
---|
| 123 | IF ( TRIM( variable_chr ) /= 'nz' ) THEN |
---|
| 124 | PRINT*, '+++ read_var_list: nz not found in data from prior run on PE ',& |
---|
| 125 | myid |
---|
| 126 | CALL local_stop |
---|
| 127 | ENDIF |
---|
| 128 | READ ( 13 ) nz |
---|
[87] | 129 | |
---|
[1] | 130 | READ ( 13 ) variable_chr |
---|
[87] | 131 | IF ( TRIM( variable_chr ) /= 'max_pr_user' ) THEN |
---|
| 132 | PRINT*, '+++ read_var_list: max_pr_user not found in data from ', & |
---|
| 133 | 'prior run on PE ', myid |
---|
| 134 | CALL local_stop |
---|
| 135 | ENDIF |
---|
[159] | 136 | READ ( 13 ) max_pr_user ! This value is checked against the number of |
---|
| 137 | ! user profiles given for the current run |
---|
| 138 | ! in routine user_parin (it has to match) |
---|
[87] | 139 | |
---|
| 140 | READ ( 13 ) variable_chr |
---|
[1] | 141 | IF ( TRIM( variable_chr ) /= 'statistic_regions' ) THEN |
---|
| 142 | PRINT*, '+++ read_var_list: statistic_regions not found in data from ', & |
---|
| 143 | 'prior run on PE ', myid |
---|
| 144 | CALL local_stop |
---|
| 145 | ENDIF |
---|
| 146 | READ ( 13 ) statistic_regions |
---|
[146] | 147 | IF ( .NOT. ALLOCATED( ug ) ) THEN |
---|
[147] | 148 | ALLOCATE( lad(0:nz+1), ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), & |
---|
| 149 | v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1), & |
---|
| 150 | sa_init(0:nz+1), & |
---|
[146] | 151 | hom(0:nz+1,2,pr_palm+max_pr_user,0:statistic_regions), & |
---|
| 152 | hom_sum(0:nz+1,pr_palm+max_pr_user,0:statistic_regions) ) |
---|
| 153 | ENDIF |
---|
[1] | 154 | |
---|
| 155 | ! |
---|
| 156 | !-- Now read all control parameters: |
---|
| 157 | !-- Caution: When the following read instructions have been changed, the |
---|
| 158 | !-- ------- version number stored in the variable binary_version has to be |
---|
| 159 | !-- increased. The same changes must also be done in write_var_list. |
---|
| 160 | READ ( 13 ) variable_chr |
---|
| 161 | DO WHILE ( TRIM( variable_chr ) /= '*** end ***' ) |
---|
| 162 | |
---|
| 163 | SELECT CASE ( TRIM( variable_chr ) ) |
---|
| 164 | |
---|
| 165 | CASE ( 'adjust_mixing_length' ) |
---|
| 166 | READ ( 13 ) adjust_mixing_length |
---|
| 167 | CASE ( 'advected_distance_x' ) |
---|
| 168 | READ ( 13 ) advected_distance_x |
---|
| 169 | CASE ( 'advected_distance_y' ) |
---|
| 170 | READ ( 13 ) advected_distance_y |
---|
| 171 | CASE ( 'alpha_surface' ) |
---|
| 172 | READ ( 13 ) alpha_surface |
---|
| 173 | CASE ( 'average_count_pr' ) |
---|
| 174 | READ ( 13 ) average_count_pr |
---|
| 175 | CASE ( 'average_count_sp' ) |
---|
| 176 | READ ( 13 ) average_count_sp |
---|
| 177 | CASE ( 'average_count_3d' ) |
---|
| 178 | READ ( 13 ) average_count_3d |
---|
| 179 | CASE ( 'bc_e_b' ) |
---|
| 180 | READ ( 13 ) bc_e_b |
---|
| 181 | CASE ( 'bc_lr' ) |
---|
| 182 | READ ( 13 ) bc_lr |
---|
| 183 | CASE ( 'bc_ns' ) |
---|
| 184 | READ ( 13 ) bc_ns |
---|
| 185 | CASE ( 'bc_p_b' ) |
---|
| 186 | READ ( 13 ) bc_p_b |
---|
| 187 | CASE ( 'bc_p_t' ) |
---|
| 188 | READ ( 13 ) bc_p_t |
---|
| 189 | CASE ( 'bc_pt_b' ) |
---|
| 190 | READ ( 13 ) bc_pt_b |
---|
| 191 | CASE ( 'bc_pt_t' ) |
---|
| 192 | READ ( 13 ) bc_pt_t |
---|
| 193 | CASE ( 'bc_pt_t_val' ) |
---|
| 194 | READ ( 13 ) bc_pt_t_val |
---|
| 195 | CASE ( 'bc_q_b' ) |
---|
| 196 | READ ( 13 ) bc_q_b |
---|
| 197 | CASE ( 'bc_q_t' ) |
---|
| 198 | READ ( 13 ) bc_q_t |
---|
| 199 | CASE ( 'bc_q_t_val' ) |
---|
| 200 | READ ( 13 ) bc_q_t_val |
---|
| 201 | CASE ( 'bc_s_b' ) |
---|
| 202 | READ ( 13 ) bc_s_b |
---|
| 203 | CASE ( 'bc_s_t' ) |
---|
| 204 | READ ( 13 ) bc_s_t |
---|
[95] | 205 | CASE ( 'bc_sa_t' ) |
---|
| 206 | READ ( 13 ) bc_sa_t |
---|
[1] | 207 | CASE ( 'bc_uv_b' ) |
---|
| 208 | READ ( 13 ) bc_uv_b |
---|
| 209 | CASE ( 'bc_uv_t' ) |
---|
| 210 | READ ( 13 ) bc_uv_t |
---|
[95] | 211 | CASE ( 'bottom_salinityflux' ) |
---|
| 212 | READ ( 13 ) bottom_salinityflux |
---|
[1] | 213 | CASE ( 'building_height' ) |
---|
| 214 | READ ( 13 ) building_height |
---|
| 215 | CASE ( 'building_length_x' ) |
---|
| 216 | READ ( 13 ) building_length_x |
---|
| 217 | CASE ( 'building_length_y' ) |
---|
| 218 | READ ( 13 ) building_length_y |
---|
| 219 | CASE ( 'building_wall_left' ) |
---|
| 220 | READ ( 13 ) building_wall_left |
---|
| 221 | CASE ( 'building_wall_south' ) |
---|
| 222 | READ ( 13 ) building_wall_south |
---|
[138] | 223 | CASE ( 'canopy_mode' ) |
---|
| 224 | READ ( 13 ) canopy_mode |
---|
[1] | 225 | CASE ( 'cloud_droplets' ) |
---|
| 226 | READ ( 13 ) cloud_droplets |
---|
| 227 | CASE ( 'cloud_physics' ) |
---|
| 228 | READ ( 13 ) cloud_physics |
---|
| 229 | CASE ( 'conserve_volume_flow' ) |
---|
| 230 | READ ( 13 ) conserve_volume_flow |
---|
[153] | 231 | CASE ( 'cthf' ) |
---|
| 232 | READ ( 13 ) cthf |
---|
[1] | 233 | CASE ( 'current_timestep_number' ) |
---|
| 234 | READ ( 13 ) current_timestep_number |
---|
| 235 | CASE ( 'cut_spline_overshoot' ) |
---|
| 236 | READ ( 13 ) cut_spline_overshoot |
---|
| 237 | CASE ( 'damp_level_1d' ) |
---|
| 238 | READ ( 13 ) damp_level_1d |
---|
| 239 | CASE ( 'dissipation_1d' ) |
---|
| 240 | READ ( 13 ) dissipation_1d |
---|
[138] | 241 | CASE ( 'drag_coefficient' ) |
---|
| 242 | READ ( 13 ) drag_coefficient |
---|
[1] | 243 | CASE ( 'dt_fixed' ) |
---|
| 244 | READ ( 13 ) dt_fixed |
---|
| 245 | CASE ( 'dt_pr_1d' ) |
---|
| 246 | READ ( 13 ) dt_pr_1d |
---|
| 247 | CASE ( 'dt_run_control_1d' ) |
---|
| 248 | READ ( 13 ) dt_run_control_1d |
---|
| 249 | CASE ( 'dt_3d' ) |
---|
| 250 | READ ( 13 ) dt_3d |
---|
| 251 | CASE ( 'dvrp_filecount' ) |
---|
| 252 | READ ( 13 ) dvrp_filecount |
---|
| 253 | CASE ( 'dx' ) |
---|
| 254 | READ ( 13 ) dx |
---|
| 255 | CASE ( 'dy' ) |
---|
| 256 | READ ( 13 ) dy |
---|
| 257 | CASE ( 'dz' ) |
---|
| 258 | READ ( 13 ) dz |
---|
| 259 | CASE ( 'dz_max' ) |
---|
| 260 | READ ( 13 ) dz_max |
---|
| 261 | CASE ( 'dz_stretch_factor' ) |
---|
| 262 | READ ( 13 ) dz_stretch_factor |
---|
| 263 | CASE ( 'dz_stretch_level' ) |
---|
| 264 | READ ( 13 ) dz_stretch_level |
---|
| 265 | CASE ( 'e_min' ) |
---|
| 266 | READ ( 13 ) e_min |
---|
| 267 | CASE ( 'end_time_1d' ) |
---|
| 268 | READ ( 13 ) end_time_1d |
---|
| 269 | CASE ( 'fft_method' ) |
---|
| 270 | READ ( 13 ) fft_method |
---|
| 271 | CASE ( 'first_call_advec_particles' ) |
---|
| 272 | READ ( 13 ) first_call_advec_particles |
---|
| 273 | CASE ( 'galilei_transformation' ) |
---|
| 274 | READ ( 13 ) galilei_transformation |
---|
| 275 | CASE ( 'grid_matching' ) |
---|
| 276 | READ ( 13 ) grid_matching |
---|
| 277 | CASE ( 'hom' ) |
---|
| 278 | READ ( 13 ) hom |
---|
[143] | 279 | CASE ( 'hom_sum' ) |
---|
| 280 | READ ( 13 ) hom_sum |
---|
[151] | 281 | CASE ( 'humidity' ) |
---|
| 282 | READ ( 13 ) humidity |
---|
| 283 | CASE ( 'inflow_damping_factor' ) |
---|
| 284 | IF ( .NOT. ALLOCATED( inflow_damping_factor ) ) THEN |
---|
| 285 | ALLOCATE( inflow_damping_factor(0:nz+1) ) |
---|
| 286 | ENDIF |
---|
| 287 | READ ( 13 ) inflow_damping_factor |
---|
| 288 | CASE ( 'inflow_damping_height' ) |
---|
| 289 | READ ( 13 ) inflow_damping_height |
---|
| 290 | CASE ( 'inflow_damping_width' ) |
---|
| 291 | READ ( 13 ) inflow_damping_width |
---|
[1] | 292 | CASE ( 'inflow_disturbance_begin' ) |
---|
| 293 | READ ( 13 ) inflow_disturbance_begin |
---|
| 294 | CASE ( 'inflow_disturbance_end' ) |
---|
| 295 | READ ( 13 ) inflow_disturbance_end |
---|
| 296 | CASE ( 'km_constant' ) |
---|
| 297 | READ ( 13 ) km_constant |
---|
| 298 | CASE ( 'km_damp_max' ) |
---|
| 299 | READ ( 13 ) km_damp_max |
---|
[138] | 300 | CASE ( 'lad' ) |
---|
| 301 | READ ( 13 ) lad |
---|
| 302 | CASE ( 'lad_surface' ) |
---|
| 303 | READ ( 13 ) lad_surface |
---|
| 304 | CASE ( 'lad_vertical_gradient' ) |
---|
| 305 | READ ( 13 ) lad_vertical_gradient |
---|
| 306 | CASE ( 'lad_vertical_gradient_level' ) |
---|
| 307 | READ ( 13 ) lad_vertical_gradient_level |
---|
| 308 | CASE ( 'lad_vertical_gradient_level_in' ) |
---|
| 309 | READ ( 13 ) lad_vertical_gradient_level_ind |
---|
[1] | 310 | CASE ( 'last_dt_change' ) |
---|
| 311 | READ ( 13 ) last_dt_change |
---|
[153] | 312 | CASE ( 'leaf_surface_concentration' ) |
---|
| 313 | READ ( 13 ) leaf_surface_concentration |
---|
[1] | 314 | CASE ( 'long_filter_factor' ) |
---|
| 315 | READ ( 13 ) long_filter_factor |
---|
[63] | 316 | CASE ( 'loop_optimization' ) |
---|
| 317 | READ ( 13 ) loop_optimization |
---|
[151] | 318 | CASE ( 'mean_inflow_profiles' ) |
---|
| 319 | IF ( .NOT. ALLOCATED( mean_inflow_profiles ) ) THEN |
---|
| 320 | ALLOCATE( mean_inflow_profiles(0:nz+1,5) ) |
---|
| 321 | ENDIF |
---|
| 322 | READ ( 13 ) mean_inflow_profiles |
---|
[1] | 323 | CASE ( 'mixing_length_1d' ) |
---|
| 324 | READ ( 13 ) mixing_length_1d |
---|
| 325 | CASE ( 'momentum_advec' ) |
---|
| 326 | READ ( 13 ) momentum_advec |
---|
| 327 | CASE ( 'netcdf_precision' ) |
---|
| 328 | READ ( 13 ) netcdf_precision |
---|
| 329 | CASE ( 'nsor_ini' ) |
---|
| 330 | READ ( 13 ) nsor_ini |
---|
| 331 | CASE ( 'nx' ) |
---|
| 332 | READ ( 13 ) nx |
---|
[147] | 333 | nx_on_file = nx |
---|
[1] | 334 | CASE ( 'ny' ) |
---|
| 335 | READ ( 13 ) ny |
---|
[147] | 336 | ny_on_file = ny |
---|
[94] | 337 | CASE ( 'ocean' ) |
---|
| 338 | READ ( 13 ) ocean |
---|
[1] | 339 | CASE ( 'old_dt' ) |
---|
| 340 | READ ( 13 ) old_dt |
---|
| 341 | CASE ( 'omega' ) |
---|
| 342 | READ ( 13 ) omega |
---|
| 343 | CASE ( 'outflow_damping_width' ) |
---|
| 344 | READ ( 13 ) outflow_damping_width |
---|
| 345 | CASE ( 'overshoot_limit_e' ) |
---|
| 346 | READ ( 13 ) overshoot_limit_e |
---|
| 347 | CASE ( 'overshoot_limit_pt' ) |
---|
| 348 | READ ( 13 ) overshoot_limit_pt |
---|
| 349 | CASE ( 'overshoot_limit_u' ) |
---|
| 350 | READ ( 13 ) overshoot_limit_u |
---|
| 351 | CASE ( 'overshoot_limit_v' ) |
---|
| 352 | READ ( 13 ) overshoot_limit_v |
---|
| 353 | CASE ( 'overshoot_limit_w' ) |
---|
| 354 | READ ( 13 ) overshoot_limit_w |
---|
| 355 | CASE ( 'passive_scalar' ) |
---|
| 356 | READ ( 13 ) passive_scalar |
---|
[138] | 357 | CASE ( 'pch_index' ) |
---|
| 358 | READ ( 13 ) pch_index |
---|
[1] | 359 | CASE ( 'phi' ) |
---|
| 360 | READ ( 13 ) phi |
---|
[138] | 361 | CASE ( 'plant_canopy' ) |
---|
| 362 | READ ( 13 ) plant_canopy |
---|
[1] | 363 | CASE ( 'prandtl_layer' ) |
---|
| 364 | READ ( 13 ) prandtl_layer |
---|
| 365 | CASE ( 'precipitation' ) |
---|
| 366 | READ ( 13 ) precipitation |
---|
| 367 | CASE ( 'pt_init' ) |
---|
| 368 | READ ( 13 ) pt_init |
---|
[57] | 369 | CASE ( 'pt_reference' ) |
---|
| 370 | READ ( 13 ) pt_reference |
---|
[1] | 371 | CASE ( 'pt_surface' ) |
---|
| 372 | READ ( 13 ) pt_surface |
---|
| 373 | CASE ( 'pt_surface_initial_change' ) |
---|
| 374 | READ ( 13 ) pt_surface_initial_change |
---|
| 375 | CASE ( 'pt_vertical_gradient' ) |
---|
| 376 | READ ( 13 ) pt_vertical_gradient |
---|
| 377 | CASE ( 'pt_vertical_gradient_level' ) |
---|
| 378 | READ ( 13 ) pt_vertical_gradient_level |
---|
| 379 | CASE ( 'pt_vertical_gradient_level_ind' ) |
---|
| 380 | READ ( 13 ) pt_vertical_gradient_level_ind |
---|
| 381 | CASE ( 'q_init' ) |
---|
| 382 | READ ( 13 ) q_init |
---|
| 383 | CASE ( 'q_surface' ) |
---|
| 384 | READ ( 13 ) q_surface |
---|
| 385 | CASE ( 'q_surface_initial_change' ) |
---|
| 386 | READ ( 13 ) q_surface_initial_change |
---|
| 387 | CASE ( 'q_vertical_gradient' ) |
---|
| 388 | READ ( 13 ) q_vertical_gradient |
---|
| 389 | CASE ( 'q_vertical_gradient_level' ) |
---|
| 390 | READ ( 13 ) q_vertical_gradient_level |
---|
| 391 | CASE ( 'q_vertical_gradient_level_ind' ) |
---|
| 392 | READ ( 13 ) q_vertical_gradient_level_ind |
---|
| 393 | CASE ( 'radiation' ) |
---|
| 394 | READ ( 13 ) radiation |
---|
| 395 | CASE ( 'random_generator' ) |
---|
| 396 | READ ( 13 ) random_generator |
---|
| 397 | CASE ( 'random_heatflux' ) |
---|
| 398 | READ ( 13 ) random_heatflux |
---|
[151] | 399 | CASE ( 'recycling_width' ) |
---|
| 400 | READ ( 13 ) recycling_width |
---|
[1] | 401 | CASE ( 'rif_max' ) |
---|
| 402 | READ ( 13 ) rif_max |
---|
| 403 | CASE ( 'rif_min' ) |
---|
| 404 | READ ( 13 ) rif_min |
---|
| 405 | CASE ( 'roughness_length' ) |
---|
| 406 | READ ( 13 ) roughness_length |
---|
| 407 | CASE ( 'runnr' ) |
---|
| 408 | READ ( 13 ) runnr |
---|
[94] | 409 | CASE ( 'sa_init' ) |
---|
| 410 | READ ( 13 ) sa_init |
---|
| 411 | CASE ( 'sa_surface' ) |
---|
| 412 | READ ( 13 ) sa_surface |
---|
| 413 | CASE ( 'sa_vertical_gradient' ) |
---|
| 414 | READ ( 13 ) sa_vertical_gradient |
---|
| 415 | CASE ( 'sa_vertical_gradient_level' ) |
---|
| 416 | READ ( 13 ) sa_vertical_gradient_level |
---|
[1] | 417 | CASE ( 'scalar_advec' ) |
---|
| 418 | READ ( 13 ) scalar_advec |
---|
[153] | 419 | CASE ( 'scalar_exchange_coefficient' ) |
---|
| 420 | READ ( 13 ) scalar_exchange_coefficient |
---|
[1] | 421 | CASE ( 'simulated_time' ) |
---|
| 422 | READ ( 13 ) simulated_time |
---|
| 423 | CASE ( 'surface_heatflux' ) |
---|
| 424 | READ ( 13 ) surface_heatflux |
---|
| 425 | CASE ( 'surface_pressure' ) |
---|
| 426 | READ ( 13 ) surface_pressure |
---|
| 427 | CASE ( 'surface_scalarflux' ) |
---|
| 428 | READ ( 13 ) surface_scalarflux |
---|
| 429 | CASE ( 'surface_waterflux' ) |
---|
| 430 | READ ( 13 ) surface_waterflux |
---|
| 431 | CASE ( 's_surface' ) |
---|
| 432 | READ ( 13 ) s_surface |
---|
| 433 | CASE ( 's_surface_initial_change' ) |
---|
| 434 | READ ( 13 ) s_surface_initial_change |
---|
| 435 | CASE ( 's_vertical_gradient' ) |
---|
| 436 | READ ( 13 ) s_vertical_gradient |
---|
| 437 | CASE ( 's_vertical_gradient_level' ) |
---|
| 438 | READ ( 13 ) s_vertical_gradient_level |
---|
[102] | 439 | CASE ( 'time_coupling' ) |
---|
| 440 | READ ( 13 ) time_coupling |
---|
[1] | 441 | CASE ( 'time_disturb' ) |
---|
| 442 | READ ( 13 ) time_disturb |
---|
| 443 | CASE ( 'time_dopr' ) |
---|
| 444 | READ ( 13 ) time_dopr |
---|
| 445 | CASE ( 'time_dopr_av' ) |
---|
| 446 | READ ( 13 ) time_dopr_av |
---|
| 447 | CASE ( 'time_dopr_listing' ) |
---|
| 448 | READ ( 13 ) time_dopr_listing |
---|
| 449 | CASE ( 'time_dopts' ) |
---|
| 450 | READ ( 13 ) time_dopts |
---|
| 451 | CASE ( 'time_dosp' ) |
---|
| 452 | READ ( 13 ) time_dosp |
---|
| 453 | CASE ( 'time_dots' ) |
---|
| 454 | READ ( 13 ) time_dots |
---|
| 455 | CASE ( 'time_do2d_xy' ) |
---|
| 456 | READ ( 13 ) time_do2d_xy |
---|
| 457 | CASE ( 'time_do2d_xz' ) |
---|
| 458 | READ ( 13 ) time_do2d_xz |
---|
| 459 | CASE ( 'time_do2d_yz' ) |
---|
| 460 | READ ( 13 ) time_do2d_yz |
---|
| 461 | CASE ( 'time_do3d' ) |
---|
| 462 | READ ( 13 ) time_do3d |
---|
| 463 | CASE ( 'time_do_av' ) |
---|
| 464 | READ ( 13 ) time_do_av |
---|
| 465 | CASE ( 'time_do_sla' ) |
---|
| 466 | READ ( 13 ) time_do_sla |
---|
| 467 | CASE ( 'time_dvrp' ) |
---|
| 468 | READ ( 13 ) time_dvrp |
---|
| 469 | CASE ( 'time_restart' ) |
---|
| 470 | READ ( 13 ) time_restart |
---|
| 471 | CASE ( 'time_run_control' ) |
---|
| 472 | READ ( 13 ) time_run_control |
---|
[116] | 473 | CASE ( 'time_sort_particles' ) |
---|
| 474 | READ ( 13 ) time_sort_particles |
---|
[1] | 475 | CASE ( 'timestep_scheme' ) |
---|
| 476 | READ ( 13 ) timestep_scheme |
---|
| 477 | CASE ( 'topography' ) |
---|
| 478 | READ ( 13 ) topography |
---|
[19] | 479 | CASE ( 'top_heatflux' ) |
---|
| 480 | READ ( 13 ) top_heatflux |
---|
[102] | 481 | CASE ( 'top_momentumflux_u' ) |
---|
| 482 | READ ( 13 ) top_momentumflux_u |
---|
| 483 | CASE ( 'top_momentumflux_v' ) |
---|
| 484 | READ ( 13 ) top_momentumflux_v |
---|
[94] | 485 | CASE ( 'top_salinityflux' ) |
---|
| 486 | READ ( 13 ) top_salinityflux |
---|
[1] | 487 | CASE ( 'tsc' ) |
---|
| 488 | READ ( 13 ) tsc |
---|
[151] | 489 | CASE ( 'turbulent_inflow' ) |
---|
| 490 | READ ( 13 ) turbulent_inflow |
---|
[1] | 491 | CASE ( 'u_init' ) |
---|
| 492 | READ ( 13 ) u_init |
---|
| 493 | CASE ( 'u_max' ) |
---|
| 494 | READ ( 13 ) u_max |
---|
| 495 | CASE ( 'u_max_ijk' ) |
---|
| 496 | READ ( 13 ) u_max_ijk |
---|
| 497 | CASE ( 'ug' ) |
---|
| 498 | READ ( 13 ) ug |
---|
| 499 | CASE ( 'ug_surface' ) |
---|
| 500 | READ ( 13 ) ug_surface |
---|
| 501 | CASE ( 'ug_vertical_gradient' ) |
---|
| 502 | READ ( 13 ) ug_vertical_gradient |
---|
| 503 | CASE ( 'ug_vertical_gradient_level' ) |
---|
| 504 | READ ( 13 ) ug_vertical_gradient_level |
---|
| 505 | CASE ( 'ug_vertical_gradient_level_ind' ) |
---|
| 506 | READ ( 13 ) ug_vertical_gradient_level_ind |
---|
| 507 | CASE ( 'ups_limit_e' ) |
---|
| 508 | READ ( 13 ) ups_limit_e |
---|
| 509 | CASE ( 'ups_limit_pt' ) |
---|
| 510 | READ ( 13 ) ups_limit_pt |
---|
| 511 | CASE ( 'ups_limit_u' ) |
---|
| 512 | READ ( 13 ) ups_limit_u |
---|
| 513 | CASE ( 'ups_limit_v' ) |
---|
| 514 | READ ( 13 ) ups_limit_v |
---|
| 515 | CASE ( 'ups_limit_w' ) |
---|
| 516 | READ ( 13 ) ups_limit_w |
---|
| 517 | CASE ( 'use_surface_fluxes' ) |
---|
| 518 | READ ( 13 ) use_surface_fluxes |
---|
[20] | 519 | CASE ( 'use_top_fluxes' ) |
---|
| 520 | READ ( 13 ) use_top_fluxes |
---|
[1] | 521 | CASE ( 'use_ug_for_galilei_tr' ) |
---|
| 522 | READ ( 13 ) use_ug_for_galilei_tr |
---|
| 523 | CASE ( 'use_upstream_for_tke' ) |
---|
| 524 | READ ( 13 ) use_upstream_for_tke |
---|
| 525 | CASE ( 'v_init' ) |
---|
| 526 | READ ( 13 ) v_init |
---|
| 527 | CASE ( 'v_max' ) |
---|
| 528 | READ ( 13 ) v_max |
---|
| 529 | CASE ( 'v_max_ijk' ) |
---|
| 530 | READ ( 13 ) v_max_ijk |
---|
| 531 | CASE ( 'vg' ) |
---|
| 532 | READ ( 13 ) vg |
---|
| 533 | CASE ( 'vg_surface' ) |
---|
| 534 | READ ( 13 ) vg_surface |
---|
| 535 | CASE ( 'vg_vertical_gradient' ) |
---|
| 536 | READ ( 13 ) vg_vertical_gradient |
---|
| 537 | CASE ( 'vg_vertical_gradient_level' ) |
---|
| 538 | READ ( 13 ) vg_vertical_gradient_level |
---|
| 539 | CASE ( 'vg_vertical_gradient_level_ind' ) |
---|
| 540 | READ ( 13 ) vg_vertical_gradient_level_ind |
---|
[143] | 541 | CASE ( 'volume_flow_area' ) |
---|
| 542 | READ ( 13 ) volume_flow_area |
---|
| 543 | CASE ( 'volume_flow_initial' ) |
---|
| 544 | READ ( 13 ) volume_flow_initial |
---|
[1] | 545 | CASE ( 'wall_adjustment' ) |
---|
| 546 | READ ( 13 ) wall_adjustment |
---|
| 547 | CASE ( 'w_max' ) |
---|
| 548 | READ ( 13 ) w_max |
---|
| 549 | CASE ( 'w_max_ijk' ) |
---|
| 550 | READ ( 13 ) w_max_ijk |
---|
| 551 | |
---|
| 552 | CASE DEFAULT |
---|
| 553 | PRINT*, '+++ read_var_list: unknown variable named "', & |
---|
| 554 | TRIM( variable_chr ), '" found in' |
---|
| 555 | PRINT*, ' data from prior run on PE ', myid |
---|
| 556 | CALL local_stop |
---|
| 557 | END SELECT |
---|
| 558 | ! |
---|
| 559 | !-- Read next string |
---|
| 560 | READ ( 13 ) variable_chr |
---|
| 561 | |
---|
| 562 | ENDDO |
---|
| 563 | |
---|
| 564 | |
---|
[146] | 565 | END SUBROUTINE read_var_list |
---|
[143] | 566 | |
---|
[146] | 567 | |
---|
| 568 | |
---|
[147] | 569 | SUBROUTINE read_parts_of_var_list |
---|
| 570 | |
---|
| 571 | !------------------------------------------------------------------------------! |
---|
| 572 | ! Description: |
---|
| 573 | ! ------------ |
---|
| 574 | ! Skipping the global control variables from restart-file (binary format) |
---|
| 575 | ! except some informations needed when reading restart data from a previous |
---|
[151] | 576 | ! run which used a smaller total domain or/and a different domain decomposition. |
---|
[147] | 577 | !------------------------------------------------------------------------------! |
---|
| 578 | |
---|
[151] | 579 | USE arrays_3d |
---|
[147] | 580 | USE control_parameters |
---|
| 581 | USE indices |
---|
| 582 | USE pegrid |
---|
| 583 | USE statistics |
---|
| 584 | |
---|
| 585 | IMPLICIT NONE |
---|
| 586 | |
---|
| 587 | CHARACTER (LEN=10) :: version_on_file |
---|
| 588 | CHARACTER (LEN=30) :: variable_chr |
---|
| 589 | |
---|
| 590 | INTEGER :: idum, max_pr_user_on_file, nz_on_file, & |
---|
[170] | 591 | statistic_regions_on_file, tmp_mpru, tmp_sr |
---|
[147] | 592 | |
---|
[151] | 593 | REAL, DIMENSION(:,:,:), ALLOCATABLE :: hom_sum_on_file |
---|
[147] | 594 | REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: hom_on_file |
---|
| 595 | |
---|
| 596 | |
---|
| 597 | CALL check_open( 13 ) |
---|
| 598 | |
---|
| 599 | WRITE (9,*) 'rpovl: after check open 13' |
---|
| 600 | CALL local_flush( 9 ) |
---|
| 601 | READ ( 13 ) version_on_file |
---|
| 602 | |
---|
| 603 | ! |
---|
| 604 | !-- Read number of PEs and horizontal index bounds of all PEs used in previous |
---|
| 605 | !-- run |
---|
| 606 | READ ( 13 ) variable_chr |
---|
| 607 | IF ( TRIM( variable_chr ) /= 'numprocs' ) THEN |
---|
| 608 | PRINT*, '+++ read_parts_of_var_list: numprocs not found in data from ', & |
---|
| 609 | 'prior run on PE ', myid |
---|
| 610 | CALL local_stop |
---|
| 611 | ENDIF |
---|
| 612 | READ ( 13 ) numprocs_previous_run |
---|
| 613 | |
---|
| 614 | IF ( .NOT. ALLOCATED( hor_index_bounds_previous_run ) ) THEN |
---|
| 615 | ALLOCATE( hor_index_bounds_previous_run(4,0:numprocs_previous_run-1) ) |
---|
| 616 | ENDIF |
---|
| 617 | |
---|
| 618 | READ ( 13 ) variable_chr |
---|
| 619 | IF ( TRIM( variable_chr ) /= 'hor_index_bounds' ) THEN |
---|
| 620 | PRINT*, '+++ read_parts_of_var_list: hor_index_bounds not found in da', & |
---|
| 621 | 'ta from prior run on PE ', myid |
---|
| 622 | CALL local_stop |
---|
| 623 | ENDIF |
---|
| 624 | READ ( 13 ) hor_index_bounds_previous_run |
---|
| 625 | |
---|
| 626 | ! |
---|
| 627 | !-- Read vertical number of gridpoints and number of different areas used |
---|
| 628 | !-- for computing statistics. Allocate arrays depending on these values, |
---|
| 629 | !-- which are needed for the following read instructions. |
---|
| 630 | READ ( 13 ) variable_chr |
---|
| 631 | IF ( TRIM( variable_chr ) /= 'nz' ) THEN |
---|
| 632 | PRINT*, '+++ read_parts_of_var_list: nz not found in restart data file' |
---|
| 633 | CALL local_stop |
---|
| 634 | ENDIF |
---|
| 635 | READ ( 13 ) nz_on_file |
---|
| 636 | IF ( nz_on_file /= nz ) THEN |
---|
| 637 | IF ( myid == 0 ) THEN |
---|
| 638 | PRINT*, '+++ read_parts_of_var_list: mismatch concerning number of', & |
---|
| 639 | ' gridpoints along z' |
---|
| 640 | PRINT*, ' nz on file = "', nz_on_file, '"' |
---|
| 641 | PRINT*, ' nz from run = "', nz, '"' |
---|
| 642 | ENDIF |
---|
| 643 | CALL local_stop |
---|
| 644 | ENDIF |
---|
| 645 | |
---|
| 646 | READ ( 13 ) variable_chr |
---|
| 647 | IF ( TRIM( variable_chr ) /= 'max_pr_user' ) THEN |
---|
| 648 | PRINT*, '+++ read_parts_of_var_list: max_pr_user not found in restart', & |
---|
| 649 | ' data file' |
---|
| 650 | CALL local_stop |
---|
| 651 | ENDIF |
---|
| 652 | READ ( 13 ) max_pr_user_on_file |
---|
[170] | 653 | IF ( max_pr_user_on_file /= max_pr_user ) THEN |
---|
[147] | 654 | IF ( myid == 0 ) THEN |
---|
[170] | 655 | PRINT*, '+++ read_parts_of_var_list: number of user profiles on res', & |
---|
| 656 | 'tart data file differs from the current run' |
---|
[147] | 657 | PRINT*, ' max_pr_user on file = "', & |
---|
| 658 | max_pr_user_on_file, '"' |
---|
| 659 | PRINT*, ' max_pr_user from run = "', & |
---|
| 660 | max_pr_user, '"' |
---|
| 661 | ENDIF |
---|
[170] | 662 | tmp_mpru = MIN( max_pr_user_on_file, max_pr_user ) |
---|
| 663 | ELSE |
---|
| 664 | tmp_mpru = max_pr_user |
---|
[147] | 665 | ENDIF |
---|
| 666 | |
---|
| 667 | READ ( 13 ) variable_chr |
---|
| 668 | IF ( TRIM( variable_chr ) /= 'statistic_regions' ) THEN |
---|
[159] | 669 | PRINT*, '+++ read_parts_of_var_list: statistic_regions not found in ', & |
---|
| 670 | 'restart data file' |
---|
[147] | 671 | CALL local_stop |
---|
| 672 | ENDIF |
---|
| 673 | READ ( 13 ) statistic_regions_on_file |
---|
[173] | 674 | IF ( statistic_regions_on_file /= statistic_regions ) THEN |
---|
[147] | 675 | IF ( myid == 0 ) THEN |
---|
[170] | 676 | PRINT*, '+++ read_parts_of_var_list: WARNING: statistic regions on', & |
---|
| 677 | ' restart data file differ from the current run' |
---|
| 678 | PRINT*, ' statistic regions on file = "', & |
---|
| 679 | statistic_regions_on_file, '"' |
---|
| 680 | PRINT*, ' statistic regions from run = "', & |
---|
[171] | 681 | statistic_regions, '"' |
---|
[170] | 682 | PRINT*, ' statistic data may be lost!' |
---|
[147] | 683 | ENDIF |
---|
[170] | 684 | tmp_sr = MIN( statistic_regions_on_file, statistic_regions ) |
---|
| 685 | ELSE |
---|
| 686 | tmp_sr = statistic_regions |
---|
[147] | 687 | ENDIF |
---|
| 688 | |
---|
| 689 | |
---|
| 690 | ! |
---|
| 691 | !-- Now read and check some control parameters and skip the rest |
---|
| 692 | !-- The total domain of the pre-run must not be smaller than the subdomain |
---|
| 693 | !-- of the current run, because the mapping of data from the pre-run does |
---|
| 694 | !-- not work for this case. |
---|
| 695 | WRITE (9,*) 'wpovl: begin reading variables' |
---|
| 696 | CALL local_flush( 9 ) |
---|
| 697 | READ ( 13 ) variable_chr |
---|
| 698 | |
---|
| 699 | DO WHILE ( TRIM( variable_chr ) /= '*** end ***' ) |
---|
| 700 | |
---|
| 701 | SELECT CASE ( TRIM( variable_chr ) ) |
---|
| 702 | |
---|
[151] | 703 | CASE ( 'average_count_pr' ) |
---|
| 704 | READ ( 13 ) average_count_pr |
---|
| 705 | IF ( average_count_pr /= 0 .AND. myid == 0 ) THEN |
---|
| 706 | PRINT*, '+++ read_parts_of_var_list:' |
---|
| 707 | PRINT*, ' WARNING: inflow profiles not temporally averaged.' |
---|
| 708 | PRINT*, ' Averaging will be done now using ', & |
---|
| 709 | average_count_pr, ' samples.' |
---|
| 710 | ENDIF |
---|
| 711 | |
---|
[147] | 712 | CASE ( 'hom' ) |
---|
| 713 | ALLOCATE( hom_on_file(0:nz+1,2,pr_palm+max_pr_user_on_file, & |
---|
| 714 | 0:statistic_regions_on_file) ) |
---|
| 715 | READ ( 13 ) hom_on_file |
---|
[170] | 716 | hom(:,:,1:pr_palm+tmp_mpru,0:tmp_sr) = & |
---|
| 717 | hom_on_file(:,:,1:pr_palm+tmp_mpru,0:tmp_sr) |
---|
[147] | 718 | DEALLOCATE( hom_on_file ) |
---|
| 719 | |
---|
[151] | 720 | CASE ( 'hom_sum' ) |
---|
| 721 | ALLOCATE( hom_sum_on_file(0:nz+1,pr_palm+max_pr_user_on_file, & |
---|
| 722 | 0:statistic_regions_on_file) ) |
---|
| 723 | READ ( 13 ) hom_sum_on_file |
---|
[170] | 724 | hom_sum(:,1:pr_palm+tmp_mpru,0:tmp_sr) = & |
---|
| 725 | hom_sum_on_file(:,1:pr_palm+tmp_mpru,0:tmp_sr) |
---|
[151] | 726 | DEALLOCATE( hom_sum_on_file ) |
---|
| 727 | |
---|
[147] | 728 | CASE ( 'nx' ) |
---|
| 729 | READ ( 13 ) nx_on_file |
---|
| 730 | |
---|
| 731 | CASE ( 'ny' ) |
---|
| 732 | READ ( 13 ) ny_on_file |
---|
| 733 | |
---|
| 734 | |
---|
| 735 | CASE DEFAULT |
---|
| 736 | |
---|
| 737 | READ ( 13 ) idum |
---|
| 738 | |
---|
| 739 | END SELECT |
---|
| 740 | |
---|
| 741 | READ ( 13 ) variable_chr |
---|
| 742 | |
---|
| 743 | ENDDO |
---|
| 744 | |
---|
[151] | 745 | ! |
---|
| 746 | !-- Calculate the temporal average of vertical profiles, if neccessary |
---|
| 747 | IF ( average_count_pr /= 0 ) THEN |
---|
| 748 | hom_sum = hom_sum / REAL( average_count_pr ) |
---|
| 749 | ENDIF |
---|
[147] | 750 | |
---|
[151] | 751 | |
---|
[147] | 752 | END SUBROUTINE read_parts_of_var_list |
---|
| 753 | |
---|
| 754 | |
---|
| 755 | |
---|
[146] | 756 | SUBROUTINE skip_var_list |
---|
| 757 | |
---|
| 758 | !------------------------------------------------------------------------------! |
---|
| 759 | ! Description: |
---|
| 760 | ! ------------ |
---|
| 761 | ! Skipping the global control variables from restart-file (binary format) |
---|
| 762 | !------------------------------------------------------------------------------! |
---|
| 763 | |
---|
[147] | 764 | IMPLICIT NONE |
---|
| 765 | |
---|
[146] | 766 | CHARACTER (LEN=10) :: version_on_file |
---|
| 767 | CHARACTER (LEN=30) :: variable_chr |
---|
| 768 | |
---|
| 769 | INTEGER :: idum |
---|
| 770 | |
---|
| 771 | |
---|
[147] | 772 | WRITE (9,*) 'skipvl #1' |
---|
| 773 | CALL local_flush( 9 ) |
---|
[146] | 774 | READ ( 13 ) version_on_file |
---|
| 775 | |
---|
[147] | 776 | WRITE (9,*) 'skipvl before variable_chr' |
---|
| 777 | CALL local_flush( 9 ) |
---|
[146] | 778 | READ ( 13 ) variable_chr |
---|
[147] | 779 | WRITE (9,*) 'skipvl after variable_chr' |
---|
| 780 | CALL local_flush( 9 ) |
---|
[146] | 781 | |
---|
| 782 | DO WHILE ( TRIM( variable_chr ) /= '*** end ***' ) |
---|
| 783 | |
---|
[147] | 784 | WRITE (9,*) 'skipvl chr = ', variable_chr |
---|
| 785 | CALL local_flush( 9 ) |
---|
[146] | 786 | READ ( 13 ) idum |
---|
| 787 | READ ( 13 ) variable_chr |
---|
| 788 | |
---|
| 789 | ENDDO |
---|
[147] | 790 | WRITE (9,*) 'skipvl last' |
---|
| 791 | CALL local_flush( 9 ) |
---|
[146] | 792 | |
---|
| 793 | |
---|
| 794 | END SUBROUTINE skip_var_list |
---|