FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension (-ntgrid:ntgrid, ntheta0, naky) | :: | a | ||
complex, | intent(in), | dimension (-ntgrid:ntgrid, ntheta0, naky) | :: | b | ||
complex, | intent(out) | :: | avg | |||
logical, | intent(in) | :: | distributed |
subroutine average_all_2_complex_txy(a, b, avg, distributed)
use theta_grid, only: ntgrid
use kt_grids, only: naky, ntheta0
implicit none
complex, dimension (-ntgrid:ntgrid, ntheta0, naky), intent (in) :: a, b
complex, dimension (ntheta0, naky) :: axb_by_mode
complex, dimension (ntheta0) :: axb_by_kx
complex, intent(out) :: avg
logical,intent(in) :: distributed
call average_theta(a, b, axb_by_mode, distributed)
call average_ky(axb_by_mode, axb_by_kx, distributed)
avg = sum(axb_by_kx)
end subroutine average_all_2_complex_txy