[1682] | 1 | !> @file package_parin.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[2000] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
[1036] | 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 | ! |
---|
[2718] | 17 | ! Copyright 1997-2018 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[2375] | 22 | ! |
---|
[3049] | 23 | ! |
---|
[1485] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: package_parin.f90 3241 2018-09-12 15:02:00Z raasch $ |
---|
[3241] | 27 | ! unused variables removed |
---|
| 28 | ! |
---|
| 29 | ! 3049 2018-05-29 13:52:36Z Giersch |
---|
[3049] | 30 | ! Error messages revised |
---|
| 31 | ! |
---|
| 32 | ! 2932 2018-03-26 09:39:22Z Giersch |
---|
[2932] | 33 | ! renamed particles_par to particle_parameters |
---|
| 34 | ! |
---|
| 35 | ! 2718 2018-01-02 08:49:38Z maronga |
---|
[2716] | 36 | ! Corrected "Former revisions" section |
---|
| 37 | ! |
---|
| 38 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
| 39 | ! Change in file header (GPL part) |
---|
| 40 | ! |
---|
| 41 | ! 2375 2017-08-29 14:10:28Z schwenkel |
---|
[2375] | 42 | ! Added aerosol_species |
---|
| 43 | ! |
---|
| 44 | ! 2312 2017-07-14 20:26:51Z hoffmann |
---|
[2312] | 45 | ! Aerosol initialization improved. |
---|
| 46 | ! |
---|
| 47 | ! 2263 2017-06-08 14:59:01Z schwenkel |
---|
[2263] | 48 | ! Implemented splitting and merging algorithm |
---|
[2312] | 49 | ! |
---|
[2263] | 50 | ! 2183 2017-03-17 14:29:15Z schwenkel |
---|
[1485] | 51 | ! |
---|
[2183] | 52 | ! 2182 2017-03-17 14:27:40Z schwenkel |
---|
| 53 | ! Added parameters for simplified particle initialization. |
---|
[2312] | 54 | ! |
---|
[2001] | 55 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
| 56 | ! Forced header and separation lines into 80 columns |
---|
[2312] | 57 | ! |
---|
[1937] | 58 | ! 1936 2016-06-13 13:37:44Z suehring |
---|
| 59 | ! +deallocate_memory, step_dealloc |
---|
[2312] | 60 | ! |
---|
[1872] | 61 | ! 1871 2016-04-15 11:46:09Z hoffmann |
---|
| 62 | ! Initialization of aerosols added. |
---|
[2312] | 63 | ! |
---|
[1834] | 64 | ! 1833 2016-04-07 14:23:03Z raasch |
---|
| 65 | ! reading of spectra_par moved to spectra_mod |
---|
[2312] | 66 | ! |
---|
[1832] | 67 | ! 1831 2016-04-07 13:15:51Z hoffmann |
---|
| 68 | ! curvature_solution_effects added |
---|
| 69 | ! |
---|
[1827] | 70 | ! 1826 2016-04-07 12:01:39Z maronga |
---|
| 71 | ! Reading of &radiation_par moved to radiation_model_mod. |
---|
| 72 | ! Reading of &canopy_par moved to plant_canopy_model_mod. |
---|
[2312] | 73 | ! |
---|
[1823] | 74 | ! 822 2016-04-07 07:49:42Z hoffmann |
---|
| 75 | ! +collision_algorithm |
---|
| 76 | ! Tails removed. |
---|
| 77 | ! |
---|
[1818] | 78 | ! 1817 2016-04-06 15:44:20Z maronga |
---|
[1826] | 79 | ! Reading of &lsm_par moved to land_surface_model_mod. |
---|
[2312] | 80 | ! |
---|
[1789] | 81 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
| 82 | ! Parameter dewfall removed. |
---|
| 83 | ! |
---|
[1787] | 84 | ! 1786 2016-03-08 05:49:27Z raasch |
---|
| 85 | ! cpp-direktives for spectra removed |
---|
| 86 | ! |
---|
[1758] | 87 | ! 1757 2016-02-22 15:49:32Z maronga |
---|
| 88 | ! Added parameter unscheduled_radiation_calls |
---|
[2312] | 89 | ! |
---|
[1692] | 90 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
| 91 | ! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity |
---|
[2312] | 92 | ! |
---|
[1683] | 93 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
[2312] | 94 | ! Code annotations made doxygen readable |
---|
| 95 | ! |
---|
[1586] | 96 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 97 | ! Added several radiation_par parameters |
---|
| 98 | ! |
---|
[1576] | 99 | ! 1575 2015-03-27 09:56:27Z raasch |
---|
| 100 | ! +seed_follows_topography in particles_par |
---|
| 101 | ! |
---|
[1554] | 102 | ! 1553 2015-03-03 17:33:54Z maronga |
---|
| 103 | ! Resorting of lsm_par |
---|
[2312] | 104 | ! |
---|
[1552] | 105 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 106 | ! Several changes in the liste for land surface model and radiation model |
---|
[2312] | 107 | ! |
---|
[1497] | 108 | ! 1496 2014-12-02 17:25:50Z maronga |
---|
| 109 | ! Added support for the land surface model and radiation scheme |
---|
[2312] | 110 | ! |
---|
[1485] | 111 | ! 1484 2014-10-21 10:53:05Z kanani |
---|
[1484] | 112 | ! Changes due to new module structure of the plant canopy model: |
---|
| 113 | ! module plant_canopy_model_mod added, |
---|
[2312] | 114 | ! new package/namelist canopy_par added, i.e. the canopy model is no longer |
---|
[1484] | 115 | ! steered over the inipar-namelist, |
---|
| 116 | ! drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient |
---|
| 117 | ! renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff. |
---|
| 118 | ! Changed statement tags in CONTINUE-statement |
---|
[2312] | 119 | ! |
---|
[1368] | 120 | ! 1367 2014-04-23 15:18:30Z witha |
---|
| 121 | ! Bugfix: module kinds must be used |
---|
| 122 | ! |
---|
[1360] | 123 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 124 | ! +alloc_factor, + min_nr_particle |
---|
| 125 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
[2312] | 126 | ! |
---|
[1341] | 127 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
| 128 | ! REAL constants defined as wp-kinds |
---|
| 129 | ! |
---|
[1325] | 130 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
| 131 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
| 132 | ! |
---|
[1321] | 133 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 134 | ! ONLY-attribute added to USE-statements, |
---|
| 135 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 136 | ! kinds are defined in new module kinds, |
---|
| 137 | ! old module precision_kind is removed, |
---|
| 138 | ! revision history before 2012 removed, |
---|
| 139 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 140 | ! all variable declaration statements |
---|
[392] | 141 | ! |
---|
[1037] | 142 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 143 | ! code put under GPL (PALM 3.9) |
---|
| 144 | ! |
---|
[829] | 145 | ! 828 2012-02-21 12:00:36Z raasch |
---|
| 146 | ! +dissipation_classes, radius_classes in parpar |
---|
| 147 | ! |
---|
[826] | 148 | ! 825 2012-02-19 03:03:44Z raasch |
---|
| 149 | ! wang_collision_kernel and turbulence_effects_on_collision in particles_par |
---|
| 150 | ! replaced by collision_kernel |
---|
| 151 | ! |
---|
[1] | 152 | ! Revision 1.1 2000/12/28 13:21:57 raasch |
---|
| 153 | ! Initial revision |
---|
| 154 | ! |
---|
| 155 | ! |
---|
| 156 | ! Description: |
---|
| 157 | ! ------------ |
---|
[1682] | 158 | !> This subroutine reads from the NAMELIST file variables controling model |
---|
| 159 | !> software packages which are used optionally in the run. |
---|
[1691] | 160 | !> |
---|
[2312] | 161 | !> @todo Perform all actions in the respective submodules and remove |
---|
[1691] | 162 | !> package_parin |
---|
[1] | 163 | !------------------------------------------------------------------------------! |
---|
[1682] | 164 | SUBROUTINE package_parin |
---|
[1] | 165 | |
---|
[2312] | 166 | |
---|
[1320] | 167 | USE control_parameters, & |
---|
[3241] | 168 | ONLY: dt_dopts, dt_dvrp, message_string, particle_maximum_age, & |
---|
| 169 | threshold |
---|
[1] | 170 | |
---|
[1320] | 171 | USE dvrp_variables, & |
---|
| 172 | ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & |
---|
| 173 | cluster_size, color_interval, dvrpsize_interval, & |
---|
| 174 | dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & |
---|
| 175 | dvrp_password, dvrp_username, groundplate_color, & |
---|
| 176 | isosurface_color, mode_dvrp, particle_color, & |
---|
| 177 | particle_dvrpsize, pathlines_fadeintime, & |
---|
| 178 | pathlines_fadeouttime, pathlines_linecount, & |
---|
| 179 | pathlines_maxhistory, pathlines_wavecount, & |
---|
| 180 | pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & |
---|
| 181 | superelevation_x, superelevation_y, topography_color, & |
---|
| 182 | vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & |
---|
| 183 | vc_size_z |
---|
| 184 | |
---|
[1367] | 185 | USE kinds |
---|
| 186 | |
---|
[1320] | 187 | USE particle_attributes, & |
---|
[2375] | 188 | ONLY: aero_species, aero_type, aero_weight, alloc_factor, bc_par_b, & |
---|
| 189 | bc_par_lr, bc_par_ns, bc_par_t, collision_kernel, & |
---|
[1936] | 190 | curvature_solution_effects, deallocate_memory, density_ratio, & |
---|
| 191 | dissipation_classes, dt_min_part, dt_prel, & |
---|
| 192 | dt_write_particle_data, end_time_prel, initial_weighting_factor,& |
---|
[2312] | 193 | log_sigma, max_number_particles_per_gridbox, & |
---|
| 194 | merging, min_nr_particle, na, & |
---|
[2263] | 195 | number_concentration, number_of_particle_groups, & |
---|
| 196 | number_particles_per_gridbox, particles_per_point, & |
---|
| 197 | particle_advection, particle_advection_start, pdx, pdy, pdz, & |
---|
| 198 | psb, psl, psn, psr, pss, pst, radius, radius_classes, & |
---|
| 199 | radius_merge, radius_split, random_start_position, & |
---|
[2312] | 200 | read_particles_from_restartfile, rm, & |
---|
| 201 | seed_follows_topography, splitting, splitting_factor, & |
---|
[2263] | 202 | splitting_factor_max, splitting_function, splitting_mode, & |
---|
[2312] | 203 | step_dealloc, use_sgs_for_particles, & |
---|
[2263] | 204 | vertical_particle_advection, weight_factor_merge, & |
---|
[2312] | 205 | weight_factor_split, write_particle_statistics |
---|
[1320] | 206 | |
---|
[1] | 207 | IMPLICIT NONE |
---|
| 208 | |
---|
[1682] | 209 | CHARACTER (LEN=80) :: line !< |
---|
[1] | 210 | |
---|
[1484] | 211 | |
---|
[1826] | 212 | |
---|
[242] | 213 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
[264] | 214 | clip_dvrp_s, cluster_size, color_interval, & |
---|
| 215 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
| 216 | dvrp_file, dvrp_host, dvrp_output, & |
---|
[1822] | 217 | dvrp_password, dvrp_username, & |
---|
[284] | 218 | groundplate_color, isosurface_color, & |
---|
| 219 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
[264] | 220 | pathlines_fadeintime, pathlines_fadeouttime, & |
---|
| 221 | pathlines_linecount, pathlines_maxhistory, & |
---|
| 222 | pathlines_wavecount, pathlines_wavetime, & |
---|
| 223 | slicer_range_limits_dvrp, superelevation, & |
---|
| 224 | superelevation_x, superelevation_y, & |
---|
[284] | 225 | threshold, topography_color, vc_alpha, & |
---|
| 226 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
| 227 | vc_size_y, vc_size_z |
---|
[264] | 228 | |
---|
[2375] | 229 | NAMELIST /particles_par/ aero_species, aero_type, aero_weight, & |
---|
| 230 | alloc_factor, bc_par_b, bc_par_lr, & |
---|
[2312] | 231 | bc_par_ns, bc_par_t, & |
---|
[1831] | 232 | collision_kernel, curvature_solution_effects,& |
---|
[1936] | 233 | deallocate_memory, density_ratio, & |
---|
| 234 | dissipation_classes, dt_dopts, & |
---|
[1359] | 235 | dt_min_part, dt_prel, & |
---|
[336] | 236 | dt_write_particle_data, & |
---|
[1] | 237 | end_time_prel, initial_weighting_factor, & |
---|
[2312] | 238 | log_sigma, & |
---|
[2263] | 239 | max_number_particles_per_gridbox, merging, & |
---|
[2312] | 240 | min_nr_particle, & |
---|
| 241 | na, number_concentration, & |
---|
[2182] | 242 | number_of_particle_groups, & |
---|
| 243 | number_particles_per_gridbox, & |
---|
[1] | 244 | particles_per_point, & |
---|
| 245 | particle_advection_start, & |
---|
| 246 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
[828] | 247 | psl, psn, psr, pss, pst, radius, & |
---|
[2312] | 248 | radius_classes, radius_merge, radius_split, & |
---|
[2263] | 249 | random_start_position, & |
---|
[2312] | 250 | read_particles_from_restartfile, rm, & |
---|
[2263] | 251 | seed_follows_topography, & |
---|
| 252 | splitting, splitting_factor, & |
---|
| 253 | splitting_factor_max, splitting_function, & |
---|
[2312] | 254 | splitting_mode, step_dealloc, & |
---|
[2263] | 255 | use_sgs_for_particles, & |
---|
[1] | 256 | vertical_particle_advection, & |
---|
[2263] | 257 | weight_factor_merge, weight_factor_split, & |
---|
[1] | 258 | write_particle_statistics |
---|
[1320] | 259 | |
---|
[2932] | 260 | |
---|
| 261 | NAMELIST /particle_parameters/ & |
---|
| 262 | aero_species, aero_type, aero_weight, & |
---|
| 263 | alloc_factor, bc_par_b, bc_par_lr, & |
---|
| 264 | bc_par_ns, bc_par_t, & |
---|
| 265 | collision_kernel, curvature_solution_effects,& |
---|
| 266 | deallocate_memory, density_ratio, & |
---|
| 267 | dissipation_classes, dt_dopts, & |
---|
| 268 | dt_min_part, dt_prel, & |
---|
| 269 | dt_write_particle_data, & |
---|
| 270 | end_time_prel, initial_weighting_factor, & |
---|
| 271 | log_sigma, & |
---|
| 272 | max_number_particles_per_gridbox, merging, & |
---|
| 273 | min_nr_particle, & |
---|
| 274 | na, number_concentration, & |
---|
| 275 | number_of_particle_groups, & |
---|
| 276 | number_particles_per_gridbox, & |
---|
| 277 | particles_per_point, & |
---|
| 278 | particle_advection_start, & |
---|
| 279 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
| 280 | psl, psn, psr, pss, pst, radius, & |
---|
| 281 | radius_classes, radius_merge, radius_split, & |
---|
| 282 | random_start_position, & |
---|
| 283 | read_particles_from_restartfile, rm, & |
---|
| 284 | seed_follows_topography, & |
---|
| 285 | splitting, splitting_factor, & |
---|
| 286 | splitting_factor_max, splitting_function, & |
---|
| 287 | splitting_mode, step_dealloc, & |
---|
| 288 | use_sgs_for_particles, & |
---|
| 289 | vertical_particle_advection, & |
---|
| 290 | weight_factor_merge, weight_factor_split, & |
---|
| 291 | write_particle_statistics |
---|
[1] | 292 | ! |
---|
| 293 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
| 294 | !-- parin), search for the namelist-group of the package and position the |
---|
| 295 | !-- file at this line. Do the same for each optionally used package. |
---|
[1320] | 296 | line = ' ' |
---|
[1] | 297 | |
---|
[1484] | 298 | |
---|
[1] | 299 | #if defined( __dvrp_graphics ) |
---|
| 300 | REWIND ( 11 ) |
---|
[1320] | 301 | line = ' ' |
---|
| 302 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
[1484] | 303 | READ ( 11, '(A)', END=20 ) line |
---|
[1] | 304 | ENDDO |
---|
| 305 | BACKSPACE ( 11 ) |
---|
| 306 | |
---|
| 307 | ! |
---|
| 308 | !-- Read user-defined namelist |
---|
| 309 | READ ( 11, dvrp_graphics_par ) |
---|
| 310 | |
---|
[1484] | 311 | 20 CONTINUE |
---|
[1] | 312 | #endif |
---|
| 313 | |
---|
[60] | 314 | ! |
---|
| 315 | !-- Try to find particles package |
---|
[1] | 316 | REWIND ( 11 ) |
---|
[1320] | 317 | line = ' ' |
---|
[2932] | 318 | DO WHILE ( INDEX( line, '&particle_parameters' ) == 0 ) |
---|
[1484] | 319 | READ ( 11, '(A)', END=30 ) line |
---|
[1] | 320 | ENDDO |
---|
| 321 | BACKSPACE ( 11 ) |
---|
| 322 | |
---|
| 323 | ! |
---|
| 324 | !-- Read user-defined namelist |
---|
[2932] | 325 | READ ( 11, particle_parameters ) |
---|
| 326 | |
---|
| 327 | ! |
---|
| 328 | !-- Set flag that indicates that particles are switched on |
---|
| 329 | particle_advection = .TRUE. |
---|
| 330 | |
---|
| 331 | GOTO 31 |
---|
| 332 | |
---|
| 333 | ! |
---|
| 334 | !-- Try to find particles package (old namelist) |
---|
| 335 | 30 REWIND ( 11 ) |
---|
| 336 | line = ' ' |
---|
| 337 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
| 338 | READ ( 11, '(A)', END=31 ) line |
---|
| 339 | ENDDO |
---|
| 340 | BACKSPACE ( 11 ) |
---|
| 341 | |
---|
| 342 | ! |
---|
| 343 | !-- Read user-defined namelist |
---|
[1] | 344 | READ ( 11, particles_par ) |
---|
[2932] | 345 | |
---|
| 346 | |
---|
| 347 | message_string = 'namelist particles_par is deprecated and will be ' // & |
---|
[3046] | 348 | 'removed in near future. Please use namelist ' // & |
---|
[2932] | 349 | 'particle_parameters instead' |
---|
| 350 | CALL message( 'package_parin', 'PA0487', 0, 1, 0, 6, 0 ) |
---|
[1] | 351 | |
---|
| 352 | ! |
---|
| 353 | !-- Set flag that indicates that particles are switched on |
---|
| 354 | particle_advection = .TRUE. |
---|
| 355 | |
---|
[2932] | 356 | 31 CONTINUE |
---|
[1] | 357 | |
---|
| 358 | END SUBROUTINE package_parin |
---|