FIXME : Add documentation
Here we calculate the correction factors for each possible kperp
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | a | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | b | ||
real, | intent(out) | :: | axb | |||
real, | intent(out), | dimension (:,:) | :: | axb_by_mode |
subroutine get_vol_average_all (a, b, axb, axb_by_mode)
use theta_grid, only: ntgrid, field_line_average
use kt_grids, only: naky, ntheta0
implicit none
complex, dimension (-ntgrid:,:,:), intent (in) :: a, b
real, intent (out) :: axb
real, dimension (:,:), intent (out) :: axb_by_mode
integer :: ik, it, ng
ng = ntgrid
do ik = 1, naky
do it = 1, ntheta0
axb_by_mode(it,ik) &
= field_line_average(real(conjg(a(-ng:ng,it,ik))*b(-ng:ng,it,ik)))
end do
end do
call get_volume_average (axb_by_mode, axb)
end subroutine get_vol_average_all