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