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

Last change on this file since 1822 was 1822, checked in by hoffmann, 8 years ago

changes in LPM and bulk cloud microphysics

  • Property svn:keywords set to Id
File size: 13.4 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! +collision_algorithm
22!
23! Tails removed.
24!
25! Former revisions:
26! -----------------
27! $Id: package_parin.f90 1822 2016-04-07 07:49:42Z hoffmann $
28!
29! 1817 2016-04-06 15:44:20Z maronga
30! Reading of &lsmpar moved to land_surface_model_mod.
31!
32! 1788 2016-03-10 11:01:04Z maronga
33! Parameter dewfall removed.
34!
35! 1786 2016-03-08 05:49:27Z raasch
36! cpp-direktives for spectra removed
37!
38! 1757 2016-02-22 15:49:32Z maronga
39! Added parameter unscheduled_radiation_calls
40!
41! 1691 2015-10-26 16:17:44Z maronga
42! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity
43!
44! 1682 2015-10-07 23:56:08Z knoop
45! Code annotations made doxygen readable
46!
47! 1585 2015-04-30 07:05:52Z maronga
48! Added several radiation_par parameters
49!
50! 1575 2015-03-27 09:56:27Z raasch
51! +seed_follows_topography in particles_par
52!
53! 1553 2015-03-03 17:33:54Z maronga
54! Resorting of lsm_par
55!
56! 1551 2015-03-03 14:18:16Z maronga
57! Several changes in the liste for land surface model and radiation model
58!
59! 1496 2014-12-02 17:25:50Z maronga
60! Added support for the land surface model and radiation scheme
61!
62! 1484 2014-10-21 10:53:05Z kanani
63! Changes due to new module structure of the plant canopy model:
64!   module plant_canopy_model_mod added,
65!   new package/namelist canopy_par added, i.e. the canopy model is no longer
66!   steered over the inipar-namelist,
67!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
68!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff.
69! Changed statement tags in CONTINUE-statement
70!
71! 1367 2014-04-23 15:18:30Z witha
72! Bugfix: module kinds must be used
73!
74! 1359 2014-04-11 17:15:14Z hoffmann
75! +alloc_factor, + min_nr_particle
76! -dt_sort_particles, -maximum_number_of_particles
77!
78! 1340 2014-03-25 19:45:13Z kanani
79! REAL constants defined as wp-kinds
80!
81! 1324 2014-03-21 09:13:16Z suehring
82! Bugfix: Missing variable dt_data_output output added to ONLY statement
83!
84! 1320 2014-03-20 08:40:49Z raasch
85! ONLY-attribute added to USE-statements,
86! kind-parameters added to all INTEGER and REAL declaration statements,
87! kinds are defined in new module kinds,
88! old module precision_kind is removed,
89! revision history before 2012 removed,
90! comment fields (!:) to be used for variable explanations added to
91! all variable declaration statements
92!
93! 1036 2012-10-22 13:43:42Z raasch
94! code put under GPL (PALM 3.9)
95!
96! 828 2012-02-21 12:00:36Z raasch
97! +dissipation_classes, radius_classes in parpar
98!
99! 825 2012-02-19 03:03:44Z raasch
100! wang_collision_kernel and turbulence_effects_on_collision in particles_par
101! replaced by collision_kernel
102!
103! Revision 1.1  2000/12/28 13:21:57  raasch
104! Initial revision
105!
106!
107! Description:
108! ------------
109!> This subroutine reads from the NAMELIST file variables controling model
110!> software packages which are used optionally in the run.
111!>
112!> @todo Perform all actions in the respective submodules and remove
113!>       package_parin
114!------------------------------------------------------------------------------!
115 SUBROUTINE package_parin
116 
117
118    USE control_parameters,                                                    &
119        ONLY:  averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp,       &
120               dt_dvrp, particle_maximum_age, skip_time_dosp,                  &
121               threshold
122
123    USE dvrp_variables,                                                        &
124        ONLY:  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s,             &
125               cluster_size, color_interval, dvrpsize_interval,                &
126               dvrp_directory, dvrp_file, dvrp_host, dvrp_output,              &
127               dvrp_password, dvrp_username, groundplate_color,                &
128               isosurface_color, mode_dvrp, particle_color,                    &
129               particle_dvrpsize, pathlines_fadeintime,                        &
130               pathlines_fadeouttime, pathlines_linecount,                     &
131               pathlines_maxhistory, pathlines_wavecount,                      &
132               pathlines_wavetime, slicer_range_limits_dvrp, superelevation,   &
133               superelevation_x, superelevation_y, topography_color,           &
134               vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y,   &
135               vc_size_z
136
137    USE kinds
138
139    USE particle_attributes,                                                   &
140        ONLY:  alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,         &
141               collision_algorithm, collision_kernel, density_ratio,           &
142               dissipation_classes, dt_min_part, dt_prel,                      &
143               dt_write_particle_data,                                         &
144               end_time_prel, initial_weighting_factor,                        &
145               min_nr_particle, number_of_particle_groups, particles_per_point,&
146               particle_advection, particle_advection_start, pdx, pdy, pdz,    &
147               psb, psl, psn, psr, pss, pst, radius, radius_classes,           &
148               random_start_position, read_particles_from_restartfile,         &
149               seed_follows_topography, use_sgs_for_particles,                 &
150               vertical_particle_advection, write_particle_statistics
151
152    USE plant_canopy_model_mod,                                                &
153        ONLY:  alpha_lad, beta_lad, calc_beta_lad_profile, canopy_drag_coeff,  &
154               canopy_mode, cthf, lad_surface,                                 &
155               lad_vertical_gradient, lad_vertical_gradient_level, lai_beta,   &
156               leaf_scalar_exch_coeff, leaf_surface_conc, pch_index,           &
157               plant_canopy
158
159    USE radiation_model_mod,                                                   &
160        ONLY: albedo, albedo_type, albedo_lw_dif, albedo_lw_dir, albedo_sw_dif,&
161              albedo_sw_dir, constant_albedo, day_init, dt_radiation,          &
162              emissivity, lambda, lw_radiation, net_radiation, radiation,      &
163              radiation_scheme, skip_time_do_radiation, sw_radiation,          &
164              time_utc_init, unscheduled_radiation_calls
165               
166
167    USE spectrum,                                                              &
168        ONLY:  comp_spectra_level, data_output_sp, plot_spectra_level,         &
169               spectra_direction
170
171    IMPLICIT NONE
172
173    CHARACTER (LEN=80) ::  line  !<
174
175    NAMELIST /canopy_par/         alpha_lad, beta_lad, canopy_drag_coeff,      &
176                                  canopy_mode, cthf,                           &
177                                  lad_surface,                                 & 
178                                  lad_vertical_gradient,                       &
179                                  lad_vertical_gradient_level,                 &
180                                  lai_beta,                                    &
181                                  leaf_scalar_exch_coeff,                      &
182                                  leaf_surface_conc, pch_index
183
184    NAMELIST /dvrp_graphics_par/  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r,       &
185                                  clip_dvrp_s, cluster_size, color_interval,   &
186                                  dt_dvrp, dvrpsize_interval, dvrp_directory,  &
187                                  dvrp_file, dvrp_host, dvrp_output,           &
188                                  dvrp_password, dvrp_username,                &
189                                  groundplate_color, isosurface_color,         &
190                                  mode_dvrp, particle_color, particle_dvrpsize,&
191                                  pathlines_fadeintime, pathlines_fadeouttime, &
192                                  pathlines_linecount, pathlines_maxhistory,   &
193                                  pathlines_wavecount, pathlines_wavetime,     &
194                                  slicer_range_limits_dvrp, superelevation,    &
195                                  superelevation_x, superelevation_y,          &
196                                  threshold, topography_color, vc_alpha,       &
197                                  vc_gradient_normals, vc_mode, vc_size_x,     &
198                                  vc_size_y, vc_size_z
199
200    NAMELIST /particles_par/      alloc_factor, bc_par_b, bc_par_lr,           &
201                                  bc_par_ns, bc_par_t, collision_algorithm,    &
202                                  collision_kernel,                            &
203                                  density_ratio, dissipation_classes, dt_dopts,&
204                                  dt_min_part, dt_prel,                        &
205                                  dt_write_particle_data,                      &
206                                  end_time_prel, initial_weighting_factor,     &
207                                  min_nr_particle,                             &
208                                  number_of_particle_groups,                   &
209                                  particles_per_point,                         &
210                                  particle_advection_start,                    &
211                                  particle_maximum_age, pdx, pdy, pdz, psb,    &
212                                  psl, psn, psr, pss, pst, radius,             &
213                                  radius_classes, random_start_position,       &
214                                  read_particles_from_restartfile,             &
215                                  seed_follows_topography,                     &
216                                  use_sgs_for_particles,                       &
217                                  vertical_particle_advection,                 &
218                                  write_particle_statistics
219
220    NAMELIST /radiation_par/      albedo, albedo_type, albedo_lw_dir,          &
221                                  albedo_lw_dif, albedo_sw_dir, albedo_sw_dif, &
222                                  constant_albedo, day_init, dt_radiation,     &
223                                  lambda, lw_radiation, net_radiation,         &
224                                  radiation_scheme, skip_time_do_radiation,    &
225                                  sw_radiation, time_utc_init,                 &
226                                  unscheduled_radiation_calls
227
228    NAMELIST /spectra_par/        averaging_interval_sp, comp_spectra_level,   &
229                                  data_output_sp, dt_dosp, plot_spectra_level, &
230                                  skip_time_dosp, spectra_direction
231
232!
233!-- Position the namelist-file at the beginning (it was already opened in
234!-- parin), search for the namelist-group of the package and position the
235!-- file at this line. Do the same for each optionally used package.
236    line = ' '
237
238!
239!-- Try to find canopy package
240    REWIND ( 11 )
241    line = ' '
242    DO   WHILE ( INDEX( line, '&canopy_par' ) == 0 )
243       READ ( 11, '(A)', END=10 )  line
244    ENDDO
245    BACKSPACE ( 11 )
246
247!
248!-- Read user-defined namelist
249    READ ( 11, canopy_par )
250
251!
252!-- Set flag that indicates that canopy model is switched on
253    plant_canopy = .TRUE.
254
255!
256!-- Set flag that indicates that the lad-profile shall be calculated by using
257!-- a beta probability density function
258    IF ( alpha_lad /= 9999999.9_wp  .AND.  beta_lad /= 9999999.9_wp )          &
259       calc_beta_lad_profile = .TRUE.
260
261 10 CONTINUE
262
263
264#if defined( __dvrp_graphics )
265    REWIND ( 11 )
266    line = ' '
267    DO   WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 )
268       READ ( 11, '(A)', END=20 )  line
269    ENDDO
270    BACKSPACE ( 11 )
271
272!
273!-- Read user-defined namelist
274    READ ( 11, dvrp_graphics_par )
275
276 20 CONTINUE
277#endif
278
279!
280!-- Try to find particles package
281    REWIND ( 11 )
282    line = ' '
283    DO   WHILE ( INDEX( line, '&particles_par' ) == 0 )
284       READ ( 11, '(A)', END=30 )  line
285    ENDDO
286    BACKSPACE ( 11 )
287
288!
289!-- Read user-defined namelist
290    READ ( 11, particles_par )
291
292!
293!-- Set flag that indicates that particles are switched on
294    particle_advection = .TRUE.
295
296 30 CONTINUE
297
298    REWIND ( 11 )
299    line = ' '
300    DO   WHILE ( INDEX( line, '&spectra_par' ) == 0 )
301       READ ( 11, '(A)', END=40 )  line
302    ENDDO
303    BACKSPACE ( 11 )
304
305!
306!-- Read user-defined namelist
307    READ ( 11, spectra_par )
308
309!
310!-- Default setting of dt_dosp here (instead of check_parameters), because its
311!-- current value is needed in init_pegrid
312    IF ( dt_dosp == 9999999.9_wp )  dt_dosp = dt_data_output
313
314 40 CONTINUE
315
316
317!
318!-- Try to find radiation package
319    REWIND ( 11 )
320    line = ' '
321    DO   WHILE ( INDEX( line, '&radiation_par' ) == 0 )
322       READ ( 11, '(A)', END=51 )  line
323    ENDDO
324    BACKSPACE ( 11 )
325
326!
327!-- Read user-defined namelist
328    READ ( 11, radiation_par )
329
330!
331!-- Set flag that indicates that the radiation scheme is switched on
332    radiation = .TRUE.
333
334 51 CONTINUE
335
336
337 END SUBROUTINE package_parin
Note: See TracBrowser for help on using the repository browser.