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

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

last commit documented

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