average_all_real_xys Subroutine

private subroutine average_all_real_xys(a, avg, distributed)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(in), dimension (ntheta0, naky, nspec) :: a
real, intent(out), dimension(nspec) :: avg
logical, intent(in) :: distributed

Contents

Source Code


Source Code

  subroutine average_all_real_xys (a, avg, distributed)
    use kt_grids, only: naky, ntheta0
    use species, only: nspec
    implicit none
    real, dimension (ntheta0, naky, nspec), intent (in) :: a
    real, dimension (ntheta0, nspec) :: axb_by_kx
    real, dimension(nspec), intent(out) :: avg
    logical,intent(in) :: distributed
    integer :: is

    do is = 1,nspec
       call average_ky(a(:,:,is), axb_by_kx(:,is), distributed)
       avg(is) = sum(axb_by_kx(:,is))
    end do
  end subroutine average_all_real_xys