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

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

last commit documented

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