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