1 | SUBROUTINE package_parin |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later version. |
---|
9 | ! |
---|
10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
13 | ! |
---|
14 | ! You should have received a copy of the GNU General Public License along with |
---|
15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
16 | ! |
---|
17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: package_parin.f90 1368 2014-04-23 15:24:38Z suehring $ |
---|
27 | ! |
---|
28 | ! 1367 2014-04-23 15:18:30Z witha |
---|
29 | ! Bugfix: module kinds must be used |
---|
30 | ! |
---|
31 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
32 | ! +alloc_factor, + min_nr_particle |
---|
33 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
34 | ! |
---|
35 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
36 | ! REAL constants defined as wp-kinds |
---|
37 | ! |
---|
38 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
39 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
40 | ! |
---|
41 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
42 | ! ONLY-attribute added to USE-statements, |
---|
43 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
44 | ! kinds are defined in new module kinds, |
---|
45 | ! old module precision_kind is removed, |
---|
46 | ! revision history before 2012 removed, |
---|
47 | ! comment fields (!:) to be used for variable explanations added to |
---|
48 | ! all variable declaration statements |
---|
49 | ! |
---|
50 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
51 | ! code put under GPL (PALM 3.9) |
---|
52 | ! |
---|
53 | ! 828 2012-02-21 12:00:36Z raasch |
---|
54 | ! +dissipation_classes, radius_classes in parpar |
---|
55 | ! |
---|
56 | ! 825 2012-02-19 03:03:44Z raasch |
---|
57 | ! wang_collision_kernel and turbulence_effects_on_collision in particles_par |
---|
58 | ! replaced by collision_kernel |
---|
59 | ! |
---|
60 | ! Revision 1.1 2000/12/28 13:21:57 raasch |
---|
61 | ! Initial revision |
---|
62 | ! |
---|
63 | ! |
---|
64 | ! Description: |
---|
65 | ! ------------ |
---|
66 | ! This subroutine reads from the NAMELIST file variables controling model |
---|
67 | ! software packages which are used optionally in the run. |
---|
68 | !------------------------------------------------------------------------------! |
---|
69 | |
---|
70 | USE control_parameters, & |
---|
71 | ONLY: averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp, & |
---|
72 | dt_dvrp, particle_maximum_age, skip_time_dosp, threshold |
---|
73 | |
---|
74 | USE dvrp_variables, & |
---|
75 | ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & |
---|
76 | cluster_size, color_interval, dvrpsize_interval, & |
---|
77 | dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & |
---|
78 | dvrp_password, dvrp_username, groundplate_color, & |
---|
79 | isosurface_color, mode_dvrp, particle_color, & |
---|
80 | particle_dvrpsize, pathlines_fadeintime, & |
---|
81 | pathlines_fadeouttime, pathlines_linecount, & |
---|
82 | pathlines_maxhistory, pathlines_wavecount, & |
---|
83 | pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & |
---|
84 | superelevation_x, superelevation_y, topography_color, & |
---|
85 | vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & |
---|
86 | vc_size_z |
---|
87 | |
---|
88 | USE kinds |
---|
89 | |
---|
90 | USE particle_attributes, & |
---|
91 | ONLY: alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, & |
---|
92 | collision_kernel, density_ratio, dissipation_classes, & |
---|
93 | dt_min_part, dt_prel, dt_write_particle_data, dvrp_psize, & |
---|
94 | end_time_prel, initial_weighting_factor, & |
---|
95 | maximum_number_of_tailpoints, & |
---|
96 | maximum_tailpoint_age, minimum_tailpoint_distance, & |
---|
97 | min_nr_particle, number_of_particle_groups, particles_per_point,& |
---|
98 | particle_advection, particle_advection_start, pdx, pdy, pdz, & |
---|
99 | psb, psl, psn, psr, pss, pst, radius, radius_classes, & |
---|
100 | random_start_position, read_particles_from_restartfile, & |
---|
101 | skip_particles_for_tail, use_particle_tails, & |
---|
102 | use_sgs_for_particles, vertical_particle_advection, & |
---|
103 | write_particle_statistics |
---|
104 | |
---|
105 | USE spectrum, & |
---|
106 | ONLY: comp_spectra_level, data_output_sp, plot_spectra_level, & |
---|
107 | spectra_direction |
---|
108 | |
---|
109 | IMPLICIT NONE |
---|
110 | |
---|
111 | CHARACTER (LEN=80) :: line !: |
---|
112 | |
---|
113 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
114 | clip_dvrp_s, cluster_size, color_interval, & |
---|
115 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
116 | dvrp_file, dvrp_host, dvrp_output, & |
---|
117 | dvrp_password, dvrp_psize, dvrp_username, & |
---|
118 | groundplate_color, isosurface_color, & |
---|
119 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
120 | pathlines_fadeintime, pathlines_fadeouttime, & |
---|
121 | pathlines_linecount, pathlines_maxhistory, & |
---|
122 | pathlines_wavecount, pathlines_wavetime, & |
---|
123 | slicer_range_limits_dvrp, superelevation, & |
---|
124 | superelevation_x, superelevation_y, & |
---|
125 | threshold, topography_color, vc_alpha, & |
---|
126 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
127 | vc_size_y, vc_size_z |
---|
128 | |
---|
129 | NAMELIST /particles_par/ alloc_factor, bc_par_b, bc_par_lr, & |
---|
130 | bc_par_ns, bc_par_t, collision_kernel, & |
---|
131 | density_ratio, dissipation_classes, dt_dopts,& |
---|
132 | dt_min_part, dt_prel, & |
---|
133 | dt_write_particle_data, & |
---|
134 | end_time_prel, initial_weighting_factor, & |
---|
135 | maximum_number_of_tailpoints, & |
---|
136 | maximum_tailpoint_age, & |
---|
137 | minimum_tailpoint_distance, & |
---|
138 | min_nr_particle, & |
---|
139 | number_of_particle_groups, & |
---|
140 | particles_per_point, & |
---|
141 | particle_advection_start, & |
---|
142 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
143 | psl, psn, psr, pss, pst, radius, & |
---|
144 | radius_classes, random_start_position, & |
---|
145 | read_particles_from_restartfile, & |
---|
146 | skip_particles_for_tail, & |
---|
147 | use_particle_tails, use_sgs_for_particles, & |
---|
148 | vertical_particle_advection, & |
---|
149 | write_particle_statistics |
---|
150 | |
---|
151 | NAMELIST /spectra_par/ averaging_interval_sp, comp_spectra_level, & |
---|
152 | data_output_sp, dt_dosp, plot_spectra_level, & |
---|
153 | skip_time_dosp, spectra_direction |
---|
154 | |
---|
155 | ! |
---|
156 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
157 | !-- parin), search for the namelist-group of the package and position the |
---|
158 | !-- file at this line. Do the same for each optionally used package. |
---|
159 | line = ' ' |
---|
160 | |
---|
161 | #if defined( __dvrp_graphics ) |
---|
162 | REWIND ( 11 ) |
---|
163 | line = ' ' |
---|
164 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
165 | READ ( 11, '(A)', END=10 ) line |
---|
166 | ENDDO |
---|
167 | BACKSPACE ( 11 ) |
---|
168 | |
---|
169 | ! |
---|
170 | !-- Read user-defined namelist |
---|
171 | READ ( 11, dvrp_graphics_par ) |
---|
172 | |
---|
173 | 10 CONTINUE |
---|
174 | #endif |
---|
175 | |
---|
176 | ! |
---|
177 | !-- Try to find particles package |
---|
178 | REWIND ( 11 ) |
---|
179 | line = ' ' |
---|
180 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
181 | READ ( 11, '(A)', END=20 ) line |
---|
182 | ENDDO |
---|
183 | BACKSPACE ( 11 ) |
---|
184 | |
---|
185 | ! |
---|
186 | !-- Read user-defined namelist |
---|
187 | READ ( 11, particles_par ) |
---|
188 | |
---|
189 | ! |
---|
190 | !-- Set flag that indicates that particles are switched on |
---|
191 | particle_advection = .TRUE. |
---|
192 | |
---|
193 | 20 CONTINUE |
---|
194 | |
---|
195 | |
---|
196 | #if defined( __spectra ) |
---|
197 | REWIND ( 11 ) |
---|
198 | line = ' ' |
---|
199 | DO WHILE ( INDEX( line, '&spectra_par' ) == 0 ) |
---|
200 | READ ( 11, '(A)', END=30 ) line |
---|
201 | ENDDO |
---|
202 | BACKSPACE ( 11 ) |
---|
203 | |
---|
204 | ! |
---|
205 | !-- Read user-defined namelist |
---|
206 | READ ( 11, spectra_par ) |
---|
207 | |
---|
208 | ! |
---|
209 | !-- Default setting of dt_dosp here (instead of check_parameters), because its |
---|
210 | !-- current value is needed in init_pegrid |
---|
211 | IF ( dt_dosp == 9999999.9_wp ) dt_dosp = dt_data_output |
---|
212 | |
---|
213 | 30 CONTINUE |
---|
214 | #endif |
---|
215 | |
---|
216 | END SUBROUTINE package_parin |
---|