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