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