#if defined (DOC)
!
! Update: Luc Fillion Jun 2008 - Start testing a tile ptot approach.
! Update: Luc Fillion 26 Aug 2008 - Include arrays of horizontal correlation scales.
! Update: Luc Fillion Nov 2008 - Implement spectral balance regression approach (sptot).
! Update: Luc Fillion ARMA/EC - 6 Jan 2009 - Upgrade to v_10_1_2 of 3dvar.
!
C
C COMDECK: COMCORR
C --------------
C 1. Spectral forecast error correlation
C . ------------------------------------
C CORNS(NKSDIM,NKSDIM,0:NTRUNC,NLATBIN): the correlations depend on the meridional
C . wavenumber and the vertical
C RSTDDEV(NKSDIM,0:NTRUNC)
C SPTOT(NFLEV+1,NFLEV): Spectral matrix operator for converting P to (T,lnPs)
C PtoT(NFLEV+1,NFLEV): matrix operator for converting P to (T,lnPs)
C THETA(NFLEV,NJ): turning angle used to define balanced divergence
C rcorl_psi(NFLEV,NJ) : Correlation Length (m) for PSI
C rcorl_chiu(NFLEV,NJ): Correlation Length (m) for CHI_U
C rcorl_tu(NFLEV,NJ) : Correlation Length (m) for T_U
C rcorl_lnq(NFLEV,NJ) : Correlation Length (m) for Ln_q
C rcorl_psu : Correlation Length (m) for Ps_U
#endif
integer mtile(ni,nj)
POINTER (ptmtile,mtile)
REAL*8 CORNS(NKSDIM2,NKSDIM2,0:NTRUNC,NLATBIN),
+ RSTDDEV(NKSDIM2,0:NTRUNC),CORVERT(NKSDIM2,NKSDIM2)
POINTER (PTCORNS,CORNS), (PTSTDDEV,RSTDDEV), (PTCORVERT,CORVERT)
c
REAL*8 PtoT(NFLEV+1,NFLEV,NJ), THETA(NFLEV,NJ), THETA2(NFLEV,NJ,NLATBIN)
REAL*8 ptotla(NFLEV+1,NFLEV,maxtiles)
POINTER (PTPtoT,PtoT),(PTTHETA,THETA),(PTTHETA2,THETA2)
POINTER (ptptotla,ptotla)
REAL*8 SPTOT(NFLEV+1,NFLEV,nbandmax)
POINTER (ptsptot,sptot)
real*8 rhcorl(nksdim2)
POINTER (pthcorl,rhcorl)
c
character*1 chcorg, cvcorg
C
COMMON /POMCORRI/ptmtile
common /chcorr/ chcorg, cvcorg
COMMON /POMCORR/PTCORNS, PTSTDDEV, PTPtoT, PTTHETA, PTTHETA2, PTCORVERT
& ,ptsptot,pthcorl,ptptotla