MODULE YEMCT0

USE PARKIND1  ,ONLY : JPIM     ,JPRB

IMPLICIT NONE

SAVE

!     ------------------------------------------------------------------

!*    Control variables for the job - constant within job

!========== ALADIN SWITCH   =========================
!   NLAM   : INTEGER SWITCH FOR ALADIN
!             1  -- IF LELAM=.TRUE.
!             0  -- IF LELAM=.FALSE.

!   == NUMERICAL SWITCHES FOR COUPLING CONTROL ==
!   NBICOU : SWITCH FOR COUPLING OF DYNAMICAL VARIABLES
!   NBICOT :    -    -      -    OF TEMPERATURE
!   NBICOQ :    -    -      -    OF SPECIFIC HUMIDITY
!   NBICOP :    -    -      -    OF SURFACE PRESSURE

!   NBICPD :    -    -      -    OF PRESSURE DEPARTURE
!   NBICVD :    -    -      -    OF VERTICAL DIVERGENCE
!   NBICNHX:    -    -      -    OF THE "X" TERM (NH model)

!   READING OF NBICx SWITCHES: NBICx = 0: NO COUPLING
!                                    = 1: DEFAULT COUPLING
!                                    = 2: SPECIFIC COUPLING FUNCTION

!   NECRIPL: SWITCH FOR TIMELEVEL OF COUPLING
!           NECRIPL = 0    COUPLING AT T0
!                   = 1    COUPLING AT T1
!                   = 2    COUPLING AT BOTH TIME LEVELS

!       LQCPL : Logical option, if TRUE, then LBC are intrpolated
!               quadratic, if FALSE, then linear
!       NDD01 : Indikation of proper part of gt3buf for writing of lbc
!               in 0*NEFRCL and 1*NEFRCL

!  == SWITCHES APPLIED TO THE COUPLING IN THE TL/AD MODELS ==
!  NECOAD : Controls the adjoint coupling in the adjoint model:
!           0   - no coupling
!           < 0 - coupling with the Davies relaxation
!           -1  - adjoint of the linear time interpolation is switched on
!           > 0 - coupling other than Davies relaxation (to be implemented)
!  NECOTL : Controls the coupling in the tangent linear model:
!           0   - no coupling
!           < 0 - coupling with the Davies relaxation
!           -1  - the linear time interpolation is switched on
!           > 0 - coupling other than Davies relaxation (to be implemented)
!  LE0COTA: TRUE if the relaxation in the I+E zone is towards
!                nullified boundary conditions (assumed exact)
!                le0cota has the same meaning in the TL and AD models
!                (respectively, relaxation to 0 perturbation or sensitivity)
!           FALSE if the relaxation is towards a predefined forcing
!  LEREADINI: TRUE if initial historical file has to be read
!             (used for E501, E801 - not a namelist parameter)
!  N1LSG  : if =1, the gradient with respect to the large scale
!                coupling data has to be written into a file
!                (gradient to gt3buf, therefore the file will contain
!                series of horizontal gridpoint fields)
!  NFRLSG : frequency of writing large scale gradients(time or steps)
!  NLSGTS : array containing large scale gradients timesteps
!     Explanation :
!         1) if NLSGTS(0)=0 action if MOD(JSTEP,NFRLSG)=0
!         2) if NLSGTS(0)>0 NLSGTS(0) significant numbers
!               in NLSGTS are then considered and action for
!               JSTEP=NLSGTS(.)*NFRLSG
!         3) if NLSGTS(0)<0 action for JSTEP=(NLSGTS(.)/DELTAT)*NFRLSG
!  LRDLSG : switch for using boundary data perturbation in conf 1 
!           for sensitivity forecast run (default =.F.)
!  LEQLIMSAT : switch to call sueqlimsat in cnt3 in order to force
!              relative humidity between 0. and 100 %    
!  RLSDX  : scaling coeficient for the lateral boundary perturbation
!             (default value 0.)
!  NECRILSG : switch for reading LSG file (default =0)
!              = 0    reading only the first LSGxxxxGT3B+0000 file
!              = 1    reading LSG at all coupling moments
 
!  LESPCPL: control of spectral coupling

REAL(KIND=JPRB) :: RLSDX
INTEGER(KIND=JPIM), PARAMETER :: JPLSGT=20
INTEGER(KIND=JPIM) :: NLSGTS(0:JPLSGT)
INTEGER(KIND=JPIM) :: NLAM
INTEGER(KIND=JPIM) :: NBICOU
INTEGER(KIND=JPIM) :: NBICOT
INTEGER(KIND=JPIM) :: NBICOQ
INTEGER(KIND=JPIM) :: NBICOP
INTEGER(KIND=JPIM) :: NBICPD
INTEGER(KIND=JPIM) :: NBICVD
INTEGER(KIND=JPIM) :: NBICNHX
INTEGER(KIND=JPIM) :: NECRIPL
INTEGER(KIND=JPIM) :: NDD01
INTEGER(KIND=JPIM) :: NFRLSG
INTEGER(KIND=JPIM) :: NECRILSG
INTEGER(KIND=JPIM) :: N1LSG

LOGICAL :: LQCPL

INTEGER(KIND=JPIM) :: NECOAD
INTEGER(KIND=JPIM) :: NECOTL
LOGICAL :: LE0COTA
LOGICAL :: LEREADINI
LOGICAL :: LRDLSG
LOGICAL :: LEQLIMSAT

LOGICAL :: LESPCPL
!     ------------------------------------------------------------------
END MODULE YEMCT0
