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