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

Last change on this file since 1551 was 1551, checked in by maronga, 9 years ago

land surface model released

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