[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 | ! ------------------ |
---|
[1683] | 21 | ! |
---|
| 22 | ! |
---|
[1360] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: mod_particle_attributes.f90 1728 2015-11-20 07:24:44Z raasch $ |
---|
| 26 | ! |
---|
[1728] | 27 | ! 1727 2015-11-20 07:22:02Z knoop |
---|
| 28 | ! Bugfix: Cause of syntax warning gfortran preprocessor removed |
---|
| 29 | ! |
---|
[1683] | 30 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 31 | ! Code annotations made doxygen readable |
---|
| 32 | ! |
---|
[1576] | 33 | ! 1575 2015-03-27 09:56:27Z raasch |
---|
| 34 | ! +seed_follows_topography |
---|
| 35 | ! |
---|
[1360] | 36 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
[1359] | 37 | ! new module containing all particle related variables |
---|
| 38 | ! -dt_sort_particles |
---|
| 39 | ! |
---|
| 40 | ! Description: |
---|
| 41 | ! ------------ |
---|
[1682] | 42 | !> Definition of variables used to compute particle transport |
---|
[1359] | 43 | !------------------------------------------------------------------------------! |
---|
[1682] | 44 | MODULE particle_attributes |
---|
| 45 | |
---|
[1359] | 46 | |
---|
| 47 | USE kinds |
---|
| 48 | |
---|
| 49 | CHARACTER(LEN=15) :: bc_par_lr = 'cyclic', bc_par_ns = 'cyclic', & |
---|
| 50 | bc_par_b = 'reflect', bc_par_t = 'absorb', & |
---|
| 51 | collision_kernel = 'none' |
---|
| 52 | |
---|
| 53 | INTEGER(iwp) :: deleted_particles = 0, deleted_tails = 0, & |
---|
| 54 | dissipation_classes = 10, ibc_par_lr, & |
---|
| 55 | ibc_par_ns, ibc_par_b, ibc_par_t, iran_part = -1234567, & |
---|
| 56 | maximum_number_of_particles = 0, & |
---|
| 57 | maximum_number_of_tailpoints = 100, & |
---|
| 58 | maximum_number_of_tails = 0, & |
---|
| 59 | min_nr_particle = 50, & |
---|
| 60 | mpi_particle_type, & |
---|
| 61 | number_of_particles = 0, & |
---|
| 62 | number_of_particle_groups = 1, number_of_tails = 0, & |
---|
| 63 | number_of_initial_tails = 0, number_of_sublayers = 20, & |
---|
| 64 | offset_ocean_nzt = 0, & |
---|
| 65 | offset_ocean_nzt_m1 = 0, particles_per_point = 1, & |
---|
| 66 | particle_file_count = 0, radius_classes = 20, & |
---|
| 67 | skip_particles_for_tail = 100, sort_count = 0, & |
---|
| 68 | total_number_of_particles, total_number_of_tails = 0, & |
---|
| 69 | trlp_count_sum, trlp_count_recv_sum, trrp_count_sum, & |
---|
| 70 | trrp_count_recv_sum, trsp_count_sum, trsp_count_recv_sum, & |
---|
| 71 | trnp_count_sum, trnp_count_recv_sum |
---|
| 72 | |
---|
| 73 | INTEGER(iwp), PARAMETER :: max_number_of_particle_groups = 10 |
---|
| 74 | |
---|
| 75 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: new_tail_id |
---|
| 76 | INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE :: prt_count |
---|
| 77 | |
---|
| 78 | LOGICAL :: hall_kernel = .FALSE., palm_kernel = .FALSE., & |
---|
| 79 | particle_advection = .FALSE., random_start_position = .FALSE., & |
---|
| 80 | read_particles_from_restartfile = .TRUE., & |
---|
[1575] | 81 | seed_follows_topography = .FALSE., & |
---|
[1359] | 82 | uniform_particles = .TRUE., use_kernel_tables = .FALSE., & |
---|
| 83 | use_particle_tails = .FALSE., use_sgs_for_particles = .FALSE., & |
---|
| 84 | wang_kernel = .FALSE., write_particle_statistics = .FALSE. |
---|
| 85 | |
---|
| 86 | LOGICAL, DIMENSION(max_number_of_particle_groups) :: & |
---|
| 87 | vertical_particle_advection = .TRUE. |
---|
| 88 | |
---|
| 89 | LOGICAL, DIMENSION(:), ALLOCATABLE :: tail_mask |
---|
| 90 | |
---|
| 91 | REAL(wp) :: alloc_factor = 20.0_wp, c_0 = 3.0_wp, & |
---|
| 92 | dt_min_part = 0.0002_wp, dt_prel = 9999999.9_wp, & |
---|
| 93 | dt_write_particle_data = 9999999.9_wp, & |
---|
| 94 | dvrp_psize = 9999999.9_wp, end_time_prel = 9999999.9_wp, & |
---|
| 95 | initial_weighting_factor = 1.0_wp, & |
---|
| 96 | maximum_tailpoint_age = 100000.0_wp, & |
---|
| 97 | minimum_tailpoint_distance = 0.0_wp, & |
---|
| 98 | particle_advection_start = 0.0_wp, & |
---|
| 99 | sgs_wfu_part = 0.3333333_wp, sgs_wfv_part = 0.3333333_wp, & |
---|
| 100 | sgs_wfw_part = 0.3333333_wp, time_prel = 0.0_wp, & |
---|
| 101 | time_sort_particles = 0.0_wp, & |
---|
| 102 | time_write_particle_data = 0.0_wp, z0_av_global |
---|
| 103 | |
---|
| 104 | REAL(wp), DIMENSION(max_number_of_particle_groups) :: & |
---|
| 105 | density_ratio = 9999999.9_wp, pdx = 9999999.9_wp, & |
---|
| 106 | pdy = 9999999.9_wp, pdz = 9999999.9_wp, psb = 9999999.9_wp, & |
---|
| 107 | psl = 9999999.9_wp, psn = 9999999.9_wp, psr = 9999999.9_wp, & |
---|
| 108 | pss = 9999999.9_wp, pst = 9999999.9_wp, radius = 9999999.9_wp |
---|
| 109 | |
---|
| 110 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: particle_tail_coordinates |
---|
| 111 | |
---|
| 112 | REAL(wp), DIMENSION(:), ALLOCATABLE :: log_z_z0 |
---|
| 113 | |
---|
| 114 | TYPE particle_type |
---|
| 115 | SEQUENCE |
---|
| 116 | #if defined( __twocachelines ) |
---|
| 117 | REAL(wp) :: radius |
---|
| 118 | REAL(sp) :: x, y, z, speed_x, speed_y, speed_z |
---|
| 119 | REAL(wp) :: weight_factor, rvar1, dt_sum |
---|
| 120 | INTEGER(iwp) :: class |
---|
| 121 | LOGICAL :: particle_mask |
---|
| 122 | |
---|
| 123 | REAL(wp) :: dvrp_psize, rvar2, rvar3 |
---|
| 124 | REAL(sp) :: age, origin_x, origin_y, origin_z, e_m, age_m |
---|
| 125 | INTEGER(iwp) :: group, tailpoints, tail_id, block_nr |
---|
| 126 | #else |
---|
| 127 | REAL(wp) :: radius, age, age_m, dt_sum, dvrp_psize, e_m, & |
---|
| 128 | origin_x, origin_y, origin_z, rvar1, rvar2, rvar3, & |
---|
| 129 | speed_x, speed_y, speed_z, weight_factor, x, y, z |
---|
| 130 | INTEGER(iwp) :: class, group, tailpoints, tail_id |
---|
| 131 | LOGICAL :: particle_mask |
---|
| 132 | INTEGER(iwp) :: block_nr |
---|
[1727] | 133 | #endif |
---|
| 134 | !-- One 32 Bit word for 64 Bit alignment in Type declaration |
---|
[1359] | 135 | END TYPE particle_type |
---|
| 136 | |
---|
| 137 | TYPE(particle_type), DIMENSION(:), POINTER :: particles |
---|
| 138 | TYPE(particle_type) :: zero_particle |
---|
| 139 | |
---|
| 140 | TYPE particle_groups_type |
---|
| 141 | SEQUENCE |
---|
| 142 | REAL(wp) :: density_ratio, radius, exp_arg, exp_term |
---|
| 143 | END TYPE particle_groups_type |
---|
| 144 | |
---|
| 145 | TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) :: & |
---|
| 146 | particle_groups |
---|
| 147 | |
---|
| 148 | TYPE grid_particle_def |
---|
| 149 | INTEGER(iwp), DIMENSION(0:7) :: start_index |
---|
| 150 | INTEGER(iwp), DIMENSION(0:7) :: end_index |
---|
| 151 | LOGICAL :: time_loop_done |
---|
| 152 | TYPE(particle_type), POINTER, DIMENSION(:) :: particles !Particle array for this grid cell |
---|
| 153 | END TYPE grid_particle_def |
---|
| 154 | |
---|
| 155 | TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: grid_particles |
---|
| 156 | |
---|
| 157 | TYPE block_offset_def |
---|
| 158 | INTEGER(iwp) :: i_off |
---|
| 159 | INTEGER(iwp) :: j_off |
---|
| 160 | INTEGER(iwp) :: k_off |
---|
| 161 | END TYPE block_offset_def |
---|
| 162 | |
---|
| 163 | TYPE(block_offset_def), DIMENSION(0:7) :: block_offset |
---|
| 164 | |
---|
| 165 | SAVE |
---|
| 166 | |
---|
| 167 | |
---|
| 168 | END MODULE particle_attributes |
---|
| 169 | |
---|