source: palm/trunk/SOURCE/read_var_list.f90 @ 2

Last change on this file since 2 was 1, checked in by raasch, 17 years ago

Initial repository layout and content

File size: 17.1 KB
Line 
1 SUBROUTINE read_var_list
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6!
7!
8! Former revisions:
9! -----------------
10! $Log: read_var_list.f90,v $
11! Revision 1.34  2006/08/22 14:14:27  raasch
12! +dz_max
13!
14! Revision 1.33  2006/08/04 15:04:08  raasch
15! +first_call_advec_particles, time_dopts, use_upstream_for_tke
16!
17! Revision 1.32  2006/02/23 12:53:31  raasch
18! +building parameters, conserve_volume_flow, dissipation_1d, e_min,
19! mixing_length_1d, topography,
20! -average_count_pl, time_average_pr,
21! nt_anz renamed current_timestep_number, ..pl.. renamed ..do..
22!
23! Revision 1.31  2005/06/29 09:12:49  steinfeld
24! +ug_surface, ug_vertical_gradient, ug_vertical_gradient_level,
25! ug_vertical_gradient_level_ind, vg_surface, vg_vertical_gradient,
26! vg_vertical_gradient_level, vg_vertical_gradient_level_ind;
27! allocation of the new arrays ug and vg
28!
29! Revision 1.30  2005/06/26 20:09:42  raasch
30! +cloud_droplets
31!
32! Revision 1.29  2005/05/18 15:55:12  raasch
33! +netcdf_precision
34!
35! Revision 1.28  2005/03/26 21:01:00  raasch
36! +bc_lr, bc_ns, inflow_disturbance_begin, inflow_disturbance_end, km_damp_max,
37! outflow_damping_width
38!
39! Revision 1.27  2004/04/30 12:49:56  raasch
40! +grid_matching, impulse_advec renamed momentum_advec
41!
42! Revision 1.26  2004/01/28 15:27:33  raasch
43! at and bt replaced by array tsc
44!
45! Revision 1.25  2003/10/29 09:10:41  raasch
46! +last_dt_change
47!
48! Revision 1.24  2003/03/14 13:47:15  raasch
49! +random_generator
50!
51! Revision 1.23  2002/12/19 16:18:27  raasch
52! Array hom, which was formerly read in init_3d_model, will now be allocated
53! and read here, binary version incremented to 2.2, +time_restart,
54! STOP statement replaced by call of subroutine local_stop
55!
56! Revision 1.22  2002/04/16 08:21:06  raasch
57! +bc_s_b, bc_s_t, surface_scalarflux, s_surface, s_surface_initial_change,
58! s_vertical_gradient, s_vertical_gradient_level
59!
60! Revision 1.21  2001/08/21 10:01:23  raasch
61! +wall_adjustment
62!
63! Revision 1.20  2001/03/30 07:51:25  raasch
64! Translation of remaining German identifiers (variables, subroutines, etc.),
65! runtime and package parameters are not read from unit 13 any more
66!
67! Revision 1.19  2001/01/29 12:35:03  raasch
68! +passive_scalar
69!
70! Revision 1.18  2001/01/25 07:24:28  raasch
71! +fft_method, use_surface_fluxes
72!
73! Revision 1.17  2001/01/05 15:16:18  raasch
74! +average_count_sp, time_dosp
75!
76! Revision 1.16  2000/12/28 13:38:46  raasch
77! Module dvrp_variables removed, -particle_transport
78!
79! Revision 1.15  2000/04/27 06:57:04  raasch
80! +dt_dvrp, dvrp_filecount, npex, npey, threshold, time_dvrp
81! -dt_plisos, dt_plpart, time_plisos, time_plpart,
82! all comments translated into English, old revision remarks deleted
83!
84! Revision 1.14  2000/04/13 13:06:16  schroeter
85! Einlesen der Initialisierungsparameter fuer Rechnungen
86! mit Feuchte/Wolkenphysik
87!
88! Revision 1.13  2000/01/10  10:06:32  10:06:32  raasch (Siegfried Raasch)
89! +use_ug_for_galilei_tr
90!
91! Revision 1.1  1998/03/18 20:18:48  raasch
92! Initial revision
93!
94!
95! Description:
96! ------------
97! Reading values of control variables from restart-file (binary format)
98!------------------------------------------------------------------------------!
99
100    USE arrays_3d
101    USE averaging
102    USE grid_variables
103    USE indices
104    USE model_1d
105    USE pegrid
106    USE profil_parameter
107    USE statistics
108    USE control_parameters
109
110    IMPLICIT NONE
111
112    CHARACTER (LEN=10) ::  binary_version, version_on_file
113    CHARACTER (LEN=30) ::  variable_chr
114   
115    CALL check_open( 13 )
116
117!
118!-- Make version number check first
119    READ ( 13 )  version_on_file
120    binary_version = '3.0'
121    IF ( TRIM( version_on_file ) /= TRIM( binary_version ) )  THEN
122       IF ( myid == 0 )  THEN
123          PRINT*, '+++ read_var_list: version mismatch concerning control', &
124                  ' variables'
125          PRINT*, '                   version on file    = "', &
126                  TRIM( version_on_file ), '"'
127          PRINT*, '                   version on program = "', &
128                  TRIM( binary_version ), '"'
129       ENDIF
130       CALL local_stop
131    ENDIF
132
133!
134!-- Read vertical number of gridpoints and number of different areas used
135!-- for computing statistics. Allocate arrays depending on these values,
136!-- which are needed for the following read instructions.
137    READ ( 13 )  variable_chr
138    IF ( TRIM( variable_chr ) /= 'nz' )  THEN
139       PRINT*, '+++ read_var_list: nz not found in data from prior run on PE ',&
140               myid
141       CALL local_stop
142    ENDIF
143    READ ( 13 )  nz
144    READ ( 13 )  variable_chr
145    IF ( TRIM( variable_chr ) /= 'statistic_regions' )  THEN
146       PRINT*, '+++ read_var_list: statistic_regions not found in data from ', &
147                    'prior run on PE ', myid
148       CALL local_stop
149    ENDIF
150    READ ( 13 )  statistic_regions
151    ALLOCATE( ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), v_init(0:nz+1), & 
152              pt_init(0:nz+1), q_init(0:nz+1), &
153              hom(0:nz+1,2,var_hom,0:statistic_regions) )
154
155!
156!-- Now read all control parameters:
157!-- Caution: When the following read instructions have been changed, the
158!-- -------  version number stored in the variable binary_version has to be
159!--          increased. The same changes must also be done in write_var_list.
160    READ ( 13 )  variable_chr
161    DO  WHILE ( TRIM( variable_chr ) /= '*** end ***' )
162
163       SELECT CASE ( TRIM( variable_chr ) )
164
165          CASE ( 'adjust_mixing_length' )
166             READ ( 13 )  adjust_mixing_length
167          CASE ( 'advected_distance_x' )
168             READ ( 13 )  advected_distance_x
169          CASE ( 'advected_distance_y' )
170             READ ( 13 )  advected_distance_y
171          CASE ( 'alpha_surface' )
172             READ ( 13 )  alpha_surface
173          CASE ( 'average_count_pr' )
174             READ ( 13 )  average_count_pr
175          CASE ( 'average_count_sp' )
176             READ ( 13 )  average_count_sp
177          CASE ( 'average_count_3d' )
178             READ ( 13 )  average_count_3d
179          CASE ( 'bc_e_b' )
180             READ ( 13 )  bc_e_b
181          CASE ( 'bc_lr' )
182             READ ( 13 )  bc_lr
183          CASE ( 'bc_ns' )
184             READ ( 13 )  bc_ns
185          CASE ( 'bc_p_b' )
186             READ ( 13 )  bc_p_b
187          CASE ( 'bc_p_t' )
188             READ ( 13 )  bc_p_t
189          CASE ( 'bc_pt_b' )
190             READ ( 13 )  bc_pt_b
191          CASE ( 'bc_pt_t' )
192             READ ( 13 )  bc_pt_t
193          CASE ( 'bc_pt_t_val' )
194             READ ( 13 )  bc_pt_t_val
195          CASE ( 'bc_q_b' )
196             READ ( 13 )  bc_q_b
197          CASE ( 'bc_q_t' )
198             READ ( 13 )  bc_q_t
199          CASE ( 'bc_q_t_val' )
200             READ ( 13 )  bc_q_t_val
201          CASE ( 'bc_s_b' )
202             READ ( 13 )  bc_s_b
203          CASE ( 'bc_s_t' )
204             READ ( 13 )  bc_s_t
205          CASE ( 'bc_uv_b' )
206             READ ( 13 )  bc_uv_b
207          CASE ( 'bc_uv_t' )
208             READ ( 13 )  bc_uv_t
209          CASE ( 'building_height' )
210             READ ( 13 )  building_height
211          CASE ( 'building_length_x' )
212             READ ( 13 )  building_length_x
213          CASE ( 'building_length_y' )
214             READ ( 13 )  building_length_y
215          CASE ( 'building_wall_left' )
216             READ ( 13 )  building_wall_left
217          CASE ( 'building_wall_south' )
218             READ ( 13 )  building_wall_south
219          CASE ( 'cloud_droplets' )
220             READ ( 13 )  cloud_droplets
221          CASE ( 'cloud_physics' )
222             READ ( 13 )  cloud_physics
223          CASE ( 'conserve_volume_flow' )
224             READ ( 13 )  conserve_volume_flow
225          CASE ( 'current_timestep_number' )
226             READ ( 13 )  current_timestep_number
227          CASE ( 'cut_spline_overshoot' )
228             READ ( 13 )  cut_spline_overshoot
229          CASE ( 'damp_level_1d' )
230             READ ( 13 )  damp_level_1d
231          CASE ( 'dissipation_1d' )
232             READ ( 13 )  dissipation_1d
233          CASE ( 'dt_fixed' )
234             READ ( 13 )  dt_fixed
235          CASE ( 'dt_pr_1d' )
236             READ ( 13 )  dt_pr_1d
237          CASE ( 'dt_run_control_1d' )
238             READ ( 13 )  dt_run_control_1d
239          CASE ( 'dt_3d' )
240             READ ( 13 )  dt_3d
241          CASE ( 'dvrp_filecount' )
242             READ ( 13 )  dvrp_filecount
243          CASE ( 'dx' )
244             READ ( 13 )  dx
245          CASE ( 'dy' )
246             READ ( 13 )  dy
247          CASE ( 'dz' )
248             READ ( 13 )  dz
249          CASE ( 'dz_max' )
250             READ ( 13 )  dz_max
251          CASE ( 'dz_stretch_factor' )
252             READ ( 13 )  dz_stretch_factor
253          CASE ( 'dz_stretch_level' )
254             READ ( 13 )  dz_stretch_level
255          CASE ( 'e_min' )
256             READ ( 13 )  e_min
257          CASE ( 'end_time_1d' )
258             READ ( 13 )  end_time_1d
259          CASE ( 'fft_method' )
260             READ ( 13 )  fft_method
261          CASE ( 'first_call_advec_particles' )
262             READ ( 13 )  first_call_advec_particles
263          CASE ( 'galilei_transformation' )
264             READ ( 13 )  galilei_transformation
265          CASE ( 'grid_matching' )
266             READ ( 13 )  grid_matching
267          CASE ( 'hom' )
268             READ ( 13 )  hom
269          CASE ( 'inflow_disturbance_begin' )
270             READ ( 13 )  inflow_disturbance_begin
271          CASE ( 'inflow_disturbance_end' )
272             READ ( 13 )  inflow_disturbance_end
273          CASE ( 'km_constant' )
274             READ ( 13 )  km_constant
275          CASE ( 'km_damp_max' )
276             READ ( 13 )  km_damp_max
277          CASE ( 'last_dt_change' )
278             READ ( 13 )  last_dt_change
279          CASE ( 'long_filter_factor' )
280             READ ( 13 )  long_filter_factor
281          CASE ( 'mixing_length_1d' )
282             READ ( 13 )  mixing_length_1d
283          CASE ( 'moisture' )
284             READ ( 13 )  moisture
285          CASE ( 'momentum_advec' )
286             READ ( 13 )  momentum_advec
287          CASE ( 'netcdf_precision' )
288             READ ( 13 )  netcdf_precision
289          CASE ( 'npex' )
290             READ ( 13 )  npex
291          CASE ( 'npey' )
292             READ ( 13 )  npey
293          CASE ( 'nsor_ini' )
294             READ ( 13 )  nsor_ini
295          CASE ( 'nx' )
296             READ ( 13 )  nx
297          CASE ( 'ny' )
298             READ ( 13 )  ny
299          CASE ( 'old_dt' )
300             READ ( 13 )  old_dt
301          CASE ( 'omega' )
302             READ ( 13 )  omega
303          CASE ( 'outflow_damping_width' )
304             READ ( 13 )  outflow_damping_width
305          CASE ( 'overshoot_limit_e' )
306             READ ( 13 )  overshoot_limit_e
307          CASE ( 'overshoot_limit_pt' )
308             READ ( 13 )  overshoot_limit_pt
309          CASE ( 'overshoot_limit_u' )
310             READ ( 13 )  overshoot_limit_u
311          CASE ( 'overshoot_limit_v' )
312             READ ( 13 )  overshoot_limit_v
313          CASE ( 'overshoot_limit_w' )
314             READ ( 13 )  overshoot_limit_w
315          CASE ( 'passive_scalar' )
316             READ ( 13 )  passive_scalar
317          CASE ( 'phi' )
318             READ ( 13 )  phi
319          CASE ( 'prandtl_layer' )
320             READ ( 13 )  prandtl_layer
321          CASE ( 'precipitation' )
322             READ ( 13 ) precipitation
323          CASE ( 'pt_init' )
324             READ ( 13 )  pt_init
325          CASE ( 'pt_surface' )
326             READ ( 13 )  pt_surface
327          CASE ( 'pt_surface_initial_change' )
328             READ ( 13 )  pt_surface_initial_change
329          CASE ( 'pt_vertical_gradient' )
330             READ ( 13 )  pt_vertical_gradient
331          CASE ( 'pt_vertical_gradient_level' )
332             READ ( 13 )  pt_vertical_gradient_level
333          CASE ( 'pt_vertical_gradient_level_ind' )
334             READ ( 13 )  pt_vertical_gradient_level_ind
335          CASE ( 'q_init' )
336             READ ( 13 )  q_init
337          CASE ( 'q_surface' )
338             READ ( 13 )  q_surface
339          CASE ( 'q_surface_initial_change' )
340             READ ( 13 )  q_surface_initial_change
341          CASE ( 'q_vertical_gradient' )
342             READ ( 13 )  q_vertical_gradient
343          CASE ( 'q_vertical_gradient_level' )
344             READ ( 13 )  q_vertical_gradient_level
345          CASE ( 'q_vertical_gradient_level_ind' )
346             READ ( 13 )  q_vertical_gradient_level_ind
347          CASE ( 'radiation' )
348             READ ( 13 )  radiation
349          CASE ( 'random_generator' )
350             READ ( 13 )  random_generator
351          CASE ( 'random_heatflux' )
352             READ ( 13 )  random_heatflux
353          CASE ( 'rif_max' )
354             READ ( 13 )  rif_max
355          CASE ( 'rif_min' )
356             READ ( 13 )  rif_min
357          CASE ( 'roughness_length' )
358             READ ( 13 )  roughness_length
359          CASE ( 'runnr' )
360             READ ( 13 )  runnr
361          CASE ( 'scalar_advec' )
362             READ ( 13 )  scalar_advec
363          CASE ( 'simulated_time' )
364             READ ( 13 )  simulated_time
365          CASE ( 'surface_heatflux' )
366             READ ( 13 )  surface_heatflux
367          CASE ( 'surface_pressure' )
368             READ ( 13 )  surface_pressure
369          CASE ( 'surface_scalarflux' )
370             READ ( 13 )  surface_scalarflux             
371          CASE ( 'surface_waterflux' )
372             READ ( 13 )  surface_waterflux             
373          CASE ( 's_surface' )
374             READ ( 13 )  s_surface
375          CASE ( 's_surface_initial_change' )
376             READ ( 13 )  s_surface_initial_change
377          CASE ( 's_vertical_gradient' )
378             READ ( 13 )  s_vertical_gradient
379          CASE ( 's_vertical_gradient_level' )
380             READ ( 13 )  s_vertical_gradient_level
381          CASE ( 'time_disturb' )
382             READ ( 13 )  time_disturb
383          CASE ( 'time_dopr' )
384             READ ( 13 )  time_dopr
385          CASE ( 'time_dopr_av' )
386             READ ( 13 )  time_dopr_av
387          CASE ( 'time_dopr_listing' )
388             READ ( 13 )  time_dopr_listing
389          CASE ( 'time_dopts' )
390             READ ( 13 )  time_dopts
391          CASE ( 'time_dosp' )
392             READ ( 13 )  time_dosp
393          CASE ( 'time_dots' )
394             READ ( 13 )  time_dots
395          CASE ( 'time_do2d_xy' )
396             READ ( 13 )  time_do2d_xy
397          CASE ( 'time_do2d_xz' )
398             READ ( 13 )  time_do2d_xz
399          CASE ( 'time_do2d_yz' )
400             READ ( 13 )  time_do2d_yz
401          CASE ( 'time_do3d' )
402             READ ( 13 )  time_do3d
403          CASE ( 'time_do_av' )
404             READ ( 13 )  time_do_av
405          CASE ( 'time_do_sla' )
406             READ ( 13 )  time_do_sla
407          CASE ( 'time_dvrp' )
408             READ ( 13 )  time_dvrp
409          CASE ( 'time_restart' )
410             READ ( 13 )  time_restart
411          CASE ( 'time_run_control' )
412             READ ( 13 )  time_run_control
413          CASE ( 'timestep_scheme' )
414             READ ( 13 )  timestep_scheme
415          CASE ( 'topography' )
416             READ ( 13 )  topography
417          CASE ( 'tsc' )
418             READ ( 13 )  tsc
419          CASE ( 'u_init' )
420             READ ( 13 )  u_init
421          CASE ( 'u_max' )
422             READ ( 13 )  u_max
423          CASE ( 'u_max_ijk' )
424             READ ( 13 )  u_max_ijk
425          CASE ( 'ug' )
426             READ ( 13 )  ug
427          CASE ( 'ug_surface' )
428             READ ( 13 )  ug_surface
429          CASE ( 'ug_vertical_gradient' )
430             READ ( 13 )  ug_vertical_gradient
431          CASE ( 'ug_vertical_gradient_level' )
432             READ ( 13 )  ug_vertical_gradient_level
433          CASE ( 'ug_vertical_gradient_level_ind' )
434             READ ( 13 )  ug_vertical_gradient_level_ind
435          CASE ( 'ups_limit_e' )
436             READ ( 13 )  ups_limit_e
437          CASE ( 'ups_limit_pt' )
438             READ ( 13 )  ups_limit_pt
439          CASE ( 'ups_limit_u' )
440             READ ( 13 )  ups_limit_u
441          CASE ( 'ups_limit_v' )
442             READ ( 13 )  ups_limit_v
443          CASE ( 'ups_limit_w' )
444             READ ( 13 )  ups_limit_w
445          CASE ( 'use_surface_fluxes' )
446             READ ( 13 )  use_surface_fluxes
447          CASE ( 'use_ug_for_galilei_tr' )
448             READ ( 13 )  use_ug_for_galilei_tr
449          CASE ( 'use_upstream_for_tke' )
450             READ ( 13 )  use_upstream_for_tke
451          CASE ( 'v_init' )
452             READ ( 13 )  v_init
453          CASE ( 'v_max' )
454             READ ( 13 )  v_max
455          CASE ( 'v_max_ijk' )
456             READ ( 13 )  v_max_ijk
457          CASE ( 'vg' )
458             READ ( 13 )  vg
459          CASE ( 'vg_surface' )
460             READ ( 13 )  vg_surface
461          CASE ( 'vg_vertical_gradient' )
462             READ ( 13 )  vg_vertical_gradient
463          CASE ( 'vg_vertical_gradient_level' )
464             READ ( 13 )  vg_vertical_gradient_level
465          CASE ( 'vg_vertical_gradient_level_ind' )
466             READ ( 13 )  vg_vertical_gradient_level_ind
467          CASE ( 'wall_adjustment' )
468             READ ( 13 )  wall_adjustment
469          CASE ( 'w_max' )
470             READ ( 13 )  w_max
471          CASE ( 'w_max_ijk' )
472             READ ( 13 )  w_max_ijk
473          CASE ( 'time-series-quantities' )
474             READ ( 13 )  cross_ts_uymax, cross_ts_uymax_computed, &
475                          cross_ts_uymin, cross_ts_uymin_computed
476
477          CASE DEFAULT
478             PRINT*, '+++ read_var_list: unknown variable named "', &
479                     TRIM( variable_chr ), '" found in'
480             PRINT*, '                   data from prior run on PE ', myid
481             CALL local_stop
482        END SELECT
483!
484!--    Read next string
485       READ ( 13 )  variable_chr
486
487    ENDDO
488
489
490 END SUBROUTINE read_var_list
Note: See TracBrowser for help on using the repository browser.