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