[1682] | 1 | !> @file mod_particle_attributes.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[1359] | 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. |
---|
[1359] | 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 | !------------------------------------------------------------------------------! |
---|
[1359] | 19 | ! |
---|
| 20 | ! Current revisions: |
---|
| 21 | ! ------------------ |
---|
[1937] | 22 | ! |
---|
[2183] | 23 | ! |
---|
[1360] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: mod_particle_attributes.f90 2183 2017-03-17 14:29:15Z hellstea $ |
---|
[1937] | 27 | ! |
---|
[2183] | 28 | ! 2182 2017-03-17 14:27:40Z schwenkel |
---|
| 29 | ! Added parameters for simplified particle initialization. |
---|
| 30 | ! |
---|
[2123] | 31 | ! 2122 2017-01-18 12:22:54Z hoffmann |
---|
| 32 | ! Calculation of particle ID |
---|
| 33 | ! Particle attribute dvrp_psize renamed to user: this attribute can be used by |
---|
| 34 | ! by the user to store any variable |
---|
| 35 | ! |
---|
[2001] | 36 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
| 37 | ! Forced header and separation lines into 80 columns |
---|
| 38 | ! |
---|
[1937] | 39 | ! 1936 2016-06-13 13:37:44Z suehring |
---|
| 40 | ! +deallocate_memory, step_dealloc |
---|
| 41 | ! |
---|
[1930] | 42 | ! 1929 2016-06-09 16:25:25Z suehring |
---|
| 43 | ! -sgs_wfu_par, sgs_wfv_par, sgs_wfw_par |
---|
| 44 | ! + sgs_wf_par |
---|
[1360] | 45 | ! |
---|
[1872] | 46 | ! 1871 2016-04-15 11:46:09Z hoffmann |
---|
| 47 | ! Initialization of aerosols added. |
---|
| 48 | ! |
---|
[1851] | 49 | ! 1849 2016-04-08 11:33:18Z hoffmann |
---|
| 50 | ! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water, |
---|
| 51 | ! vanthoff added from modules |
---|
| 52 | ! |
---|
[1832] | 53 | ! 1831 2016-04-07 13:15:51Z hoffmann |
---|
| 54 | ! palm_kernel removed, curvature_solution_effects added |
---|
| 55 | ! |
---|
[1823] | 56 | ! 1822 2016-04-07 07:49:42Z hoffmann |
---|
| 57 | ! +collision_algorithm, all_or_nothing, average_impact |
---|
| 58 | ! Tails removed. |
---|
| 59 | ! |
---|
[1728] | 60 | ! 1727 2015-11-20 07:22:02Z knoop |
---|
| 61 | ! Bugfix: Cause of syntax warning gfortran preprocessor removed |
---|
| 62 | ! |
---|
[1683] | 63 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 64 | ! Code annotations made doxygen readable |
---|
| 65 | ! |
---|
[1576] | 66 | ! 1575 2015-03-27 09:56:27Z raasch |
---|
| 67 | ! +seed_follows_topography |
---|
| 68 | ! |
---|
[1360] | 69 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
[1359] | 70 | ! new module containing all particle related variables |
---|
| 71 | ! -dt_sort_particles |
---|
| 72 | ! |
---|
| 73 | ! Description: |
---|
| 74 | ! ------------ |
---|
[1682] | 75 | !> Definition of variables used to compute particle transport |
---|
[1359] | 76 | !------------------------------------------------------------------------------! |
---|
[1682] | 77 | MODULE particle_attributes |
---|
| 78 | |
---|
[1359] | 79 | |
---|
| 80 | USE kinds |
---|
| 81 | |
---|
[1822] | 82 | CHARACTER(LEN=15) :: bc_par_lr = 'cyclic' !< left/right boundary condition |
---|
| 83 | CHARACTER(LEN=15) :: bc_par_ns = 'cyclic' !< north/south boundary condition |
---|
| 84 | CHARACTER(LEN=15) :: bc_par_b = 'reflect' !< bottom boundary condition |
---|
| 85 | CHARACTER(LEN=15) :: bc_par_t = 'absorb' !< top boundary condition |
---|
| 86 | CHARACTER(LEN=15) :: collision_algorithm = 'all_or_nothing' !< collision algorithm |
---|
| 87 | CHARACTER(LEN=15) :: collision_kernel = 'none' !< collision kernel |
---|
[1359] | 88 | |
---|
[1822] | 89 | INTEGER(iwp) :: deleted_particles = 0, & |
---|
[1359] | 90 | dissipation_classes = 10, ibc_par_lr, & |
---|
| 91 | ibc_par_ns, ibc_par_b, ibc_par_t, iran_part = -1234567, & |
---|
| 92 | maximum_number_of_particles = 0, & |
---|
| 93 | min_nr_particle = 50, & |
---|
| 94 | mpi_particle_type, & |
---|
| 95 | number_of_particles = 0, & |
---|
[1822] | 96 | number_of_particle_groups = 1, & |
---|
| 97 | number_of_sublayers = 20, & |
---|
[2182] | 98 | number_particles_per_gridbox = -1, & |
---|
[1359] | 99 | offset_ocean_nzt = 0, & |
---|
| 100 | offset_ocean_nzt_m1 = 0, particles_per_point = 1, & |
---|
| 101 | particle_file_count = 0, radius_classes = 20, & |
---|
[1936] | 102 | sort_count = 0, step_dealloc = 100, & |
---|
[1822] | 103 | total_number_of_particles, & |
---|
[1359] | 104 | trlp_count_sum, trlp_count_recv_sum, trrp_count_sum, & |
---|
| 105 | trrp_count_recv_sum, trsp_count_sum, trsp_count_recv_sum, & |
---|
| 106 | trnp_count_sum, trnp_count_recv_sum |
---|
| 107 | |
---|
| 108 | INTEGER(iwp), PARAMETER :: max_number_of_particle_groups = 10 |
---|
| 109 | |
---|
| 110 | INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE :: prt_count |
---|
| 111 | |
---|
[1822] | 112 | LOGICAL :: all_or_nothing = .FALSE., average_impact = .FALSE., & |
---|
[1831] | 113 | curvature_solution_effects = .FALSE., & |
---|
[1936] | 114 | deallocate_memory = .TRUE., & |
---|
[1831] | 115 | hall_kernel = .FALSE., particle_advection = .FALSE., & |
---|
| 116 | random_start_position = .FALSE., & |
---|
[1359] | 117 | read_particles_from_restartfile = .TRUE., & |
---|
[1575] | 118 | seed_follows_topography = .FALSE., & |
---|
[1359] | 119 | uniform_particles = .TRUE., use_kernel_tables = .FALSE., & |
---|
[1822] | 120 | use_sgs_for_particles = .FALSE., wang_kernel = .FALSE., & |
---|
| 121 | write_particle_statistics = .FALSE. |
---|
[1359] | 122 | |
---|
| 123 | LOGICAL, DIMENSION(max_number_of_particle_groups) :: & |
---|
| 124 | vertical_particle_advection = .TRUE. |
---|
| 125 | |
---|
| 126 | REAL(wp) :: alloc_factor = 20.0_wp, c_0 = 3.0_wp, & |
---|
| 127 | dt_min_part = 0.0002_wp, dt_prel = 9999999.9_wp, & |
---|
| 128 | dt_write_particle_data = 9999999.9_wp, & |
---|
[1822] | 129 | end_time_prel = 9999999.9_wp, & |
---|
[1359] | 130 | initial_weighting_factor = 1.0_wp, & |
---|
[2182] | 131 | number_concentration = -1.0_wp, & |
---|
[1359] | 132 | particle_advection_start = 0.0_wp, & |
---|
[1929] | 133 | sgs_wf_part, time_prel = 0.0_wp, time_sort_particles = 0.0_wp,& |
---|
[1359] | 134 | time_write_particle_data = 0.0_wp, z0_av_global |
---|
| 135 | |
---|
| 136 | REAL(wp), DIMENSION(max_number_of_particle_groups) :: & |
---|
| 137 | density_ratio = 9999999.9_wp, pdx = 9999999.9_wp, & |
---|
| 138 | pdy = 9999999.9_wp, pdz = 9999999.9_wp, psb = 9999999.9_wp, & |
---|
| 139 | psl = 9999999.9_wp, psn = 9999999.9_wp, psr = 9999999.9_wp, & |
---|
| 140 | pss = 9999999.9_wp, pst = 9999999.9_wp, radius = 9999999.9_wp |
---|
| 141 | |
---|
| 142 | REAL(wp), DIMENSION(:), ALLOCATABLE :: log_z_z0 |
---|
| 143 | |
---|
| 144 | TYPE particle_type |
---|
| 145 | SEQUENCE |
---|
[2122] | 146 | REAL(wp) :: radius, age, age_m, dt_sum, user, e_m, & |
---|
[1359] | 147 | origin_x, origin_y, origin_z, rvar1, rvar2, rvar3, & |
---|
| 148 | speed_x, speed_y, speed_z, weight_factor, x, y, z |
---|
[2122] | 149 | INTEGER(iwp) :: class, group, id1, id2 |
---|
[1359] | 150 | LOGICAL :: particle_mask |
---|
| 151 | INTEGER(iwp) :: block_nr |
---|
| 152 | END TYPE particle_type |
---|
| 153 | |
---|
[1822] | 154 | TYPE(particle_type), DIMENSION(:), POINTER :: particles |
---|
| 155 | TYPE(particle_type) :: zero_particle |
---|
[1359] | 156 | |
---|
| 157 | TYPE particle_groups_type |
---|
| 158 | SEQUENCE |
---|
| 159 | REAL(wp) :: density_ratio, radius, exp_arg, exp_term |
---|
| 160 | END TYPE particle_groups_type |
---|
| 161 | |
---|
| 162 | TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) :: & |
---|
| 163 | particle_groups |
---|
| 164 | |
---|
| 165 | TYPE grid_particle_def |
---|
| 166 | INTEGER(iwp), DIMENSION(0:7) :: start_index |
---|
| 167 | INTEGER(iwp), DIMENSION(0:7) :: end_index |
---|
[2122] | 168 | INTEGER(iwp) :: id_counter |
---|
[1359] | 169 | LOGICAL :: time_loop_done |
---|
| 170 | TYPE(particle_type), POINTER, DIMENSION(:) :: particles !Particle array for this grid cell |
---|
| 171 | END TYPE grid_particle_def |
---|
| 172 | |
---|
| 173 | TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: grid_particles |
---|
| 174 | |
---|
| 175 | TYPE block_offset_def |
---|
| 176 | INTEGER(iwp) :: i_off |
---|
| 177 | INTEGER(iwp) :: j_off |
---|
| 178 | INTEGER(iwp) :: k_off |
---|
| 179 | END TYPE block_offset_def |
---|
| 180 | |
---|
| 181 | TYPE(block_offset_def), DIMENSION(0:7) :: block_offset |
---|
| 182 | |
---|
[1871] | 183 | ! |
---|
| 184 | !-- Lagrangian cloud model constants (especially for steering aerosols) |
---|
| 185 | REAL(wp) :: molecular_weight_of_solute = 0.05844_wp !< mol. m. NaCl (kg mol-1) |
---|
| 186 | REAL(wp) :: molecular_weight_of_water = 0.01801528_wp !< mol. m. H2O (kg mol-1) |
---|
| 187 | REAL(wp) :: rho_s = 2165.0_wp !< density of NaCl (kg m-3) |
---|
| 188 | REAL(wp) :: vanthoff = 2.0_wp !< van't Hoff factor for NaCl |
---|
| 189 | |
---|
| 190 | REAL(wp) :: n1 = 100.0_wp, s1 = 2.0_wp, rm1 = 0.05E-6_wp, & |
---|
| 191 | n2 = 0.0_wp, s2 = 2.0_wp, rm2 = 0.05E-6_wp, & |
---|
| 192 | n3 = 0.0_wp, s3 = 2.0_wp, rm3 = 0.05E-6_wp |
---|
| 193 | |
---|
| 194 | LOGICAL :: monodisperse_aerosols = .FALSE. !< initialize monodisperse aerosols |
---|
| 195 | LOGICAL :: init_aerosol_probabilistic = .FALSE. !< how to initialize aerosol spectra |
---|
| 196 | |
---|
[1359] | 197 | SAVE |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | END MODULE particle_attributes |
---|
| 201 | |
---|