INTERFACE:
subroutine decompInit_glcp(ans,ani,anj,lns,lni,lnj,glcmask)DESCRIPTION:
This subroutine initializes the land surface decomposition into a clump data structure. This assumes each pe has the same number of clumps set by clump_pproc
USES:
use clmtype , only : grlnd, nameg, namel, namec, namep
use spmdMod
use spmdGathScatMod
use domainMod , only : gatm
use subgridMod, only : subgrid_get_gcellinfo
ARGUMENTS:
implicit none
integer , intent(in) :: lns,lni,lnj ! land domain global size
integer , intent(in) :: ans,ani,anj ! atm domain global size
integer , pointer, optional :: glcmask(:) ! glc mask
LOCAL VARIABLES:
integer :: lg,ln,li,lj ! indices
integer :: ag,an,ai,aj ! indices
integer :: abegg,aendg,anumg ! atm num gridcells
integer :: begg,endg ! lnd num gridcells
integer :: begl,endl ! lnd num gridcells
integer :: begc,endc ! lnd num gridcells
integer :: begp,endp ! lnd num gridcells
integer :: cid,pid ! indices
integer :: n,m,np ! indices
integer :: icells, ilunits, icols, ipfts ! temporaries
integer :: ier ! error code
integer :: cnt ! local counter
integer, parameter :: dbug=1 ! 0 = min, 1=normal, 2=much, 3=max
integer :: npmin,npmax,npint ! do loop values for printing
integer :: clmin,clmax,clint ! do loop values for printing
integer :: lsize,gsize ! used for gsmap init
integer :: ng ! number of gridcells in gsmap
integer, pointer :: gindex(:) ! global index for gsmap init
integer, pointer :: lncnt(:) ! lnd cell count per atm cell
integer, pointer :: lnoff(:) ! atm cell offset in lnmap
integer, pointer :: lnmap(:) ! map from atm cell to lnd cells
integer, allocatable :: allvecg(:,:) ! temporary vector "global"
integer, allocatable :: allvecl(:,:) ! temporary vector "local"
integer :: lnidx
integer, pointer :: arrayg(:)
integer :: val1, val2
integer :: i,g,l,c,p,k
integer, pointer :: gstart(:),gcount(:)
integer, pointer :: lstart(:),lcount(:)
integer, pointer :: cstart(:),ccount(:)
integer, pointer :: pstart(:),pcount(:)
integer :: beg,end,num
type(mct_gsmap),pointer :: gsmap
integer, pointer :: start(:),count(:)
integer, pointer :: tarr1(:),tarr2(:)
integer :: ntest
character(len=8) :: clmlevel
character(len=32), parameter :: subname = 'decompInit_glcp'
CALLED FROM:
subroutine initializeREVISION HISTORY:
2002.09.11 Forrest Hoffman Creation. 2005.12.15 T Craig Updated for finemesh 2006.08.18 P Worley Performance optimizations