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

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

some changes in land surface model, radiation model, nudging and some minor updates

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