[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 | ! ----------------- |
---|
[1575] | 22 | ! +seed_follows_topography in particles_par |
---|
[1485] | 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: package_parin.f90 1575 2015-03-27 09:56:27Z raasch $ |
---|
| 27 | ! |
---|
[1554] | 28 | ! 1553 2015-03-03 17:33:54Z maronga |
---|
| 29 | ! Resorting of lsm_par |
---|
| 30 | ! |
---|
[1552] | 31 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 32 | ! Several changes in the liste for land surface model and radiation model |
---|
| 33 | ! |
---|
[1497] | 34 | ! 1496 2014-12-02 17:25:50Z maronga |
---|
| 35 | ! Added support for the land surface model and radiation scheme |
---|
| 36 | ! |
---|
[1485] | 37 | ! 1484 2014-10-21 10:53:05Z kanani |
---|
[1484] | 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 |
---|
[1341] | 45 | ! |
---|
[1368] | 46 | ! 1367 2014-04-23 15:18:30Z witha |
---|
| 47 | ! Bugfix: module kinds must be used |
---|
| 48 | ! |
---|
[1360] | 49 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 50 | ! +alloc_factor, + min_nr_particle |
---|
| 51 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
| 52 | ! |
---|
[1341] | 53 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
| 54 | ! REAL constants defined as wp-kinds |
---|
| 55 | ! |
---|
[1325] | 56 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
| 57 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
| 58 | ! |
---|
[1321] | 59 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 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 |
---|
[392] | 67 | ! |
---|
[1037] | 68 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 69 | ! code put under GPL (PALM 3.9) |
---|
| 70 | ! |
---|
[829] | 71 | ! 828 2012-02-21 12:00:36Z raasch |
---|
| 72 | ! +dissipation_classes, radius_classes in parpar |
---|
| 73 | ! |
---|
[826] | 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 | ! |
---|
[1] | 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 | |
---|
[1320] | 88 | USE control_parameters, & |
---|
[1324] | 89 | ONLY: averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp, & |
---|
[1496] | 90 | dt_dvrp, particle_maximum_age, skip_time_dosp, & |
---|
| 91 | threshold |
---|
[1] | 92 | |
---|
[1320] | 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 | |
---|
[1496] | 107 | USE land_surface_model_mod, & |
---|
[1551] | 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 |
---|
[1496] | 117 | |
---|
[1367] | 118 | USE kinds |
---|
| 119 | |
---|
[1320] | 120 | USE particle_attributes, & |
---|
[1359] | 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, & |
---|
[1320] | 124 | end_time_prel, initial_weighting_factor, & |
---|
[1359] | 125 | maximum_number_of_tailpoints, & |
---|
[1320] | 126 | maximum_tailpoint_age, minimum_tailpoint_distance, & |
---|
[1359] | 127 | min_nr_particle, number_of_particle_groups, particles_per_point,& |
---|
[1320] | 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, & |
---|
[1575] | 131 | seed_follows_topography, skip_particles_for_tail, & |
---|
| 132 | use_particle_tails, use_sgs_for_particles, & |
---|
| 133 | vertical_particle_advection, write_particle_statistics |
---|
[1320] | 134 | |
---|
[1484] | 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 | |
---|
[1496] | 142 | USE radiation_model_mod, & |
---|
[1551] | 143 | ONLY: albedo, day_init, dt_radiation, lambda, net_radiation, radiation,& |
---|
| 144 | radiation_scheme, time_radiation, time_utc_init |
---|
[1496] | 145 | |
---|
| 146 | |
---|
[1320] | 147 | USE spectrum, & |
---|
| 148 | ONLY: comp_spectra_level, data_output_sp, plot_spectra_level, & |
---|
| 149 | spectra_direction |
---|
| 150 | |
---|
[1] | 151 | IMPLICIT NONE |
---|
| 152 | |
---|
[1320] | 153 | CHARACTER (LEN=80) :: line !: |
---|
[1] | 154 | |
---|
[1484] | 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 | |
---|
[242] | 164 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
[264] | 165 | clip_dvrp_s, cluster_size, color_interval, & |
---|
| 166 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
| 167 | dvrp_file, dvrp_host, dvrp_output, & |
---|
[336] | 168 | dvrp_password, dvrp_psize, dvrp_username, & |
---|
[284] | 169 | groundplate_color, isosurface_color, & |
---|
| 170 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
[264] | 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, & |
---|
[284] | 176 | threshold, topography_color, vc_alpha, & |
---|
| 177 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
| 178 | vc_size_y, vc_size_z |
---|
[264] | 179 | |
---|
[1551] | 180 | NAMELIST /lsm_par/ alpha_vangenuchten, c_surface, & |
---|
[1496] | 181 | canopy_resistance_coefficient, & |
---|
[1551] | 182 | conserve_water_content, dewfall, & |
---|
[1553] | 183 | f_shortwave_incoming, field_capacity, & |
---|
[1551] | 184 | hydraulic_conductivity, & |
---|
| 185 | lambda_surface_stable, & |
---|
| 186 | lambda_surface_unstable, leaf_area_index, & |
---|
| 187 | l_vangenuchten, min_canopy_resistance, & |
---|
[1553] | 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 |
---|
[1496] | 194 | |
---|
| 195 | |
---|
| 196 | |
---|
[1359] | 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, & |
---|
[336] | 201 | dt_write_particle_data, & |
---|
[1] | 202 | end_time_prel, initial_weighting_factor, & |
---|
| 203 | maximum_number_of_tailpoints, & |
---|
| 204 | maximum_tailpoint_age, & |
---|
| 205 | minimum_tailpoint_distance, & |
---|
[1359] | 206 | min_nr_particle, & |
---|
[1] | 207 | number_of_particle_groups, & |
---|
| 208 | particles_per_point, & |
---|
| 209 | particle_advection_start, & |
---|
| 210 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
[828] | 211 | psl, psn, psr, pss, pst, radius, & |
---|
| 212 | radius_classes, random_start_position, & |
---|
[1] | 213 | read_particles_from_restartfile, & |
---|
[1575] | 214 | seed_follows_topography, & |
---|
[790] | 215 | skip_particles_for_tail, & |
---|
| 216 | use_particle_tails, use_sgs_for_particles, & |
---|
[1] | 217 | vertical_particle_advection, & |
---|
| 218 | write_particle_statistics |
---|
[1320] | 219 | |
---|
[1551] | 220 | NAMELIST /radiation_par/ albedo, day_init, dt_radiation, lambda, & |
---|
| 221 | net_radiation, radiation_scheme, time_utc_init |
---|
[1496] | 222 | |
---|
[1] | 223 | NAMELIST /spectra_par/ averaging_interval_sp, comp_spectra_level, & |
---|
| 224 | data_output_sp, dt_dosp, plot_spectra_level, & |
---|
| 225 | skip_time_dosp, spectra_direction |
---|
| 226 | |
---|
| 227 | ! |
---|
| 228 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
| 229 | !-- parin), search for the namelist-group of the package and position the |
---|
| 230 | !-- file at this line. Do the same for each optionally used package. |
---|
[1320] | 231 | line = ' ' |
---|
[1] | 232 | |
---|
[1484] | 233 | ! |
---|
| 234 | !-- Try to find canopy package |
---|
| 235 | REWIND ( 11 ) |
---|
| 236 | line = ' ' |
---|
| 237 | DO WHILE ( INDEX( line, '&canopy_par' ) == 0 ) |
---|
| 238 | READ ( 11, '(A)', END=10 ) line |
---|
| 239 | ENDDO |
---|
| 240 | BACKSPACE ( 11 ) |
---|
| 241 | |
---|
| 242 | ! |
---|
| 243 | !-- Read user-defined namelist |
---|
| 244 | READ ( 11, canopy_par ) |
---|
| 245 | |
---|
| 246 | ! |
---|
| 247 | !-- Set flag that indicates that canopy model is switched on |
---|
| 248 | plant_canopy = .TRUE. |
---|
| 249 | |
---|
| 250 | ! |
---|
| 251 | !-- Set flag that indicates that the lad-profile shall be calculated by using |
---|
| 252 | !-- a beta probability density function |
---|
| 253 | IF ( alpha_lad /= 9999999.9_wp .AND. beta_lad /= 9999999.9_wp ) & |
---|
| 254 | calc_beta_lad_profile = .TRUE. |
---|
| 255 | |
---|
| 256 | 10 CONTINUE |
---|
| 257 | |
---|
| 258 | |
---|
[1] | 259 | #if defined( __dvrp_graphics ) |
---|
| 260 | REWIND ( 11 ) |
---|
[1320] | 261 | line = ' ' |
---|
| 262 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
[1484] | 263 | READ ( 11, '(A)', END=20 ) line |
---|
[1] | 264 | ENDDO |
---|
| 265 | BACKSPACE ( 11 ) |
---|
| 266 | |
---|
| 267 | ! |
---|
| 268 | !-- Read user-defined namelist |
---|
| 269 | READ ( 11, dvrp_graphics_par ) |
---|
| 270 | |
---|
[1484] | 271 | 20 CONTINUE |
---|
[1] | 272 | #endif |
---|
| 273 | |
---|
[60] | 274 | ! |
---|
| 275 | !-- Try to find particles package |
---|
[1] | 276 | REWIND ( 11 ) |
---|
[1320] | 277 | line = ' ' |
---|
| 278 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
[1484] | 279 | READ ( 11, '(A)', END=30 ) line |
---|
[1] | 280 | ENDDO |
---|
| 281 | BACKSPACE ( 11 ) |
---|
| 282 | |
---|
| 283 | ! |
---|
| 284 | !-- Read user-defined namelist |
---|
| 285 | READ ( 11, particles_par ) |
---|
| 286 | |
---|
| 287 | ! |
---|
| 288 | !-- Set flag that indicates that particles are switched on |
---|
| 289 | particle_advection = .TRUE. |
---|
| 290 | |
---|
[1484] | 291 | 30 CONTINUE |
---|
[1] | 292 | |
---|
[60] | 293 | |
---|
[1] | 294 | #if defined( __spectra ) |
---|
| 295 | REWIND ( 11 ) |
---|
[1320] | 296 | line = ' ' |
---|
| 297 | DO WHILE ( INDEX( line, '&spectra_par' ) == 0 ) |
---|
[1484] | 298 | READ ( 11, '(A)', END=40 ) line |
---|
[1] | 299 | ENDDO |
---|
| 300 | BACKSPACE ( 11 ) |
---|
| 301 | |
---|
| 302 | ! |
---|
| 303 | !-- Read user-defined namelist |
---|
| 304 | READ ( 11, spectra_par ) |
---|
| 305 | |
---|
| 306 | ! |
---|
| 307 | !-- Default setting of dt_dosp here (instead of check_parameters), because its |
---|
| 308 | !-- current value is needed in init_pegrid |
---|
[1340] | 309 | IF ( dt_dosp == 9999999.9_wp ) dt_dosp = dt_data_output |
---|
[1] | 310 | |
---|
[1484] | 311 | 40 CONTINUE |
---|
[1] | 312 | #endif |
---|
| 313 | |
---|
[1496] | 314 | ! |
---|
| 315 | !-- Try to find land surface model package |
---|
| 316 | REWIND ( 11 ) |
---|
| 317 | line = ' ' |
---|
| 318 | DO WHILE ( INDEX( line, '&lsm_par' ) == 0 ) |
---|
| 319 | READ ( 11, '(A)', END=50 ) line |
---|
| 320 | ENDDO |
---|
| 321 | BACKSPACE ( 11 ) |
---|
| 322 | |
---|
| 323 | ! |
---|
| 324 | !-- Read user-defined namelist |
---|
| 325 | READ ( 11, lsm_par ) |
---|
| 326 | |
---|
| 327 | ! |
---|
| 328 | !-- Set flag that indicates that the land surface model is switched on |
---|
| 329 | land_surface = .TRUE. |
---|
| 330 | |
---|
| 331 | 50 CONTINUE |
---|
| 332 | |
---|
| 333 | ! |
---|
| 334 | !-- Try to find radiation package |
---|
| 335 | REWIND ( 11 ) |
---|
| 336 | line = ' ' |
---|
| 337 | DO WHILE ( INDEX( line, '&radiation_par' ) == 0 ) |
---|
| 338 | READ ( 11, '(A)', END=51 ) line |
---|
| 339 | ENDDO |
---|
| 340 | BACKSPACE ( 11 ) |
---|
| 341 | |
---|
| 342 | ! |
---|
| 343 | !-- Read user-defined namelist |
---|
| 344 | READ ( 11, radiation_par ) |
---|
| 345 | |
---|
| 346 | ! |
---|
| 347 | !-- Set flag that indicates that the radiation scheme is switched on |
---|
| 348 | radiation = .TRUE. |
---|
| 349 | |
---|
| 350 | 51 CONTINUE |
---|
| 351 | |
---|
| 352 | |
---|
[1] | 353 | END SUBROUTINE package_parin |
---|