[1682] | 1 | !> @file package_parin.f90 |
---|
[1036] | 2 | !--------------------------------------------------------------------------------! |
---|
| 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
| 5 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 6 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
| 7 | ! either version 3 of the License, or (at your option) any later version. |
---|
| 8 | ! |
---|
| 9 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 10 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 11 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 12 | ! |
---|
| 13 | ! You should have received a copy of the GNU General Public License along with |
---|
| 14 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 15 | ! |
---|
[1818] | 16 | ! Copyright 1997-2016 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[1822] | 21 | ! +collision_algorithm |
---|
| 22 | ! |
---|
| 23 | ! Tails removed. |
---|
[1789] | 24 | ! |
---|
[1485] | 25 | ! Former revisions: |
---|
| 26 | ! ----------------- |
---|
| 27 | ! $Id: package_parin.f90 1822 2016-04-07 07:49:42Z hoffmann $ |
---|
| 28 | ! |
---|
[1818] | 29 | ! 1817 2016-04-06 15:44:20Z maronga |
---|
| 30 | ! Reading of &lsmpar moved to land_surface_model_mod. |
---|
| 31 | ! |
---|
[1789] | 32 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
| 33 | ! Parameter dewfall removed. |
---|
| 34 | ! |
---|
[1787] | 35 | ! 1786 2016-03-08 05:49:27Z raasch |
---|
| 36 | ! cpp-direktives for spectra removed |
---|
| 37 | ! |
---|
[1758] | 38 | ! 1757 2016-02-22 15:49:32Z maronga |
---|
| 39 | ! Added parameter unscheduled_radiation_calls |
---|
| 40 | ! |
---|
[1692] | 41 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
| 42 | ! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity |
---|
| 43 | ! |
---|
[1683] | 44 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 45 | ! Code annotations made doxygen readable |
---|
| 46 | ! |
---|
[1586] | 47 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 48 | ! Added several radiation_par parameters |
---|
| 49 | ! |
---|
[1576] | 50 | ! 1575 2015-03-27 09:56:27Z raasch |
---|
| 51 | ! +seed_follows_topography in particles_par |
---|
| 52 | ! |
---|
[1554] | 53 | ! 1553 2015-03-03 17:33:54Z maronga |
---|
| 54 | ! Resorting of lsm_par |
---|
| 55 | ! |
---|
[1552] | 56 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 57 | ! Several changes in the liste for land surface model and radiation model |
---|
| 58 | ! |
---|
[1497] | 59 | ! 1496 2014-12-02 17:25:50Z maronga |
---|
| 60 | ! Added support for the land surface model and radiation scheme |
---|
| 61 | ! |
---|
[1485] | 62 | ! 1484 2014-10-21 10:53:05Z kanani |
---|
[1484] | 63 | ! Changes due to new module structure of the plant canopy model: |
---|
| 64 | ! module plant_canopy_model_mod added, |
---|
| 65 | ! new package/namelist canopy_par added, i.e. the canopy model is no longer |
---|
| 66 | ! steered over the inipar-namelist, |
---|
| 67 | ! drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient |
---|
| 68 | ! renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff. |
---|
| 69 | ! Changed statement tags in CONTINUE-statement |
---|
[1341] | 70 | ! |
---|
[1368] | 71 | ! 1367 2014-04-23 15:18:30Z witha |
---|
| 72 | ! Bugfix: module kinds must be used |
---|
| 73 | ! |
---|
[1360] | 74 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 75 | ! +alloc_factor, + min_nr_particle |
---|
| 76 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
| 77 | ! |
---|
[1341] | 78 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
| 79 | ! REAL constants defined as wp-kinds |
---|
| 80 | ! |
---|
[1325] | 81 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
| 82 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
| 83 | ! |
---|
[1321] | 84 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 85 | ! ONLY-attribute added to USE-statements, |
---|
| 86 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 87 | ! kinds are defined in new module kinds, |
---|
| 88 | ! old module precision_kind is removed, |
---|
| 89 | ! revision history before 2012 removed, |
---|
| 90 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 91 | ! all variable declaration statements |
---|
[392] | 92 | ! |
---|
[1037] | 93 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 94 | ! code put under GPL (PALM 3.9) |
---|
| 95 | ! |
---|
[829] | 96 | ! 828 2012-02-21 12:00:36Z raasch |
---|
| 97 | ! +dissipation_classes, radius_classes in parpar |
---|
| 98 | ! |
---|
[826] | 99 | ! 825 2012-02-19 03:03:44Z raasch |
---|
| 100 | ! wang_collision_kernel and turbulence_effects_on_collision in particles_par |
---|
| 101 | ! replaced by collision_kernel |
---|
| 102 | ! |
---|
[1] | 103 | ! Revision 1.1 2000/12/28 13:21:57 raasch |
---|
| 104 | ! Initial revision |
---|
| 105 | ! |
---|
| 106 | ! |
---|
| 107 | ! Description: |
---|
| 108 | ! ------------ |
---|
[1682] | 109 | !> This subroutine reads from the NAMELIST file variables controling model |
---|
| 110 | !> software packages which are used optionally in the run. |
---|
[1691] | 111 | !> |
---|
| 112 | !> @todo Perform all actions in the respective submodules and remove |
---|
| 113 | !> package_parin |
---|
[1] | 114 | !------------------------------------------------------------------------------! |
---|
[1682] | 115 | SUBROUTINE package_parin |
---|
| 116 | |
---|
[1] | 117 | |
---|
[1320] | 118 | USE control_parameters, & |
---|
[1324] | 119 | ONLY: averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp, & |
---|
[1496] | 120 | dt_dvrp, particle_maximum_age, skip_time_dosp, & |
---|
| 121 | threshold |
---|
[1] | 122 | |
---|
[1320] | 123 | USE dvrp_variables, & |
---|
| 124 | ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & |
---|
| 125 | cluster_size, color_interval, dvrpsize_interval, & |
---|
| 126 | dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & |
---|
| 127 | dvrp_password, dvrp_username, groundplate_color, & |
---|
| 128 | isosurface_color, mode_dvrp, particle_color, & |
---|
| 129 | particle_dvrpsize, pathlines_fadeintime, & |
---|
| 130 | pathlines_fadeouttime, pathlines_linecount, & |
---|
| 131 | pathlines_maxhistory, pathlines_wavecount, & |
---|
| 132 | pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & |
---|
| 133 | superelevation_x, superelevation_y, topography_color, & |
---|
| 134 | vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & |
---|
| 135 | vc_size_z |
---|
| 136 | |
---|
[1367] | 137 | USE kinds |
---|
| 138 | |
---|
[1320] | 139 | USE particle_attributes, & |
---|
[1359] | 140 | ONLY: alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, & |
---|
[1822] | 141 | collision_algorithm, collision_kernel, density_ratio, & |
---|
| 142 | dissipation_classes, dt_min_part, dt_prel, & |
---|
| 143 | dt_write_particle_data, & |
---|
[1320] | 144 | end_time_prel, initial_weighting_factor, & |
---|
[1359] | 145 | min_nr_particle, number_of_particle_groups, particles_per_point,& |
---|
[1320] | 146 | particle_advection, particle_advection_start, pdx, pdy, pdz, & |
---|
| 147 | psb, psl, psn, psr, pss, pst, radius, radius_classes, & |
---|
| 148 | random_start_position, read_particles_from_restartfile, & |
---|
[1822] | 149 | seed_follows_topography, use_sgs_for_particles, & |
---|
[1575] | 150 | vertical_particle_advection, write_particle_statistics |
---|
[1320] | 151 | |
---|
[1484] | 152 | USE plant_canopy_model_mod, & |
---|
| 153 | ONLY: alpha_lad, beta_lad, calc_beta_lad_profile, canopy_drag_coeff, & |
---|
| 154 | canopy_mode, cthf, lad_surface, & |
---|
| 155 | lad_vertical_gradient, lad_vertical_gradient_level, lai_beta, & |
---|
| 156 | leaf_scalar_exch_coeff, leaf_surface_conc, pch_index, & |
---|
| 157 | plant_canopy |
---|
| 158 | |
---|
[1496] | 159 | USE radiation_model_mod, & |
---|
[1585] | 160 | ONLY: albedo, albedo_type, albedo_lw_dif, albedo_lw_dir, albedo_sw_dif,& |
---|
[1691] | 161 | albedo_sw_dir, constant_albedo, day_init, dt_radiation, & |
---|
| 162 | emissivity, lambda, lw_radiation, net_radiation, radiation, & |
---|
| 163 | radiation_scheme, skip_time_do_radiation, sw_radiation, & |
---|
[1757] | 164 | time_utc_init, unscheduled_radiation_calls |
---|
[1496] | 165 | |
---|
| 166 | |
---|
[1320] | 167 | USE spectrum, & |
---|
| 168 | ONLY: comp_spectra_level, data_output_sp, plot_spectra_level, & |
---|
| 169 | spectra_direction |
---|
| 170 | |
---|
[1] | 171 | IMPLICIT NONE |
---|
| 172 | |
---|
[1682] | 173 | CHARACTER (LEN=80) :: line !< |
---|
[1] | 174 | |
---|
[1484] | 175 | NAMELIST /canopy_par/ alpha_lad, beta_lad, canopy_drag_coeff, & |
---|
| 176 | canopy_mode, cthf, & |
---|
| 177 | lad_surface, & |
---|
| 178 | lad_vertical_gradient, & |
---|
| 179 | lad_vertical_gradient_level, & |
---|
| 180 | lai_beta, & |
---|
| 181 | leaf_scalar_exch_coeff, & |
---|
| 182 | leaf_surface_conc, pch_index |
---|
| 183 | |
---|
[242] | 184 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
[264] | 185 | clip_dvrp_s, cluster_size, color_interval, & |
---|
| 186 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
| 187 | dvrp_file, dvrp_host, dvrp_output, & |
---|
[1822] | 188 | dvrp_password, dvrp_username, & |
---|
[284] | 189 | groundplate_color, isosurface_color, & |
---|
| 190 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
[264] | 191 | pathlines_fadeintime, pathlines_fadeouttime, & |
---|
| 192 | pathlines_linecount, pathlines_maxhistory, & |
---|
| 193 | pathlines_wavecount, pathlines_wavetime, & |
---|
| 194 | slicer_range_limits_dvrp, superelevation, & |
---|
| 195 | superelevation_x, superelevation_y, & |
---|
[284] | 196 | threshold, topography_color, vc_alpha, & |
---|
| 197 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
| 198 | vc_size_y, vc_size_z |
---|
[264] | 199 | |
---|
[1359] | 200 | NAMELIST /particles_par/ alloc_factor, bc_par_b, bc_par_lr, & |
---|
[1822] | 201 | bc_par_ns, bc_par_t, collision_algorithm, & |
---|
| 202 | collision_kernel, & |
---|
[1359] | 203 | density_ratio, dissipation_classes, dt_dopts,& |
---|
| 204 | dt_min_part, dt_prel, & |
---|
[336] | 205 | dt_write_particle_data, & |
---|
[1] | 206 | end_time_prel, initial_weighting_factor, & |
---|
[1359] | 207 | min_nr_particle, & |
---|
[1] | 208 | number_of_particle_groups, & |
---|
| 209 | particles_per_point, & |
---|
| 210 | particle_advection_start, & |
---|
| 211 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
[828] | 212 | psl, psn, psr, pss, pst, radius, & |
---|
| 213 | radius_classes, random_start_position, & |
---|
[1] | 214 | read_particles_from_restartfile, & |
---|
[1575] | 215 | seed_follows_topography, & |
---|
[1822] | 216 | use_sgs_for_particles, & |
---|
[1] | 217 | vertical_particle_advection, & |
---|
| 218 | write_particle_statistics |
---|
[1320] | 219 | |
---|
[1585] | 220 | NAMELIST /radiation_par/ albedo, albedo_type, albedo_lw_dir, & |
---|
| 221 | albedo_lw_dif, albedo_sw_dir, albedo_sw_dif, & |
---|
| 222 | constant_albedo, day_init, dt_radiation, & |
---|
| 223 | lambda, lw_radiation, net_radiation, & |
---|
[1691] | 224 | radiation_scheme, skip_time_do_radiation, & |
---|
[1757] | 225 | sw_radiation, time_utc_init, & |
---|
| 226 | unscheduled_radiation_calls |
---|
[1496] | 227 | |
---|
[1] | 228 | NAMELIST /spectra_par/ averaging_interval_sp, comp_spectra_level, & |
---|
| 229 | data_output_sp, dt_dosp, plot_spectra_level, & |
---|
| 230 | skip_time_dosp, spectra_direction |
---|
| 231 | |
---|
| 232 | ! |
---|
| 233 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
| 234 | !-- parin), search for the namelist-group of the package and position the |
---|
| 235 | !-- file at this line. Do the same for each optionally used package. |
---|
[1320] | 236 | line = ' ' |
---|
[1] | 237 | |
---|
[1484] | 238 | ! |
---|
| 239 | !-- Try to find canopy package |
---|
| 240 | REWIND ( 11 ) |
---|
| 241 | line = ' ' |
---|
| 242 | DO WHILE ( INDEX( line, '&canopy_par' ) == 0 ) |
---|
| 243 | READ ( 11, '(A)', END=10 ) line |
---|
| 244 | ENDDO |
---|
| 245 | BACKSPACE ( 11 ) |
---|
| 246 | |
---|
| 247 | ! |
---|
| 248 | !-- Read user-defined namelist |
---|
| 249 | READ ( 11, canopy_par ) |
---|
| 250 | |
---|
| 251 | ! |
---|
| 252 | !-- Set flag that indicates that canopy model is switched on |
---|
| 253 | plant_canopy = .TRUE. |
---|
| 254 | |
---|
| 255 | ! |
---|
| 256 | !-- Set flag that indicates that the lad-profile shall be calculated by using |
---|
| 257 | !-- a beta probability density function |
---|
| 258 | IF ( alpha_lad /= 9999999.9_wp .AND. beta_lad /= 9999999.9_wp ) & |
---|
| 259 | calc_beta_lad_profile = .TRUE. |
---|
| 260 | |
---|
| 261 | 10 CONTINUE |
---|
| 262 | |
---|
| 263 | |
---|
[1] | 264 | #if defined( __dvrp_graphics ) |
---|
| 265 | REWIND ( 11 ) |
---|
[1320] | 266 | line = ' ' |
---|
| 267 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
[1484] | 268 | READ ( 11, '(A)', END=20 ) line |
---|
[1] | 269 | ENDDO |
---|
| 270 | BACKSPACE ( 11 ) |
---|
| 271 | |
---|
| 272 | ! |
---|
| 273 | !-- Read user-defined namelist |
---|
| 274 | READ ( 11, dvrp_graphics_par ) |
---|
| 275 | |
---|
[1484] | 276 | 20 CONTINUE |
---|
[1] | 277 | #endif |
---|
| 278 | |
---|
[60] | 279 | ! |
---|
| 280 | !-- Try to find particles package |
---|
[1] | 281 | REWIND ( 11 ) |
---|
[1320] | 282 | line = ' ' |
---|
| 283 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
[1484] | 284 | READ ( 11, '(A)', END=30 ) line |
---|
[1] | 285 | ENDDO |
---|
| 286 | BACKSPACE ( 11 ) |
---|
| 287 | |
---|
| 288 | ! |
---|
| 289 | !-- Read user-defined namelist |
---|
| 290 | READ ( 11, particles_par ) |
---|
| 291 | |
---|
| 292 | ! |
---|
| 293 | !-- Set flag that indicates that particles are switched on |
---|
| 294 | particle_advection = .TRUE. |
---|
| 295 | |
---|
[1484] | 296 | 30 CONTINUE |
---|
[1] | 297 | |
---|
| 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 | |
---|
[1496] | 316 | |
---|
| 317 | ! |
---|
| 318 | !-- Try to find radiation package |
---|
| 319 | REWIND ( 11 ) |
---|
| 320 | line = ' ' |
---|
| 321 | DO WHILE ( INDEX( line, '&radiation_par' ) == 0 ) |
---|
| 322 | READ ( 11, '(A)', END=51 ) line |
---|
| 323 | ENDDO |
---|
| 324 | BACKSPACE ( 11 ) |
---|
| 325 | |
---|
| 326 | ! |
---|
| 327 | !-- Read user-defined namelist |
---|
| 328 | READ ( 11, radiation_par ) |
---|
| 329 | |
---|
| 330 | ! |
---|
| 331 | !-- Set flag that indicates that the radiation scheme is switched on |
---|
| 332 | radiation = .TRUE. |
---|
| 333 | |
---|
| 334 | 51 CONTINUE |
---|
| 335 | |
---|
| 336 | |
---|
[1] | 337 | END SUBROUTINE package_parin |
---|