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