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