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