include file: comdim.cdk 166
#if defined (DOC)
!
!     COMDECK COMDIM  :  Dimensions of model  arrays
!     --------------
! Revision:
!        Y. Yang  Oct. 2003
!                 -  Added NCMTMAX for the maximum # of species
!        Y.J. Rochon  Feb. 2005
!                 -  Added comments regarding NCMTMAX
!
! === 1. Dimensions in grid space =====
!
! NJ     : number of rows of latitudes
! NJINC: (incremental approach only) number of rows for low resolution model used
!                for increments computation
! NJMAX  : overdimensioning of NJ to avoid memory bank conflicts
! NJLATH  : number of rows in the northern hemisphere
! NJSUR  : number of additional rows for semi-lagrangian
! NJBEG  = -NJSUR+1
! NJEND  = NJ + NJSUR
!
! NI     : length of a row of latitude
! NIINC  : (incremental approach only) length of a row of latitude for low
!     .     resolution model used for increments computation
! NISUR  : overdimensioning for interpolation
! NIBEG  = 0
! NIEND  = NI + NISUR
!
! NFLEV  : number of levels in the model
! NCMTMAX: maxmum # of chemical species allowed
!          1) NCMTMAX must be <= JPNVARMAX-9  (see comstate.cdk and sustate.ftn)
!          2) CFSTVAR and CFSTVAR2D dimensions in comgdpar.cdk
!             must be large enough to accomodate number of variables
!             based on JPNVARMAX (see also sucva.ftn)
!    
!             JPNVARMAX (comstate.cdk), JPNVARM (comgdpar.cdk), 
!             INBRVAR3D (and INBRVAR2D; comvarstd.cdk), and NCMTMAX (comdim.cdk)
!             must have consistent sizes!!!
!
!    Number of variables considered in GRID space
!    --------------------------------------------
! NVGD   : number of basic model variables (found at all levels)
! NVG2D  : number of 2D fields (e.g. surface pressure)
! NVGAUX : number of auxiliary fields (found at some or all levels)
! NKGDIM : total number of 2D fields in the model state in grid space
!
! === 2. Dimensions in spectral space ================================
!
!     NTRUNC   : triangular truncation order
!     NTRUNCINC   :  (incremental approach only) triangular truncation order for low resolution model
!     NTRUNCMX : >= NTRUNC. Used for overdimensioning to avoid memory
!     .                     bank conflicts
!     NLA      : number of spectral coefficients (complex)
!     NLADIM   : >= NLA.   Used for overdimensioning to avoid memory
!     .                    bank conflicts
!     NLARH    : number of elements in a spectral array dimensioned
!     ...        as SPX(0:NTRUNC,0:NTRUNC)
!
!    Number of variables considered in SPECTRAL space
!    ------------------------------------------------
! NVSP    : number of basic model variables (found at all levels)
! NVSP2D  : number of 2D fields (e.g. surface pressure)
! NVSAUX  : number of auxiliary fields (found at some or all levels)
! NKSDIM  : total number of 2D fields in the model state in grid space
!
! === 3. Dimensions for the control variable  ================================
!
! NVADIM  : dimension of the control variable
!
#endif

      INTEGER NI, NIINC, NISUR, NIBEG, NIEND , NJ, NJINC, NLATBIN
      INTEGER NJSUR, NJBEG, NJEND
      INTEGER NJLATH, NJMAX
      INTEGER NFLEV, NVGD, NVG2D, NVGAUX, NKGDIM
      INTEGER NTRUNC, NTRUNCMX, NLA, NLADIM, NLARH
      INTEGER NVSP, NVSP2D, NVSAUX, NKSDIM, NKSDIM2
      INTEGER NVADIM, NTRUNCINC

      COMMON/COMNDIM/NI, NIINC, NISUR, NIBEG, NIEND
      COMMON/COMNDIM/NJ, NJINC, NJSUR, NJBEG, NLATBIN
      COMMON/COMNDIM/NJEND, NJLATH,NJMAX,NFLEV
      COMMON/COMNDIM/NVGD, NVG2D, NVGAUX,NKGDIM
      COMMON/COMNDIM/NTRUNC, NTRUNCMX, NLA, NLADIM, NLARH
      COMMON/COMNDIM/NVSP, NVSP2D, NVSAUX, NKSDIM, NKSDIM2
      COMMON/COMNDIM/NVADIM, NTRUNCINC
!   ------------------------------------------------------------------
      INTEGER NCMTMAX
      PARAMETER (NCMTMAX = 20)