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