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