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

Last change on this file since 1826 was 1826, checked in by maronga, 8 years ago

further modularization of radiation model and plant canopy model

  • Property svn:keywords set to Id
File size: 10.6 KB
Line 
1!> @file package_parin.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2016 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21! Reading of &radiation_par moved to radiation_model_mod.
22! Reading of &canopy_par moved to plant_canopy_model_mod.
23!
24! Former revisions:
25! -----------------
26! $Id: package_parin.f90 1826 2016-04-07 12:01:39Z maronga $
27!
28! 822 2016-04-07 07:49:42Z hoffmann
29! +collision_algorithm
30! Tails removed.
31!
32! 1817 2016-04-06 15:44:20Z maronga
33! Reading of &lsm_par moved to land_surface_model_mod.
34!
35! 1788 2016-03-10 11:01:04Z maronga
36! Parameter dewfall removed.
37!
38! 1786 2016-03-08 05:49:27Z raasch
39! cpp-direktives for spectra removed
40!
41! 1757 2016-02-22 15:49:32Z maronga
42! Added parameter unscheduled_radiation_calls
43!
44! 1691 2015-10-26 16:17:44Z maronga
45! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity
46!
47! 1682 2015-10-07 23:56:08Z knoop
48! Code annotations made doxygen readable
49!
50! 1585 2015-04-30 07:05:52Z maronga
51! Added several radiation_par parameters
52!
53! 1575 2015-03-27 09:56:27Z raasch
54! +seed_follows_topography in particles_par
55!
56! 1553 2015-03-03 17:33:54Z maronga
57! Resorting of lsm_par
58!
59! 1551 2015-03-03 14:18:16Z maronga
60! Several changes in the liste for land surface model and radiation model
61!
62! 1496 2014-12-02 17:25:50Z maronga
63! Added support for the land surface model and radiation scheme
64!
65! 1484 2014-10-21 10:53:05Z kanani
66! Changes due to new module structure of the plant canopy model:
67!   module plant_canopy_model_mod added,
68!   new package/namelist canopy_par added, i.e. the canopy model is no longer
69!   steered over the inipar-namelist,
70!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
71!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff.
72! Changed statement tags in CONTINUE-statement
73!
74! 1367 2014-04-23 15:18:30Z witha
75! Bugfix: module kinds must be used
76!
77! 1359 2014-04-11 17:15:14Z hoffmann
78! +alloc_factor, + min_nr_particle
79! -dt_sort_particles, -maximum_number_of_particles
80!
81! 1340 2014-03-25 19:45:13Z kanani
82! REAL constants defined as wp-kinds
83!
84! 1324 2014-03-21 09:13:16Z suehring
85! Bugfix: Missing variable dt_data_output output added to ONLY statement
86!
87! 1320 2014-03-20 08:40:49Z raasch
88! ONLY-attribute added to USE-statements,
89! kind-parameters added to all INTEGER and REAL declaration statements,
90! kinds are defined in new module kinds,
91! old module precision_kind is removed,
92! revision history before 2012 removed,
93! comment fields (!:) to be used for variable explanations added to
94! all variable declaration statements
95!
96! 1036 2012-10-22 13:43:42Z raasch
97! code put under GPL (PALM 3.9)
98!
99! 828 2012-02-21 12:00:36Z raasch
100! +dissipation_classes, radius_classes in parpar
101!
102! 825 2012-02-19 03:03:44Z raasch
103! wang_collision_kernel and turbulence_effects_on_collision in particles_par
104! replaced by collision_kernel
105!
106! Revision 1.1  2000/12/28 13:21:57  raasch
107! Initial revision
108!
109!
110! Description:
111! ------------
112!> This subroutine reads from the NAMELIST file variables controling model
113!> software packages which are used optionally in the run.
114!>
115!> @todo Perform all actions in the respective submodules and remove
116!>       package_parin
117!------------------------------------------------------------------------------!
118 SUBROUTINE package_parin
119 
120
121    USE control_parameters,                                                    &
122        ONLY:  averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp,       &
123               dt_dvrp, particle_maximum_age, skip_time_dosp,                  &
124               threshold
125
126    USE dvrp_variables,                                                        &
127        ONLY:  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s,             &
128               cluster_size, color_interval, dvrpsize_interval,                &
129               dvrp_directory, dvrp_file, dvrp_host, dvrp_output,              &
130               dvrp_password, dvrp_username, groundplate_color,                &
131               isosurface_color, mode_dvrp, particle_color,                    &
132               particle_dvrpsize, pathlines_fadeintime,                        &
133               pathlines_fadeouttime, pathlines_linecount,                     &
134               pathlines_maxhistory, pathlines_wavecount,                      &
135               pathlines_wavetime, slicer_range_limits_dvrp, superelevation,   &
136               superelevation_x, superelevation_y, topography_color,           &
137               vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y,   &
138               vc_size_z
139
140    USE kinds
141
142    USE particle_attributes,                                                   &
143        ONLY:  alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,         &
144               collision_algorithm, collision_kernel, density_ratio,           &
145               dissipation_classes, dt_min_part, dt_prel,                      &
146               dt_write_particle_data,                                         &
147               end_time_prel, initial_weighting_factor,                        &
148               min_nr_particle, number_of_particle_groups, particles_per_point,&
149               particle_advection, particle_advection_start, pdx, pdy, pdz,    &
150               psb, psl, psn, psr, pss, pst, radius, radius_classes,           &
151               random_start_position, read_particles_from_restartfile,         &
152               seed_follows_topography, use_sgs_for_particles,                 &
153               vertical_particle_advection, write_particle_statistics
154
155    USE spectrum,                                                              &
156        ONLY:  comp_spectra_level, data_output_sp, plot_spectra_level,         &
157               spectra_direction
158
159    IMPLICIT NONE
160
161    CHARACTER (LEN=80) ::  line  !<
162
163
164
165    NAMELIST /dvrp_graphics_par/  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r,       &
166                                  clip_dvrp_s, cluster_size, color_interval,   &
167                                  dt_dvrp, dvrpsize_interval, dvrp_directory,  &
168                                  dvrp_file, dvrp_host, dvrp_output,           &
169                                  dvrp_password, dvrp_username,                &
170                                  groundplate_color, isosurface_color,         &
171                                  mode_dvrp, particle_color, particle_dvrpsize,&
172                                  pathlines_fadeintime, pathlines_fadeouttime, &
173                                  pathlines_linecount, pathlines_maxhistory,   &
174                                  pathlines_wavecount, pathlines_wavetime,     &
175                                  slicer_range_limits_dvrp, superelevation,    &
176                                  superelevation_x, superelevation_y,          &
177                                  threshold, topography_color, vc_alpha,       &
178                                  vc_gradient_normals, vc_mode, vc_size_x,     &
179                                  vc_size_y, vc_size_z
180
181    NAMELIST /particles_par/      alloc_factor, bc_par_b, bc_par_lr,           &
182                                  bc_par_ns, bc_par_t, collision_algorithm,    &
183                                  collision_kernel,                            &
184                                  density_ratio, dissipation_classes, dt_dopts,&
185                                  dt_min_part, dt_prel,                        &
186                                  dt_write_particle_data,                      &
187                                  end_time_prel, initial_weighting_factor,     &
188                                  min_nr_particle,                             &
189                                  number_of_particle_groups,                   &
190                                  particles_per_point,                         &
191                                  particle_advection_start,                    &
192                                  particle_maximum_age, pdx, pdy, pdz, psb,    &
193                                  psl, psn, psr, pss, pst, radius,             &
194                                  radius_classes, random_start_position,       &
195                                  read_particles_from_restartfile,             &
196                                  seed_follows_topography,                     &
197                                  use_sgs_for_particles,                       &
198                                  vertical_particle_advection,                 &
199                                  write_particle_statistics
200
201    NAMELIST /spectra_par/        averaging_interval_sp, comp_spectra_level,   &
202                                  data_output_sp, dt_dosp, plot_spectra_level, &
203                                  skip_time_dosp, spectra_direction
204
205!
206!-- Position the namelist-file at the beginning (it was already opened in
207!-- parin), search for the namelist-group of the package and position the
208!-- file at this line. Do the same for each optionally used package.
209    line = ' '
210
211
212#if defined( __dvrp_graphics )
213    REWIND ( 11 )
214    line = ' '
215    DO   WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 )
216       READ ( 11, '(A)', END=20 )  line
217    ENDDO
218    BACKSPACE ( 11 )
219
220!
221!-- Read user-defined namelist
222    READ ( 11, dvrp_graphics_par )
223
224 20 CONTINUE
225#endif
226
227!
228!-- Try to find particles package
229    REWIND ( 11 )
230    line = ' '
231    DO   WHILE ( INDEX( line, '&particles_par' ) == 0 )
232       READ ( 11, '(A)', END=30 )  line
233    ENDDO
234    BACKSPACE ( 11 )
235
236!
237!-- Read user-defined namelist
238    READ ( 11, particles_par )
239
240!
241!-- Set flag that indicates that particles are switched on
242    particle_advection = .TRUE.
243
244 30 CONTINUE
245
246    REWIND ( 11 )
247    line = ' '
248    DO   WHILE ( INDEX( line, '&spectra_par' ) == 0 )
249       READ ( 11, '(A)', END=40 )  line
250    ENDDO
251    BACKSPACE ( 11 )
252
253!
254!-- Read user-defined namelist
255    READ ( 11, spectra_par )
256
257!
258!-- Default setting of dt_dosp here (instead of check_parameters), because its
259!-- current value is needed in init_pegrid
260    IF ( dt_dosp == 9999999.9_wp )  dt_dosp = dt_data_output
261
262 40 CONTINUE
263
264
265
266
267 END SUBROUTINE package_parin
Note: See TracBrowser for help on using the repository browser.