1 | !> @file package_parin.f90 |
---|
2 | !------------------------------------------------------------------------------! |
---|
3 | ! This file is part of the PALM model system. |
---|
4 | ! |
---|
5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
6 | ! terms of the GNU General Public License as published by the Free Software |
---|
7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
8 | ! 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-2018 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: package_parin.f90 3049 2018-05-29 13:52:36Z witha $ |
---|
27 | ! Error messages revised |
---|
28 | ! |
---|
29 | ! 2932 2018-03-26 09:39:22Z Giersch |
---|
30 | ! renamed particles_par to particle_parameters |
---|
31 | ! |
---|
32 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
33 | ! Corrected "Former revisions" section |
---|
34 | ! |
---|
35 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
36 | ! Change in file header (GPL part) |
---|
37 | ! |
---|
38 | ! 2375 2017-08-29 14:10:28Z schwenkel |
---|
39 | ! Added aerosol_species |
---|
40 | ! |
---|
41 | ! 2312 2017-07-14 20:26:51Z hoffmann |
---|
42 | ! Aerosol initialization improved. |
---|
43 | ! |
---|
44 | ! 2263 2017-06-08 14:59:01Z schwenkel |
---|
45 | ! Implemented splitting and merging algorithm |
---|
46 | ! |
---|
47 | ! 2183 2017-03-17 14:29:15Z schwenkel |
---|
48 | ! |
---|
49 | ! 2182 2017-03-17 14:27:40Z schwenkel |
---|
50 | ! Added parameters for simplified particle initialization. |
---|
51 | ! |
---|
52 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
53 | ! Forced header and separation lines into 80 columns |
---|
54 | ! |
---|
55 | ! 1936 2016-06-13 13:37:44Z suehring |
---|
56 | ! +deallocate_memory, step_dealloc |
---|
57 | ! |
---|
58 | ! 1871 2016-04-15 11:46:09Z hoffmann |
---|
59 | ! Initialization of aerosols added. |
---|
60 | ! |
---|
61 | ! 1833 2016-04-07 14:23:03Z raasch |
---|
62 | ! reading of spectra_par moved to spectra_mod |
---|
63 | ! |
---|
64 | ! 1831 2016-04-07 13:15:51Z hoffmann |
---|
65 | ! curvature_solution_effects added |
---|
66 | ! |
---|
67 | ! 1826 2016-04-07 12:01:39Z maronga |
---|
68 | ! Reading of &radiation_par moved to radiation_model_mod. |
---|
69 | ! Reading of &canopy_par moved to plant_canopy_model_mod. |
---|
70 | ! |
---|
71 | ! 822 2016-04-07 07:49:42Z hoffmann |
---|
72 | ! +collision_algorithm |
---|
73 | ! Tails removed. |
---|
74 | ! |
---|
75 | ! 1817 2016-04-06 15:44:20Z maronga |
---|
76 | ! Reading of &lsm_par moved to land_surface_model_mod. |
---|
77 | ! |
---|
78 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
79 | ! Parameter dewfall removed. |
---|
80 | ! |
---|
81 | ! 1786 2016-03-08 05:49:27Z raasch |
---|
82 | ! cpp-direktives for spectra removed |
---|
83 | ! |
---|
84 | ! 1757 2016-02-22 15:49:32Z maronga |
---|
85 | ! Added parameter unscheduled_radiation_calls |
---|
86 | ! |
---|
87 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
88 | ! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity |
---|
89 | ! |
---|
90 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
91 | ! Code annotations made doxygen readable |
---|
92 | ! |
---|
93 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
94 | ! Added several radiation_par parameters |
---|
95 | ! |
---|
96 | ! 1575 2015-03-27 09:56:27Z raasch |
---|
97 | ! +seed_follows_topography in particles_par |
---|
98 | ! |
---|
99 | ! 1553 2015-03-03 17:33:54Z maronga |
---|
100 | ! Resorting of lsm_par |
---|
101 | ! |
---|
102 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
103 | ! Several changes in the liste for land surface model and radiation model |
---|
104 | ! |
---|
105 | ! 1496 2014-12-02 17:25:50Z maronga |
---|
106 | ! Added support for the land surface model and radiation scheme |
---|
107 | ! |
---|
108 | ! 1484 2014-10-21 10:53:05Z kanani |
---|
109 | ! Changes due to new module structure of the plant canopy model: |
---|
110 | ! module plant_canopy_model_mod added, |
---|
111 | ! new package/namelist canopy_par added, i.e. the canopy model is no longer |
---|
112 | ! steered over the inipar-namelist, |
---|
113 | ! drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient |
---|
114 | ! renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff. |
---|
115 | ! Changed statement tags in CONTINUE-statement |
---|
116 | ! |
---|
117 | ! 1367 2014-04-23 15:18:30Z witha |
---|
118 | ! Bugfix: module kinds must be used |
---|
119 | ! |
---|
120 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
121 | ! +alloc_factor, + min_nr_particle |
---|
122 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
123 | ! |
---|
124 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
125 | ! REAL constants defined as wp-kinds |
---|
126 | ! |
---|
127 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
128 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
129 | ! |
---|
130 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
131 | ! ONLY-attribute added to USE-statements, |
---|
132 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
133 | ! kinds are defined in new module kinds, |
---|
134 | ! old module precision_kind is removed, |
---|
135 | ! revision history before 2012 removed, |
---|
136 | ! comment fields (!:) to be used for variable explanations added to |
---|
137 | ! all variable declaration statements |
---|
138 | ! |
---|
139 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
140 | ! code put under GPL (PALM 3.9) |
---|
141 | ! |
---|
142 | ! 828 2012-02-21 12:00:36Z raasch |
---|
143 | ! +dissipation_classes, radius_classes in parpar |
---|
144 | ! |
---|
145 | ! 825 2012-02-19 03:03:44Z raasch |
---|
146 | ! wang_collision_kernel and turbulence_effects_on_collision in particles_par |
---|
147 | ! replaced by collision_kernel |
---|
148 | ! |
---|
149 | ! Revision 1.1 2000/12/28 13:21:57 raasch |
---|
150 | ! Initial revision |
---|
151 | ! |
---|
152 | ! |
---|
153 | ! Description: |
---|
154 | ! ------------ |
---|
155 | !> This subroutine reads from the NAMELIST file variables controling model |
---|
156 | !> software packages which are used optionally in the run. |
---|
157 | !> |
---|
158 | !> @todo Perform all actions in the respective submodules and remove |
---|
159 | !> package_parin |
---|
160 | !------------------------------------------------------------------------------! |
---|
161 | SUBROUTINE package_parin |
---|
162 | |
---|
163 | |
---|
164 | USE control_parameters, & |
---|
165 | ONLY: dt_data_output, dt_dopts, dt_dvrp, message_string, & |
---|
166 | particle_maximum_age, threshold |
---|
167 | |
---|
168 | USE dvrp_variables, & |
---|
169 | ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & |
---|
170 | cluster_size, color_interval, dvrpsize_interval, & |
---|
171 | dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & |
---|
172 | dvrp_password, dvrp_username, groundplate_color, & |
---|
173 | isosurface_color, mode_dvrp, particle_color, & |
---|
174 | particle_dvrpsize, pathlines_fadeintime, & |
---|
175 | pathlines_fadeouttime, pathlines_linecount, & |
---|
176 | pathlines_maxhistory, pathlines_wavecount, & |
---|
177 | pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & |
---|
178 | superelevation_x, superelevation_y, topography_color, & |
---|
179 | vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & |
---|
180 | vc_size_z |
---|
181 | |
---|
182 | USE kinds |
---|
183 | |
---|
184 | USE particle_attributes, & |
---|
185 | ONLY: aero_species, aero_type, aero_weight, alloc_factor, bc_par_b, & |
---|
186 | bc_par_lr, bc_par_ns, bc_par_t, collision_kernel, & |
---|
187 | curvature_solution_effects, deallocate_memory, density_ratio, & |
---|
188 | dissipation_classes, dt_min_part, dt_prel, & |
---|
189 | dt_write_particle_data, end_time_prel, initial_weighting_factor,& |
---|
190 | log_sigma, max_number_particles_per_gridbox, & |
---|
191 | merging, min_nr_particle, na, & |
---|
192 | number_concentration, number_of_particle_groups, & |
---|
193 | number_particles_per_gridbox, particles_per_point, & |
---|
194 | particle_advection, particle_advection_start, pdx, pdy, pdz, & |
---|
195 | psb, psl, psn, psr, pss, pst, radius, radius_classes, & |
---|
196 | radius_merge, radius_split, random_start_position, & |
---|
197 | read_particles_from_restartfile, rm, & |
---|
198 | seed_follows_topography, splitting, splitting_factor, & |
---|
199 | splitting_factor_max, splitting_function, splitting_mode, & |
---|
200 | step_dealloc, use_sgs_for_particles, & |
---|
201 | vertical_particle_advection, weight_factor_merge, & |
---|
202 | weight_factor_split, write_particle_statistics |
---|
203 | |
---|
204 | IMPLICIT NONE |
---|
205 | |
---|
206 | CHARACTER (LEN=80) :: line !< |
---|
207 | |
---|
208 | |
---|
209 | |
---|
210 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
211 | clip_dvrp_s, cluster_size, color_interval, & |
---|
212 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
213 | dvrp_file, dvrp_host, dvrp_output, & |
---|
214 | dvrp_password, dvrp_username, & |
---|
215 | groundplate_color, isosurface_color, & |
---|
216 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
217 | pathlines_fadeintime, pathlines_fadeouttime, & |
---|
218 | pathlines_linecount, pathlines_maxhistory, & |
---|
219 | pathlines_wavecount, pathlines_wavetime, & |
---|
220 | slicer_range_limits_dvrp, superelevation, & |
---|
221 | superelevation_x, superelevation_y, & |
---|
222 | threshold, topography_color, vc_alpha, & |
---|
223 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
224 | vc_size_y, vc_size_z |
---|
225 | |
---|
226 | NAMELIST /particles_par/ aero_species, aero_type, aero_weight, & |
---|
227 | alloc_factor, bc_par_b, bc_par_lr, & |
---|
228 | bc_par_ns, bc_par_t, & |
---|
229 | collision_kernel, curvature_solution_effects,& |
---|
230 | deallocate_memory, density_ratio, & |
---|
231 | dissipation_classes, dt_dopts, & |
---|
232 | dt_min_part, dt_prel, & |
---|
233 | dt_write_particle_data, & |
---|
234 | end_time_prel, initial_weighting_factor, & |
---|
235 | log_sigma, & |
---|
236 | max_number_particles_per_gridbox, merging, & |
---|
237 | min_nr_particle, & |
---|
238 | na, number_concentration, & |
---|
239 | number_of_particle_groups, & |
---|
240 | number_particles_per_gridbox, & |
---|
241 | particles_per_point, & |
---|
242 | particle_advection_start, & |
---|
243 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
244 | psl, psn, psr, pss, pst, radius, & |
---|
245 | radius_classes, radius_merge, radius_split, & |
---|
246 | random_start_position, & |
---|
247 | read_particles_from_restartfile, rm, & |
---|
248 | seed_follows_topography, & |
---|
249 | splitting, splitting_factor, & |
---|
250 | splitting_factor_max, splitting_function, & |
---|
251 | splitting_mode, step_dealloc, & |
---|
252 | use_sgs_for_particles, & |
---|
253 | vertical_particle_advection, & |
---|
254 | weight_factor_merge, weight_factor_split, & |
---|
255 | write_particle_statistics |
---|
256 | |
---|
257 | |
---|
258 | NAMELIST /particle_parameters/ & |
---|
259 | aero_species, aero_type, aero_weight, & |
---|
260 | alloc_factor, bc_par_b, bc_par_lr, & |
---|
261 | bc_par_ns, bc_par_t, & |
---|
262 | collision_kernel, curvature_solution_effects,& |
---|
263 | deallocate_memory, density_ratio, & |
---|
264 | dissipation_classes, dt_dopts, & |
---|
265 | dt_min_part, dt_prel, & |
---|
266 | dt_write_particle_data, & |
---|
267 | end_time_prel, initial_weighting_factor, & |
---|
268 | log_sigma, & |
---|
269 | max_number_particles_per_gridbox, merging, & |
---|
270 | min_nr_particle, & |
---|
271 | na, number_concentration, & |
---|
272 | number_of_particle_groups, & |
---|
273 | number_particles_per_gridbox, & |
---|
274 | particles_per_point, & |
---|
275 | particle_advection_start, & |
---|
276 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
277 | psl, psn, psr, pss, pst, radius, & |
---|
278 | radius_classes, radius_merge, radius_split, & |
---|
279 | random_start_position, & |
---|
280 | read_particles_from_restartfile, rm, & |
---|
281 | seed_follows_topography, & |
---|
282 | splitting, splitting_factor, & |
---|
283 | splitting_factor_max, splitting_function, & |
---|
284 | splitting_mode, step_dealloc, & |
---|
285 | use_sgs_for_particles, & |
---|
286 | vertical_particle_advection, & |
---|
287 | weight_factor_merge, weight_factor_split, & |
---|
288 | write_particle_statistics |
---|
289 | ! |
---|
290 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
291 | !-- parin), search for the namelist-group of the package and position the |
---|
292 | !-- file at this line. Do the same for each optionally used package. |
---|
293 | line = ' ' |
---|
294 | |
---|
295 | |
---|
296 | #if defined( __dvrp_graphics ) |
---|
297 | REWIND ( 11 ) |
---|
298 | line = ' ' |
---|
299 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
300 | READ ( 11, '(A)', END=20 ) line |
---|
301 | ENDDO |
---|
302 | BACKSPACE ( 11 ) |
---|
303 | |
---|
304 | ! |
---|
305 | !-- Read user-defined namelist |
---|
306 | READ ( 11, dvrp_graphics_par ) |
---|
307 | |
---|
308 | 20 CONTINUE |
---|
309 | #endif |
---|
310 | |
---|
311 | ! |
---|
312 | !-- Try to find particles package |
---|
313 | REWIND ( 11 ) |
---|
314 | line = ' ' |
---|
315 | DO WHILE ( INDEX( line, '&particle_parameters' ) == 0 ) |
---|
316 | READ ( 11, '(A)', END=30 ) line |
---|
317 | ENDDO |
---|
318 | BACKSPACE ( 11 ) |
---|
319 | |
---|
320 | ! |
---|
321 | !-- Read user-defined namelist |
---|
322 | READ ( 11, particle_parameters ) |
---|
323 | |
---|
324 | ! |
---|
325 | !-- Set flag that indicates that particles are switched on |
---|
326 | particle_advection = .TRUE. |
---|
327 | |
---|
328 | GOTO 31 |
---|
329 | |
---|
330 | ! |
---|
331 | !-- Try to find particles package (old namelist) |
---|
332 | 30 REWIND ( 11 ) |
---|
333 | line = ' ' |
---|
334 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
335 | READ ( 11, '(A)', END=31 ) line |
---|
336 | ENDDO |
---|
337 | BACKSPACE ( 11 ) |
---|
338 | |
---|
339 | ! |
---|
340 | !-- Read user-defined namelist |
---|
341 | READ ( 11, particles_par ) |
---|
342 | |
---|
343 | |
---|
344 | message_string = 'namelist particles_par is deprecated and will be ' // & |
---|
345 | 'removed in near future. Please use namelist ' // & |
---|
346 | 'particle_parameters instead' |
---|
347 | CALL message( 'package_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
348 | |
---|
349 | ! |
---|
350 | !-- Set flag that indicates that particles are switched on |
---|
351 | particle_advection = .TRUE. |
---|
352 | |
---|
353 | 31 CONTINUE |
---|
354 | |
---|
355 | END SUBROUTINE package_parin |
---|