Skip to content

Commit

Permalink
Fixed cumulation of single file
Browse files Browse the repository at this point in the history
  • Loading branch information
andyandreolli authored Nov 3, 2022
1 parent 114c657 commit 010bf47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions postpro/conditional_fields/conditional_ejection.f90
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,11 @@ program conditional_ejection
do ix=1,nxtot
if (mask(ix,iz)) then
call cumulate_on_temp(iz) ! if there is an ejection, use ejection as center and cumulate
! notice that this subroutine divides by no_samples already
end if
end do
end do
end do
! divide by number of samples to get the proper average for this file
temp_fileavg = temp_fileavg / no_samples

! cumulate average of single file into actual array with average
temp_cumul = temp_cumul + temp_fileavg
Expand Down Expand Up @@ -235,7 +234,7 @@ subroutine cumulate_on_temp(cz)

do cc = 1,3
do zz=1,nztot
temp_fileavg(cc,iy,convert_idx(zz,nz,cz)) = temp_fileavg(cc,iy,convert_idx(zz,nz,cz)) + rVVdx(ix,zz,cc,1)
temp_fileavg(cc,iy,convert_idx(zz,nz,cz)) = temp_fileavg(cc,iy,convert_idx(zz,nz,cz)) + rVVdx(ix,zz,cc,1)/no_samples
end do
end do

Expand Down

0 comments on commit 010bf47

Please sign in to comment.