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

Last change on this file since 1682 was 1682, checked in by knoop, 9 years ago

Code annotations made doxygen readable

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