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