Changeset 2305 for palm/trunk/SOURCE/lpm_init.f90
- Timestamp:
- Jul 6, 2017 11:18:47 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/lpm_init.f90
r2274 r2305 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Improved calculation of particle IDs. 28 ! 29 ! 2274 2017-06-09 13:27:48Z Giersch 27 30 ! Changed error messages 28 31 ! … … 44 47 ! 2182 2017-03-17 14:27:40Z schwenkel 45 48 ! Added parameters for simplified particle initialization. 46 ! 49 ! 47 50 ! 2122 2017-01-18 12:22:54Z hoffmann 48 51 ! Improved initialization of equilibrium aerosol radii … … 157 160 MODULE lpm_init_mod 158 161 162 USE, INTRINSIC :: ISO_C_BINDING 159 163 160 164 USE arrays_3d, & … … 187 191 ibc_par_lr, ibc_par_ns, ibc_par_t, iran_part, log_z_z0, & 188 192 max_number_of_particle_groups, min_nr_particle, & 189 mpi_particle_type, number_concentration,&193 number_concentration, & 190 194 number_particles_per_gridbox, number_of_particles, & 191 195 number_of_particle_groups, number_of_sublayers, & … … 243 247 INTEGER(iwp) :: k !< 244 248 245 #if defined( __parallel )246 INTEGER(iwp), DIMENSION(3) :: blocklengths !<247 INTEGER(iwp), DIMENSION(3) :: displacements !<248 INTEGER(iwp), DIMENSION(3) :: types !<249 #endif250 251 249 REAL(wp) :: div !< 252 250 REAL(wp) :: height_int !< … … 255 253 REAL(wp) :: z0_av_local !< 256 254 257 #if defined( __parallel )258 !259 !-- Define MPI derived datatype for FORTRAN datatype particle_type (see module260 !-- particle_attributes). Integer length is 4 byte, Real is 8 byte261 blocklengths(1) = 19; blocklengths(2) = 6; blocklengths(3) = 1262 displacements(1) = 0; displacements(2) = 152; displacements(3) = 176263 264 types(1) = MPI_REAL265 types(2) = MPI_INTEGER266 types(3) = MPI_UB267 CALL MPI_TYPE_STRUCT( 3, blocklengths, displacements, types, &268 mpi_particle_type, ierr )269 CALL MPI_TYPE_COMMIT( mpi_particle_type, ierr )270 #endif271 255 272 256 ! … … 541 525 ! 542 526 !-- initialize counter for particle IDs 543 grid_particles%id_counter = 0527 grid_particles%id_counter = 1 544 528 545 529 ! … … 551 535 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, & 552 536 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, & 553 0, 0, 0 , 0, .FALSE., -1 )537 0, 0, 0_idp, .FALSE., -1 ) 554 538 555 539 particle_groups = particle_groups_type( 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp ) … … 697 681 698 682 DO j = 1, particles_per_point 683 699 684 700 685 n = n + 1 … … 731 716 tmp_particle%class = 1 732 717 tmp_particle%group = i 733 tmp_particle%id1 = 0 734 tmp_particle%id2 = 0 718 tmp_particle%id = 0_idp 735 719 tmp_particle%particle_mask = .TRUE. 736 720 tmp_particle%block_nr = -1 … … 858 842 DO n = local_start(kp,jp,ip), number_of_particles !only new particles 859 843 860 particles(n)%id1 = 10000_iwp * grid_particles(kp,jp,ip)%id_counter + kp 861 particles(n)%id2 = 10000_iwp * jp + ip 862 844 particles(n)%id = 10000_idp**3 * grid_particles(kp,jp,ip)%id_counter + & 845 10000_idp**2 * kp + 10000_idp * jp + ip 846 ! 847 !-- Count the number of particles that have been released before 863 848 grid_particles(kp,jp,ip)%id_counter = & 864 849 grid_particles(kp,jp,ip)%id_counter + 1
Note: See TracChangeset
for help on using the changeset viewer.