Changeset 1359 for palm/trunk/SOURCE/data_output_2d.f90
 Timestamp:
 Apr 11, 2014 5:15:14 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/data_output_2d.f90
r1354 r1359 20 20 ! Current revisions: 21 21 !  22 ! 22 ! New particle structure integrated. 23 23 ! 24 24 ! Former revisions: … … 128 128 129 129 USE particle_attributes, & 130 ONLY: particle_advection_start, particles, prt_count,&131 p rt_start_index130 ONLY: grid_particles, number_of_particles, particle_advection_start, & 131 particles, prt_count 132 132 133 133 USE pegrid … … 163 163 LOGICAL :: two_d !: 164 164 165 REAL(wp) :: mean_r 166 REAL(wp) :: s_r 3!:167 REAL(wp) :: s_r 4!:165 REAL(wp) :: mean_r !: 166 REAL(wp) :: s_r2 !: 167 REAL(wp) :: s_r3 !: 168 168 169 REAL(wp), DIMENSION(:), ALLOCATABLE :: level_z!:170 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: local_2d!:171 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: local_2d_l!:172 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: local_pf !:169 REAL(wp), DIMENSION(:), ALLOCATABLE :: level_z !: 170 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: local_2d !: 171 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: local_2d_l !: 172 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: local_pf !: 173 173 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: local_2d_sections !: 174 174 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: local_2d_sections_l !: 175 175 176 #if defined( __parallel ) 176 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: total_2d !:177 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: total_2d !: 177 178 #endif 178 179 REAL(wp), DIMENSION(:,:,:), POINTER :: to_be_resorted !: … … 418 419 ENDIF 419 420 420 CASE ( 'pr_xy', 'pr_xz', 'pr_yz' ) ! mean particle radius 421 CASE ( 'pr_xy', 'pr_xz', 'pr_yz' ) ! mean particle radius (effective radius) 421 422 IF ( av == 0 ) THEN 422 423 IF ( simulated_time >= particle_advection_start ) THEN … … 424 425 DO j = nys, nyn 425 426 DO k = nzb, nzt+1 426 psi = prt_start_index(k,j,i) 427 number_of_particles = prt_count(k,j,i) 428 IF (number_of_particles <= 0) CYCLE 429 particles => grid_particles(k,j,i)%particles(1:number_of_particles) 430 s_r2 = 0.0_wp 427 431 s_r3 = 0.0_wp 428 s_r4 = 0.0_wp 429 DO n = psi, psi+prt_count(k,j,i)1 430 s_r3 = s_r3 + particles(n)%radius**3 * & 431 particles(n)%weight_factor 432 s_r4 = s_r4 + particles(n)%radius**4 * & 433 particles(n)%weight_factor 432 DO n = 1, number_of_particles 433 IF ( particles(n)%particle_mask ) THEN 434 s_r2 = s_r2 + particles(n)%radius**2 * & 435 particles(n)%weight_factor 436 s_r3 = s_r3 + particles(n)%radius**3 * & 437 particles(n)%weight_factor 438 ENDIF 434 439 ENDDO 435 IF ( s_r 3 /=0.0_wp ) THEN436 mean_r = s_r 4 / s_r3440 IF ( s_r2 > 0.0_wp ) THEN 441 mean_r = s_r3 / s_r2 437 442 ELSE 438 443 mean_r = 0.0_wp … … 445 450 ELSE 446 451 tend = 0.0_wp 447 END 452 ENDIF 448 453 DO i = nxlg, nxrg 449 454 DO j = nysg, nyng … … 600 605 DO j = nys, nyn 601 606 DO k = nzb, nzt+1 602 psi = prt_start_index(k,j,i) 603 DO n = psi, psi+prt_count(k,j,i)1 604 tend(k,j,i) = tend(k,j,i) + & 605 particles(n)%weight_factor / & 606 prt_count(k,j,i) 607 number_of_particles = prt_count(k,j,i) 608 IF (number_of_particles <= 0) CYCLE 609 particles => grid_particles(k,j,i)%particles(1:number_of_particles) 610 DO n = 1, number_of_particles 611 IF ( particles(n)%particle_mask ) THEN 612 tend(k,j,i) = tend(k,j,i) + & 613 particles(n)%weight_factor / & 614 prt_count(k,j,i) 615 ENDIF 607 616 ENDDO 608 617 ENDDO … … 612 621 ELSE 613 622 tend = 0.0_wp 614 END 623 ENDIF 615 624 DO i = nxlg, nxrg 616 625 DO j = nysg, nyng
Note: See TracChangeset
for help on using the changeset viewer.