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