source: palm/trunk/SOURCE/package_parin.f90 @ 1359

Last change on this file since 1359 was 1359, checked in by hoffmann, 10 years ago

new Lagrangian particle structure integrated

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