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