Computes the redistribute mapping from the global g_lo data decomposition to the global lz_lo decomposition
subroutine init_lambda_redistribute_local
use mp, only: nproc, iproc
use species, only: nspec
use theta_grid, only: ntgrid
use kt_grids, only: naky, ntheta0
use gs2_layouts, only: init_lambda_layouts
use gs2_layouts, only: g_lo, lz_lo
implicit none
!Early exit if possible
if (lzinit) return
lzinit = .true.
!Setup the lambda layout object (lz_lo)
call init_lambda_layouts &
(ntgrid, naky, ntheta0, nlambda, negrid, nspec, ng2, nproc, iproc)
call setup_lambda_redistribute_local(g_lo, lz_lo, lambda_map)
end subroutine init_lambda_redistribute_local