1 SUBROUTINE SETUP_TRANS(KSMAX,KDGL,KLOEN,LDLINEAR_GRID,LDSPLIT,&
 
    4 !**** *SETUP_TRANS* - Setup transform 
package for specific resolution
 
    8 !     To setup for making spectral transforms. Each call to this routine
 
    9 !     creates a new resolution up to a maximum of NMAX_RESOL set up in
 
   10 !     SETUP_TRANS0. You need to call SETUP_TRANS0 before this routine can
 
   15 !     CALL SETUP_TRANS(...)
 
   17 !     Explicit arguments : KLOEN,LDLINEAR_GRID,LDSPLIT,KAPSETS are optional arguments
 
   18 !     --------------------
 
   19 !     KSMAX - spectral truncation required
 
   20 !     KDGL  - number of Gaussian latitudes
 
   21 !     KLOEN(:) - number of points on each Gaussian latitude [2*KDGL]
 
   22 !     LDSPLIT - true if split latitudes in grid-point space [false]
 
   23 !     LDLINEAR_GRID - true if linear grid
 
   24 !     KAPSETS - Number of apple sets in the distribution [0]
 
   25 !     KTMAX - truncation order for tendencies?
 
   26 !     KRESOL - the resolution identifier
 
   28 !     KSMAX,KDGL,KTMAX and KLOEN are GLOBAL variables desribing the resolution
 
   29 !     in spectral and grid-point space
 
   31 !     LDSPLIT and KAPSETS describe the distribution among processors of
 
   32 !     grid-point data and has no relevance if you are using a single processor
 
   37 !     Externals.  SET_RESOL   - set resolution
 
   38 !     ----------  SETUP_DIMS  - setup distribution independent dimensions
 
   39 !                 SUMP_TRANS_PRELEG - first part of setup of distr. environment
 
   40 !                 SULEG - Compute Legandre polonomial and Gaussian
 
   41 !                         Latitudes and Weights
 
   42 !                 SETUP_GEOM - Compute arrays related to grid-point geometry
 
   43 !                 SUMP_TRANS - Second part of setup of distributed environment
 
   44 !                 SUFFT - setup for FFT
 
   54 !     ------------------------------------------------------------------
 
   56 USE PARKIND1  ,ONLY : JPIM     ,JPRB
 
   62 INTEGER(KIND=JPIM) ,INTENT(IN) :: KSMAX,KDGL
 
   63 INTEGER(KIND=JPIM) ,OPTIONAL,INTENT(IN) :: KLOEN(:)
 
   64 LOGICAL   ,OPTIONAL,INTENT(IN) :: LDLINEAR_GRID
 
   65 LOGICAL   ,OPTIONAL,INTENT(IN) :: LDSPLIT
 
   66 INTEGER(KIND=JPIM) ,OPTIONAL,INTENT(IN) :: KAPSETS
 
   67 INTEGER(KIND=JPIM) ,OPTIONAL,INTENT(IN) :: KTMAX
 
   68 INTEGER(KIND=JPIM) ,OPTIONAL,INTENT(OUT):: KRESOL
 
   71 END SUBROUTINE SETUP_TRANS