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