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