[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 | ! |
---|
| 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: package_parin.f90 1485 2014-10-21 11:09:54Z heinze $ |
---|
| 27 | ! |
---|
| 28 | ! 1484 2014-10-21 10:53:05Z kanani |
---|
[1484] | 29 | ! Changes due to new module structure of the plant canopy model: |
---|
| 30 | ! module plant_canopy_model_mod added, |
---|
| 31 | ! new package/namelist canopy_par added, i.e. the canopy model is no longer |
---|
| 32 | ! steered over the inipar-namelist, |
---|
| 33 | ! drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient |
---|
| 34 | ! renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff. |
---|
| 35 | ! Changed statement tags in CONTINUE-statement |
---|
[1341] | 36 | ! |
---|
[1368] | 37 | ! 1367 2014-04-23 15:18:30Z witha |
---|
| 38 | ! Bugfix: module kinds must be used |
---|
| 39 | ! |
---|
[1360] | 40 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
| 41 | ! +alloc_factor, + min_nr_particle |
---|
| 42 | ! -dt_sort_particles, -maximum_number_of_particles |
---|
| 43 | ! |
---|
[1341] | 44 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
| 45 | ! REAL constants defined as wp-kinds |
---|
| 46 | ! |
---|
[1325] | 47 | ! 1324 2014-03-21 09:13:16Z suehring |
---|
| 48 | ! Bugfix: Missing variable dt_data_output output added to ONLY statement |
---|
| 49 | ! |
---|
[1321] | 50 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 51 | ! ONLY-attribute added to USE-statements, |
---|
| 52 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 53 | ! kinds are defined in new module kinds, |
---|
| 54 | ! old module precision_kind is removed, |
---|
| 55 | ! revision history before 2012 removed, |
---|
| 56 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 57 | ! all variable declaration statements |
---|
[392] | 58 | ! |
---|
[1037] | 59 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 60 | ! code put under GPL (PALM 3.9) |
---|
| 61 | ! |
---|
[829] | 62 | ! 828 2012-02-21 12:00:36Z raasch |
---|
| 63 | ! +dissipation_classes, radius_classes in parpar |
---|
| 64 | ! |
---|
[826] | 65 | ! 825 2012-02-19 03:03:44Z raasch |
---|
| 66 | ! wang_collision_kernel and turbulence_effects_on_collision in particles_par |
---|
| 67 | ! replaced by collision_kernel |
---|
| 68 | ! |
---|
[1] | 69 | ! Revision 1.1 2000/12/28 13:21:57 raasch |
---|
| 70 | ! Initial revision |
---|
| 71 | ! |
---|
| 72 | ! |
---|
| 73 | ! Description: |
---|
| 74 | ! ------------ |
---|
| 75 | ! This subroutine reads from the NAMELIST file variables controling model |
---|
| 76 | ! software packages which are used optionally in the run. |
---|
| 77 | !------------------------------------------------------------------------------! |
---|
| 78 | |
---|
[1320] | 79 | USE control_parameters, & |
---|
[1324] | 80 | ONLY: averaging_interval_sp, dt_data_output, dt_dopts, dt_dosp, & |
---|
| 81 | dt_dvrp, particle_maximum_age, skip_time_dosp, threshold |
---|
[1] | 82 | |
---|
[1320] | 83 | USE dvrp_variables, & |
---|
| 84 | ONLY: clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s, & |
---|
| 85 | cluster_size, color_interval, dvrpsize_interval, & |
---|
| 86 | dvrp_directory, dvrp_file, dvrp_host, dvrp_output, & |
---|
| 87 | dvrp_password, dvrp_username, groundplate_color, & |
---|
| 88 | isosurface_color, mode_dvrp, particle_color, & |
---|
| 89 | particle_dvrpsize, pathlines_fadeintime, & |
---|
| 90 | pathlines_fadeouttime, pathlines_linecount, & |
---|
| 91 | pathlines_maxhistory, pathlines_wavecount, & |
---|
| 92 | pathlines_wavetime, slicer_range_limits_dvrp, superelevation, & |
---|
| 93 | superelevation_x, superelevation_y, topography_color, & |
---|
| 94 | vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y, & |
---|
| 95 | vc_size_z |
---|
| 96 | |
---|
[1367] | 97 | USE kinds |
---|
| 98 | |
---|
[1320] | 99 | USE particle_attributes, & |
---|
[1359] | 100 | ONLY: alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, & |
---|
| 101 | collision_kernel, density_ratio, dissipation_classes, & |
---|
| 102 | dt_min_part, dt_prel, dt_write_particle_data, dvrp_psize, & |
---|
[1320] | 103 | end_time_prel, initial_weighting_factor, & |
---|
[1359] | 104 | maximum_number_of_tailpoints, & |
---|
[1320] | 105 | maximum_tailpoint_age, minimum_tailpoint_distance, & |
---|
[1359] | 106 | min_nr_particle, number_of_particle_groups, particles_per_point,& |
---|
[1320] | 107 | particle_advection, particle_advection_start, pdx, pdy, pdz, & |
---|
| 108 | psb, psl, psn, psr, pss, pst, radius, radius_classes, & |
---|
| 109 | random_start_position, read_particles_from_restartfile, & |
---|
| 110 | skip_particles_for_tail, use_particle_tails, & |
---|
| 111 | use_sgs_for_particles, vertical_particle_advection, & |
---|
| 112 | write_particle_statistics |
---|
| 113 | |
---|
[1484] | 114 | USE plant_canopy_model_mod, & |
---|
| 115 | ONLY: alpha_lad, beta_lad, calc_beta_lad_profile, canopy_drag_coeff, & |
---|
| 116 | canopy_mode, cthf, lad_surface, & |
---|
| 117 | lad_vertical_gradient, lad_vertical_gradient_level, lai_beta, & |
---|
| 118 | leaf_scalar_exch_coeff, leaf_surface_conc, pch_index, & |
---|
| 119 | plant_canopy |
---|
| 120 | |
---|
[1320] | 121 | USE spectrum, & |
---|
| 122 | ONLY: comp_spectra_level, data_output_sp, plot_spectra_level, & |
---|
| 123 | spectra_direction |
---|
| 124 | |
---|
[1] | 125 | IMPLICIT NONE |
---|
| 126 | |
---|
[1320] | 127 | CHARACTER (LEN=80) :: line !: |
---|
[1] | 128 | |
---|
[1484] | 129 | NAMELIST /canopy_par/ alpha_lad, beta_lad, canopy_drag_coeff, & |
---|
| 130 | canopy_mode, cthf, & |
---|
| 131 | lad_surface, & |
---|
| 132 | lad_vertical_gradient, & |
---|
| 133 | lad_vertical_gradient_level, & |
---|
| 134 | lai_beta, & |
---|
| 135 | leaf_scalar_exch_coeff, & |
---|
| 136 | leaf_surface_conc, pch_index |
---|
| 137 | |
---|
[242] | 138 | NAMELIST /dvrp_graphics_par/ clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, & |
---|
[264] | 139 | clip_dvrp_s, cluster_size, color_interval, & |
---|
| 140 | dt_dvrp, dvrpsize_interval, dvrp_directory, & |
---|
| 141 | dvrp_file, dvrp_host, dvrp_output, & |
---|
[336] | 142 | dvrp_password, dvrp_psize, dvrp_username, & |
---|
[284] | 143 | groundplate_color, isosurface_color, & |
---|
| 144 | mode_dvrp, particle_color, particle_dvrpsize,& |
---|
[264] | 145 | pathlines_fadeintime, pathlines_fadeouttime, & |
---|
| 146 | pathlines_linecount, pathlines_maxhistory, & |
---|
| 147 | pathlines_wavecount, pathlines_wavetime, & |
---|
| 148 | slicer_range_limits_dvrp, superelevation, & |
---|
| 149 | superelevation_x, superelevation_y, & |
---|
[284] | 150 | threshold, topography_color, vc_alpha, & |
---|
| 151 | vc_gradient_normals, vc_mode, vc_size_x, & |
---|
| 152 | vc_size_y, vc_size_z |
---|
[264] | 153 | |
---|
[1359] | 154 | NAMELIST /particles_par/ alloc_factor, bc_par_b, bc_par_lr, & |
---|
| 155 | bc_par_ns, bc_par_t, collision_kernel, & |
---|
| 156 | density_ratio, dissipation_classes, dt_dopts,& |
---|
| 157 | dt_min_part, dt_prel, & |
---|
[336] | 158 | dt_write_particle_data, & |
---|
[1] | 159 | end_time_prel, initial_weighting_factor, & |
---|
| 160 | maximum_number_of_tailpoints, & |
---|
| 161 | maximum_tailpoint_age, & |
---|
| 162 | minimum_tailpoint_distance, & |
---|
[1359] | 163 | min_nr_particle, & |
---|
[1] | 164 | number_of_particle_groups, & |
---|
| 165 | particles_per_point, & |
---|
| 166 | particle_advection_start, & |
---|
| 167 | particle_maximum_age, pdx, pdy, pdz, psb, & |
---|
[828] | 168 | psl, psn, psr, pss, pst, radius, & |
---|
| 169 | radius_classes, random_start_position, & |
---|
[1] | 170 | read_particles_from_restartfile, & |
---|
[790] | 171 | skip_particles_for_tail, & |
---|
| 172 | use_particle_tails, use_sgs_for_particles, & |
---|
[1] | 173 | vertical_particle_advection, & |
---|
| 174 | write_particle_statistics |
---|
[1320] | 175 | |
---|
[1] | 176 | NAMELIST /spectra_par/ averaging_interval_sp, comp_spectra_level, & |
---|
| 177 | data_output_sp, dt_dosp, plot_spectra_level, & |
---|
| 178 | skip_time_dosp, spectra_direction |
---|
| 179 | |
---|
| 180 | ! |
---|
| 181 | !-- Position the namelist-file at the beginning (it was already opened in |
---|
| 182 | !-- parin), search for the namelist-group of the package and position the |
---|
| 183 | !-- file at this line. Do the same for each optionally used package. |
---|
[1320] | 184 | line = ' ' |
---|
[1] | 185 | |
---|
[1484] | 186 | ! |
---|
| 187 | !-- Try to find canopy package |
---|
| 188 | REWIND ( 11 ) |
---|
| 189 | line = ' ' |
---|
| 190 | DO WHILE ( INDEX( line, '&canopy_par' ) == 0 ) |
---|
| 191 | READ ( 11, '(A)', END=10 ) line |
---|
| 192 | ENDDO |
---|
| 193 | BACKSPACE ( 11 ) |
---|
| 194 | |
---|
| 195 | ! |
---|
| 196 | !-- Read user-defined namelist |
---|
| 197 | READ ( 11, canopy_par ) |
---|
| 198 | |
---|
| 199 | ! |
---|
| 200 | !-- Set flag that indicates that canopy model is switched on |
---|
| 201 | plant_canopy = .TRUE. |
---|
| 202 | |
---|
| 203 | ! |
---|
| 204 | !-- Set flag that indicates that the lad-profile shall be calculated by using |
---|
| 205 | !-- a beta probability density function |
---|
| 206 | IF ( alpha_lad /= 9999999.9_wp .AND. beta_lad /= 9999999.9_wp ) & |
---|
| 207 | calc_beta_lad_profile = .TRUE. |
---|
| 208 | |
---|
| 209 | 10 CONTINUE |
---|
| 210 | |
---|
| 211 | |
---|
[1] | 212 | #if defined( __dvrp_graphics ) |
---|
| 213 | REWIND ( 11 ) |
---|
[1320] | 214 | line = ' ' |
---|
| 215 | DO WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 ) |
---|
[1484] | 216 | READ ( 11, '(A)', END=20 ) line |
---|
[1] | 217 | ENDDO |
---|
| 218 | BACKSPACE ( 11 ) |
---|
| 219 | |
---|
| 220 | ! |
---|
| 221 | !-- Read user-defined namelist |
---|
| 222 | READ ( 11, dvrp_graphics_par ) |
---|
| 223 | |
---|
[1484] | 224 | 20 CONTINUE |
---|
[1] | 225 | #endif |
---|
| 226 | |
---|
[60] | 227 | ! |
---|
| 228 | !-- Try to find particles package |
---|
[1] | 229 | REWIND ( 11 ) |
---|
[1320] | 230 | line = ' ' |
---|
| 231 | DO WHILE ( INDEX( line, '&particles_par' ) == 0 ) |
---|
[1484] | 232 | READ ( 11, '(A)', END=30 ) line |
---|
[1] | 233 | ENDDO |
---|
| 234 | BACKSPACE ( 11 ) |
---|
| 235 | |
---|
| 236 | ! |
---|
| 237 | !-- Read user-defined namelist |
---|
| 238 | READ ( 11, particles_par ) |
---|
| 239 | |
---|
| 240 | ! |
---|
| 241 | !-- Set flag that indicates that particles are switched on |
---|
| 242 | particle_advection = .TRUE. |
---|
| 243 | |
---|
[1484] | 244 | 30 CONTINUE |
---|
[1] | 245 | |
---|
[60] | 246 | |
---|
[1] | 247 | #if defined( __spectra ) |
---|
| 248 | REWIND ( 11 ) |
---|
[1320] | 249 | line = ' ' |
---|
| 250 | DO WHILE ( INDEX( line, '&spectra_par' ) == 0 ) |
---|
[1484] | 251 | READ ( 11, '(A)', END=40 ) line |
---|
[1] | 252 | ENDDO |
---|
| 253 | BACKSPACE ( 11 ) |
---|
| 254 | |
---|
| 255 | ! |
---|
| 256 | !-- Read user-defined namelist |
---|
| 257 | READ ( 11, spectra_par ) |
---|
| 258 | |
---|
| 259 | ! |
---|
| 260 | !-- Default setting of dt_dosp here (instead of check_parameters), because its |
---|
| 261 | !-- current value is needed in init_pegrid |
---|
[1340] | 262 | IF ( dt_dosp == 9999999.9_wp ) dt_dosp = dt_data_output |
---|
[1] | 263 | |
---|
[1484] | 264 | 40 CONTINUE |
---|
[1] | 265 | #endif |
---|
| 266 | |
---|
| 267 | END SUBROUTINE package_parin |
---|