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