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