[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 | ! |
---|
[1310] | 16 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[1586] | 21 | ! |
---|
[1683] | 22 | ! |
---|
[1485] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: package_parin.f90 1683 2015-10-07 23:57:51Z raasch $ |
---|
| 26 | ! |
---|
[1683] | 27 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 28 | ! Code annotations made doxygen readable |
---|
| 29 | ! |
---|
[1586] | 30 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 31 | ! Added several radiation_par parameters |
---|
| 32 | ! |
---|
[1576] | 33 | ! 1575 2015-03-27 09:56:27Z raasch |
---|
| 34 | ! +seed_follows_topography in particles_par |
---|
| 35 | ! |
---|
[1554] | 36 | ! 1553 2015-03-03 17:33:54Z maronga |
---|
| 37 | ! Resorting of lsm_par |
---|
| 38 | ! |
---|
[1552] | 39 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 40 | ! Several changes in the liste for land surface model and radiation model |
---|
| 41 | ! |
---|
[1497] | 42 | ! 1496 2014-12-02 17:25:50Z maronga |
---|
| 43 | ! Added support for the land surface model and radiation scheme |
---|
| 44 | ! |
---|
[1485] | 45 | ! 1484 2014-10-21 10:53:05Z kanani |
---|
[1484] | 46 | ! Changes due to new module structure of the plant canopy model: |
---|
| 47 | ! module plant_canopy_model_mod added, |
---|
| 48 | ! new package/namelist canopy_par added, i.e. the canopy model is no longer |
---|
| 49 | ! steered over the inipar-namelist, |
---|
| 50 | ! drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient |
---|
| 51 | ! renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff. |
---|
| 52 | ! Changed statement tags in CONTINUE-statement |
---|
[1341] | 53 | ! |
---|
[1368] | 54 | ! 1367 2014-04-23 15:18:30Z witha |
---|
| 55 | ! Bugfix: module kinds must be used |
---|
| 56 | ! |
---|
[1360] | 57 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 58 | ! +alloc_factor, + min_nr_particle |
---|
| 59 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
| 60 | ! |
---|
[1341] | 61 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
| 62 | ! REAL constants defined as wp-kinds |
---|
| 63 | ! |
---|
[1325] | 64 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
| 65 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
| 66 | ! |
---|
[1321] | 67 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 68 | ! ONLY-attribute added to USE-statements, |
---|
| 69 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 70 | ! kinds are defined in new module kinds, |
---|
| 71 | ! old module precision_kind is removed, |
---|
| 72 | ! revision history before 2012 removed, |
---|
| 73 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 74 | ! all variable declaration statements |
---|
[392] | 75 | ! |
---|
[1037] | 76 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 77 | ! code put under GPL (PALM 3.9) |
---|
| 78 | ! |
---|
[829] | 79 | ! 828 2012-02-21 12:00:36Z raasch |
---|
| 80 | ! +dissipation_classes, radius_classes in parpar |
---|
| 81 | ! |
---|
[826] | 82 | ! 825 2012-02-19 03:03:44Z raasch |
---|
| 83 | ! wang_collision_kernel and turbulence_effects_on_collision in particles_par |
---|
| 84 | ! replaced by collision_kernel |
---|
| 85 | ! |
---|
[1] | 86 | ! Revision 1.1 2000/12/28 13:21:57 raasch |
---|
| 87 | ! Initial revision |
---|
| 88 | ! |
---|
| 89 | ! |
---|
| 90 | ! Description: |
---|
| 91 | ! ------------ |
---|
[1682] | 92 | !> This subroutine reads from the NAMELIST file variables controling model |
---|
| 93 | !> software packages which are used optionally in the run. |
---|
[1] | 94 | !------------------------------------------------------------------------------! |
---|
[1682] | 95 | SUBROUTINE package_parin |
---|
| 96 | |
---|
[1] | 97 | |
---|
[1320] | 98 | USE control_parameters, & |
---|
[1324] | 99 | ONLY: averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp, & |
---|
[1496] | 100 | dt_dvrp, particle_maximum_age, skip_time_dosp, & |
---|
| 101 | threshold |
---|
[1] | 102 | |
---|
[1320] | 103 | USE dvrp_variables, & |
---|
| 104 | ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & |
---|
| 105 | cluster_size, color_interval, dvrpsize_interval, & |
---|
| 106 | dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & |
---|
| 107 | dvrp_password, dvrp_username, groundplate_color, & |
---|
| 108 | isosurface_color, mode_dvrp, particle_color, & |
---|
| 109 | particle_dvrpsize, pathlines_fadeintime, & |
---|
| 110 | pathlines_fadeouttime, pathlines_linecount, & |
---|
| 111 | pathlines_maxhistory, pathlines_wavecount, & |
---|
| 112 | pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & |
---|
| 113 | superelevation_x, superelevation_y, topography_color, & |
---|
| 114 | vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & |
---|
| 115 | vc_size_z |
---|
| 116 | |
---|
[1496] | 117 | USE land_surface_model_mod, & |
---|
[1551] | 118 | ONLY: alpha_vangenuchten, c_surface, canopy_resistance_coefficient, & |
---|
| 119 | conserve_water_content, dewfall, f_shortwave_incoming, & |
---|
| 120 | hydraulic_conductivity, lambda_surface_stable, & |
---|
| 121 | lambda_surface_unstable, & |
---|
| 122 | leaf_area_index, land_surface, l_vangenuchten, & |
---|
| 123 | min_canopy_resistance, min_soil_resistance, field_capacity, & |
---|
| 124 | residual_moisture, saturation_moisture, wilting_point, & |
---|
| 125 | n_vangenuchten, root_fraction, soil_moisture, soil_temperature, & |
---|
| 126 | soil_type, vegetation_coverage, veg_type, z0_eb, z0h_eb, zs |
---|
[1496] | 127 | |
---|
[1367] | 128 | USE kinds |
---|
| 129 | |
---|
[1320] | 130 | USE particle_attributes, & |
---|
[1359] | 131 | ONLY: alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, & |
---|
| 132 | collision_kernel, density_ratio, dissipation_classes, & |
---|
| 133 | dt_min_part, dt_prel, dt_write_particle_data, dvrp_psize, & |
---|
[1320] | 134 | end_time_prel, initial_weighting_factor, & |
---|
[1359] | 135 | maximum_number_of_tailpoints, & |
---|
[1320] | 136 | maximum_tailpoint_age, minimum_tailpoint_distance, & |
---|
[1359] | 137 | min_nr_particle, number_of_particle_groups, particles_per_point,& |
---|
[1320] | 138 | particle_advection, particle_advection_start, pdx, pdy, pdz, & |
---|
| 139 | psb, psl, psn, psr, pss, pst, radius, radius_classes, & |
---|
| 140 | random_start_position, read_particles_from_restartfile, & |
---|
[1575] | 141 | seed_follows_topography, skip_particles_for_tail, & |
---|
| 142 | use_particle_tails, use_sgs_for_particles, & |
---|
| 143 | vertical_particle_advection, write_particle_statistics |
---|
[1320] | 144 | |
---|
[1484] | 145 | USE plant_canopy_model_mod, & |
---|
| 146 | ONLY: alpha_lad, beta_lad, calc_beta_lad_profile, canopy_drag_coeff, & |
---|
| 147 | canopy_mode, cthf, lad_surface, & |
---|
| 148 | lad_vertical_gradient, lad_vertical_gradient_level, lai_beta, & |
---|
| 149 | leaf_scalar_exch_coeff, leaf_surface_conc, pch_index, & |
---|
| 150 | plant_canopy |
---|
| 151 | |
---|
[1496] | 152 | USE radiation_model_mod, & |
---|
[1585] | 153 | ONLY: albedo, albedo_type, albedo_lw_dif, albedo_lw_dir, albedo_sw_dif,& |
---|
| 154 | albedo_sw_dir, day_init, constant_albedo, dt_radiation, lambda, & |
---|
| 155 | lw_radiation, net_radiation, radiation, radiation_scheme, & |
---|
| 156 | sw_radiation, time_utc_init |
---|
[1496] | 157 | |
---|
| 158 | |
---|
[1320] | 159 | USE spectrum, & |
---|
| 160 | ONLY: comp_spectra_level, data_output_sp, plot_spectra_level, & |
---|
| 161 | spectra_direction |
---|
| 162 | |
---|
[1] | 163 | IMPLICIT NONE |
---|
| 164 | |
---|
[1682] | 165 | CHARACTER (LEN=80) :: line !< |
---|
[1] | 166 | |
---|
[1484] | 167 | NAMELIST /canopy_par/ alpha_lad, beta_lad, canopy_drag_coeff, & |
---|
| 168 | canopy_mode, cthf, & |
---|
| 169 | lad_surface, & |
---|
| 170 | lad_vertical_gradient, & |
---|
| 171 | lad_vertical_gradient_level, & |
---|
| 172 | lai_beta, & |
---|
| 173 | leaf_scalar_exch_coeff, & |
---|
| 174 | leaf_surface_conc, pch_index |
---|
| 175 | |
---|
[242] | 176 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
[264] | 177 | clip_dvrp_s, cluster_size, color_interval, & |
---|
| 178 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
| 179 | dvrp_file, dvrp_host, dvrp_output, & |
---|
[336] | 180 | dvrp_password, dvrp_psize, dvrp_username, & |
---|
[284] | 181 | groundplate_color, isosurface_color, & |
---|
| 182 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
[264] | 183 | pathlines_fadeintime, pathlines_fadeouttime, & |
---|
| 184 | pathlines_linecount, pathlines_maxhistory, & |
---|
| 185 | pathlines_wavecount, pathlines_wavetime, & |
---|
| 186 | slicer_range_limits_dvrp, superelevation, & |
---|
| 187 | superelevation_x, superelevation_y, & |
---|
[284] | 188 | threshold, topography_color, vc_alpha, & |
---|
| 189 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
| 190 | vc_size_y, vc_size_z |
---|
[264] | 191 | |
---|
[1551] | 192 | NAMELIST /lsm_par/ alpha_vangenuchten, c_surface, & |
---|
[1496] | 193 | canopy_resistance_coefficient, & |
---|
[1551] | 194 | conserve_water_content, dewfall, & |
---|
[1553] | 195 | f_shortwave_incoming, field_capacity, & |
---|
[1551] | 196 | hydraulic_conductivity, & |
---|
| 197 | lambda_surface_stable, & |
---|
| 198 | lambda_surface_unstable, leaf_area_index, & |
---|
| 199 | l_vangenuchten, min_canopy_resistance, & |
---|
[1553] | 200 | min_soil_resistance, n_vangenuchten, & |
---|
| 201 | residual_moisture, root_fraction, & |
---|
| 202 | saturation_moisture, soil_moisture, & |
---|
| 203 | soil_temperature, soil_type, & |
---|
| 204 | vegetation_coverage, veg_type, wilting_point,& |
---|
| 205 | zs, z0_eb, z0h_eb |
---|
[1496] | 206 | |
---|
| 207 | |
---|
| 208 | |
---|
[1359] | 209 | NAMELIST /particles_par/ alloc_factor, bc_par_b, bc_par_lr, & |
---|
| 210 | bc_par_ns, bc_par_t, collision_kernel, & |
---|
| 211 | density_ratio, dissipation_classes, dt_dopts,& |
---|
| 212 | dt_min_part, dt_prel, & |
---|
[336] | 213 | dt_write_particle_data, & |
---|
[1] | 214 | end_time_prel, initial_weighting_factor, & |
---|
| 215 | maximum_number_of_tailpoints, & |
---|
| 216 | maximum_tailpoint_age, & |
---|
| 217 | minimum_tailpoint_distance, & |
---|
[1359] | 218 | min_nr_particle, & |
---|
[1] | 219 | number_of_particle_groups, & |
---|
| 220 | particles_per_point, & |
---|
| 221 | particle_advection_start, & |
---|
| 222 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
[828] | 223 | psl, psn, psr, pss, pst, radius, & |
---|
| 224 | radius_classes, random_start_position, & |
---|
[1] | 225 | read_particles_from_restartfile, & |
---|
[1575] | 226 | seed_follows_topography, & |
---|
[790] | 227 | skip_particles_for_tail, & |
---|
| 228 | use_particle_tails, use_sgs_for_particles, & |
---|
[1] | 229 | vertical_particle_advection, & |
---|
| 230 | write_particle_statistics |
---|
[1320] | 231 | |
---|
[1585] | 232 | NAMELIST /radiation_par/ albedo, albedo_type, albedo_lw_dir, & |
---|
| 233 | albedo_lw_dif, albedo_sw_dir, albedo_sw_dif, & |
---|
| 234 | constant_albedo, day_init, dt_radiation, & |
---|
| 235 | lambda, lw_radiation, net_radiation, & |
---|
| 236 | radiation_scheme, sw_radiation, time_utc_init |
---|
[1496] | 237 | |
---|
[1] | 238 | NAMELIST /spectra_par/ averaging_interval_sp, comp_spectra_level, & |
---|
| 239 | data_output_sp, dt_dosp, plot_spectra_level, & |
---|
| 240 | skip_time_dosp, spectra_direction |
---|
| 241 | |
---|
| 242 | ! |
---|
| 243 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
| 244 | !-- parin), search for the namelist-group of the package and position the |
---|
| 245 | !-- file at this line. Do the same for each optionally used package. |
---|
[1320] | 246 | line = ' ' |
---|
[1] | 247 | |
---|
[1484] | 248 | ! |
---|
| 249 | !-- Try to find canopy package |
---|
| 250 | REWIND ( 11 ) |
---|
| 251 | line = ' ' |
---|
| 252 | DO WHILE ( INDEX( line, '&canopy_par' ) == 0 ) |
---|
| 253 | READ ( 11, '(A)', END=10 ) line |
---|
| 254 | ENDDO |
---|
| 255 | BACKSPACE ( 11 ) |
---|
| 256 | |
---|
| 257 | ! |
---|
| 258 | !-- Read user-defined namelist |
---|
| 259 | READ ( 11, canopy_par ) |
---|
| 260 | |
---|
| 261 | ! |
---|
| 262 | !-- Set flag that indicates that canopy model is switched on |
---|
| 263 | plant_canopy = .TRUE. |
---|
| 264 | |
---|
| 265 | ! |
---|
| 266 | !-- Set flag that indicates that the lad-profile shall be calculated by using |
---|
| 267 | !-- a beta probability density function |
---|
| 268 | IF ( alpha_lad /= 9999999.9_wp .AND. beta_lad /= 9999999.9_wp ) & |
---|
| 269 | calc_beta_lad_profile = .TRUE. |
---|
| 270 | |
---|
| 271 | 10 CONTINUE |
---|
| 272 | |
---|
| 273 | |
---|
[1] | 274 | #if defined( __dvrp_graphics ) |
---|
| 275 | REWIND ( 11 ) |
---|
[1320] | 276 | line = ' ' |
---|
| 277 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
[1484] | 278 | READ ( 11, '(A)', END=20 ) line |
---|
[1] | 279 | ENDDO |
---|
| 280 | BACKSPACE ( 11 ) |
---|
| 281 | |
---|
| 282 | ! |
---|
| 283 | !-- Read user-defined namelist |
---|
| 284 | READ ( 11, dvrp_graphics_par ) |
---|
| 285 | |
---|
[1484] | 286 | 20 CONTINUE |
---|
[1] | 287 | #endif |
---|
| 288 | |
---|
[60] | 289 | ! |
---|
| 290 | !-- Try to find particles package |
---|
[1] | 291 | REWIND ( 11 ) |
---|
[1320] | 292 | line = ' ' |
---|
| 293 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
[1484] | 294 | READ ( 11, '(A)', END=30 ) line |
---|
[1] | 295 | ENDDO |
---|
| 296 | BACKSPACE ( 11 ) |
---|
| 297 | |
---|
| 298 | ! |
---|
| 299 | !-- Read user-defined namelist |
---|
| 300 | READ ( 11, particles_par ) |
---|
| 301 | |
---|
| 302 | ! |
---|
| 303 | !-- Set flag that indicates that particles are switched on |
---|
| 304 | particle_advection = .TRUE. |
---|
| 305 | |
---|
[1484] | 306 | 30 CONTINUE |
---|
[1] | 307 | |
---|
[60] | 308 | |
---|
[1] | 309 | #if defined( __spectra ) |
---|
| 310 | REWIND ( 11 ) |
---|
[1320] | 311 | line = ' ' |
---|
| 312 | DO WHILE ( INDEX( line, '&spectra_par' ) == 0 ) |
---|
[1484] | 313 | READ ( 11, '(A)', END=40 ) line |
---|
[1] | 314 | ENDDO |
---|
| 315 | BACKSPACE ( 11 ) |
---|
| 316 | |
---|
| 317 | ! |
---|
| 318 | !-- Read user-defined namelist |
---|
| 319 | READ ( 11, spectra_par ) |
---|
| 320 | |
---|
| 321 | ! |
---|
| 322 | !-- Default setting of dt_dosp here (instead of check_parameters), because its |
---|
| 323 | !-- current value is needed in init_pegrid |
---|
[1340] | 324 | IF ( dt_dosp == 9999999.9_wp ) dt_dosp = dt_data_output |
---|
[1] | 325 | |
---|
[1484] | 326 | 40 CONTINUE |
---|
[1] | 327 | #endif |
---|
| 328 | |
---|
[1496] | 329 | ! |
---|
| 330 | !-- Try to find land surface model package |
---|
| 331 | REWIND ( 11 ) |
---|
| 332 | line = ' ' |
---|
| 333 | DO WHILE ( INDEX( line, '&lsm_par' ) == 0 ) |
---|
| 334 | READ ( 11, '(A)', END=50 ) line |
---|
| 335 | ENDDO |
---|
| 336 | BACKSPACE ( 11 ) |
---|
| 337 | |
---|
| 338 | ! |
---|
| 339 | !-- Read user-defined namelist |
---|
| 340 | READ ( 11, lsm_par ) |
---|
| 341 | |
---|
| 342 | ! |
---|
| 343 | !-- Set flag that indicates that the land surface model is switched on |
---|
| 344 | land_surface = .TRUE. |
---|
| 345 | |
---|
| 346 | 50 CONTINUE |
---|
| 347 | |
---|
| 348 | ! |
---|
| 349 | !-- Try to find radiation package |
---|
| 350 | REWIND ( 11 ) |
---|
| 351 | line = ' ' |
---|
| 352 | DO WHILE ( INDEX( line, '&radiation_par' ) == 0 ) |
---|
| 353 | READ ( 11, '(A)', END=51 ) line |
---|
| 354 | ENDDO |
---|
| 355 | BACKSPACE ( 11 ) |
---|
| 356 | |
---|
| 357 | ! |
---|
| 358 | !-- Read user-defined namelist |
---|
| 359 | READ ( 11, radiation_par ) |
---|
| 360 | |
---|
| 361 | ! |
---|
| 362 | !-- Set flag that indicates that the radiation scheme is switched on |
---|
| 363 | radiation = .TRUE. |
---|
| 364 | |
---|
| 365 | 51 CONTINUE |
---|
| 366 | |
---|
| 367 | |
---|
[1] | 368 | END SUBROUTINE package_parin |
---|