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