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