#ifdef VPP
!OCL SCALAR
#endif
SUBROUTINE SUCT0(KULOUT)

USE PARKIND1 , ONLY : JPIM     ,JPRB
USE YEMCT0   , ONLY : NFRLSG, LRDLSG, LE0COTA, NECOAD, NECOTL, N1LSG
USE YOMARG   , ONLY : NUCONF   ,NUSTOP   ,NUECMWF  ,NUSLAG   ,NARGS    , &
 &                    CUNMEXP  ,LUELAM   ,UGEMU    ,UTSTEP
USE YOMCT0   , ONLY : JPNPST   ,NPOSTS   ,NHISTS   ,NPISPS   ,NGDITS   , &
 &                    NSDITS   ,NDHFGTS  ,NDHFZTS  ,NDHFDTS  ,NDHPTS   , &
 &                    NMASSCONS,CNMEXP   ,CFPNCF   ,CFCLASS  ,CTYPE    , &
 &                    CNPPATH  ,CFDIRLST ,CNDISPP  ,NCONF    ,NTASKS   , &
 &                    NCYCLE   ,NSTART   ,NSTOP    ,NQUAD    ,N2DINI   , &
 &                    NSPPR    ,NFRPOS   ,NFRISP   ,NFRHIS   ,N3DINI   , &
 &                    NFRGDI   ,NFRSDI   ,NCNTVAR  ,NFRDHFG  ,NFRDHFZ  , &
 &                    NFRDHFD  ,NFRDHP   ,NFRCO    ,NFRCO_CHEM, NFRCO_VEG, LTM5CO2, NLEV_TM5, NPRGPEW  ,NPRINTLEV, &
 &                    NFRMASSCON,N6BINS  ,LNF      ,LWROUTLAST, LFDBOP   ,LGRBOP   , &
 &                    LARPEGEF ,LSMSSIG  ,LSLAG    ,LAPRXPK  ,LTWOTL   , &
 &                    LARPEGEF_TRAJHR    ,LARPEGEF_TRAJBG,LVFE_REGETA  , &
 &                    LFPSPEC  , &
 &                    LFPOS    ,LFPART2  ,LOPDIS   ,LREGETA  ,LSPRT    , &
 &                    LNHDYN   ,LCANARI  ,LOLDPP   ,LGUESS   ,LOBS     , &
 &                    LOBSC1   ,LOBSREF  ,LSIMOB   ,LELAM    ,LRPLANE  , &
 &                    LFBDAP   ,LBACKG   ,LMINIM   ,LSCREEN  ,LREFOUT  , &
 &                    L_SCREEN_CALL, L_SPLIT_SCREEN                    , &
 &                    LRFRIC   ,LALLOPR  ,LSITRIC  ,LNOBGON  ,LREFGEN  , &
 &                    LCASIG   ,LRUBC    ,LRETCFOU ,LWRTCFOU ,           &
 &                    LRFOUTCNORM        ,LRGPTCNORM         ,LVERCOR  , &
 &                    NPROC    ,LIFSTRAJ ,LIFSMIN  ,LPC_FULL ,LPC_NESC , &
 &                    LPC_OLD  ,LTENC    ,LALLTC   ,RTENC    ,LAROME   , &
 &                    LPC_CHEAP,LPC_NESCT, &
 &                    NINTERPTRAJ, NINTERPINCR     ,LSCREEN_OPENMP,&
 &                    NFRCORM,LSFORC,LSCMEC,LSPBSBAL,NSHISTS,NFSRHIS, &
 &                    LARPEGEF_RDGP_INIT,LARPEGEF_RDGP_TRAJHR,LARPEGEF_RDGP_TRAJBG
USE YOMCT0B  , ONLY : LECMWF
USE YOMCVER  , ONLY : LVERTFE  ,NVSCH    ,LVSPLIP
USE YOMFPC   , ONLY : CFPFMT   ,LFPNHPD  ,LFPNHVD
USE YOMGSTATS, ONLY : LSYNCSTATS         ,LSTATS   ,LSTATS_OMP         , &
 &                    LSTATS_COMMS       ,LTRACE_STATS       ,           &
 &                    LDETAILED_STATS    ,LXML_STATS
USE YOMHOOK  , ONLY : LHOOK    ,DR_HOOK
USE YOMIOPNH , ONLY : LTRAJNH
USE YOMLUN   , ONLY : NULOUT   ,NULNAM   
USE YOMMP    , ONLY : MP_TYPE  ,MBX_SIZE
USE YOMOP    , ONLY : CFPATH
USE YOMPLDSW , ONLY : LOPT_SCALAR,LOPT_RS6K
USE YOMSLPHY , ONLY : LSLPHY
USE YOMSLREP , ONLY : LSLADREP ,LVECADIN

!**** *SUCT0*   - Routine to initialize level 0 control common

!     Purpose.
!     --------
!           Initialize level 0 control commons
!**   Interface.
!     ----------
!        *CALL* *SUCT0(KULOUT)

!        Explicit arguments :
!        --------------------
!        KULOUT : Logical unit for the output

!        Implicit arguments :
!        --------------------
!        COMMON YOMCT0
!        COMMON YOMCT0B
!        COMMON YOMARG

!     Method.
!     -------
!        See documentation

!     Externals.
!     ----------
!        Called by SU0YOMA.

!     Reference.
!     ----------
!        ECMWF Research Department documentation of the IFS

!     Author.
!     -------
!        Mats Hamrud and Philippe Courtier  *ECMWF*

! Modifications
! -------------
!   Original : 87-10-15
!   MODIFIED : 90-06-20 BY D. VASILJEVIC & J. PAILLEUX TO CATER FOR
!                          SIMULATED OBSERVATIONS
!   Modified by W. HECKLEY   : 91-10-10
!   Modified by C.Dreveton   : 92.05.25 (frequency of coupled fields)
!   Modified by R.El Khatib  : 92.09.16 (logical LFBDAP to write some
!                              diagnostics on trajectory files)
!   Modified by K. YESSAD    : DEC 1992 (adding logicals LVENIN, LREGETA).
!   Modified by R. EL Khatib : 93-04-02 Set-up defaults controled by LECMWF
!   Modified by K. YESSAD    : 08/03/1993 (adding LHDCDIV,LHDCVOR,
!                              LHDCHV,LHDCSV).
!   R. El Khatib  :93-05-06 Set-up through command line
!   M. Hamrud     :93-07-05 Make use of above for ECMWF
!   Modified by K. YESSAD    : OCTOBER 1993. Semi-implicit scheme with
!                              not reduced divergence.
!   R. El Khatib  :94-03-02 Full-POS inplementation
!   C. Temperton : 94-05-18 Spectral RT option
!   M.Hamrud      :94-04-08 Upper air gridpoint workfile
!   R. El Khatib  :94-08-30 Memory savings for off-line Full-Pos
!   Ryad El Khatib- 94/11/10 LNHDYN : switch for non-ydrostatic dynamics
!   K. YESSAD (APRIL 1994): unified horizontal diffusion scheme.
!   M. Tolstykh   :31-08-94 CUD interpolation, modified decentering
!                  in semi-Lagrangian scheme
!   L. Isaksen    :95-06-06 LMESSP : distributed memory switch
!   F. Bouttier   :96-02-08 Preset NCONF to imply other defaults
!   Modified : 95-11-16 Ryad El Khatib (Fullpos LFPART2 without arguments)
!   Modified : 95-11-16 Ryad El Khatib (Fullpos : IO switches on 
!                       safe-keeping gridpoint files)
!   K. YESSAD (NOV 1995): removal of HDC horizontal diffusion scheme.
!   F. Veerse     :96.01.22 Command line dependent variational setup
!   C. Temperton  :96-05-17 New semi-implicit solver
!   Modified SEPT 1996 by  K. YESSAD: Spectral transforms for
!                                     transmission coefficients
!   Modified OCT 1996 by K. YESSAD: removal of variable uncentering.
!   M. Tolstykh : (OCT 1996) Fourier space horizontal diffusion.
!   C. Temperton  :96-10-23 Two-time-level scheme becomes default
!   G. Radnoti:   (DEC 1996) Spectral blending for ALADIN
!   C. Temperton  :98-01-22 Option to call new FFT992 routine
!   R. El Khatib  :97-06-02 3 NH fields
!   M. Siroka :   97-11-13 : protect LTREC and LWRTC in lam case
!   P. Le Moigne: 97-10-24   setup of LELAM
!   Modified 98-08-10 by K. YESSAD: removal of LRPOLE option.
!    - removal of LRPOLE in YOMCT0 and NAMCT0.
!    - removal of LRPOLE calculation.
!   Modified 98-09-01 by N. Wedi, sl-physics
!   C. Fischer+C. Soci 98-09-24: NTRALO=1 for 801 / meteo-france
!   Modified 98-12-04 by K. YESSAD: new option 'lradvtoro'.
!   M. Charron :  99-02-01 non-hydrostatic
!   Modified 99-02-17 by K. YESSAD: options LRETCFOU, LWRTCFOU.
!   Modified 99-03-31 by P. SMOLIKOVA: option LRDAORG (double averaging).
!   C. Temperton : 00-11-06 LSLPHY only allowed if LTWOTL is true.
!   Modified 00-08-07 by K. YESSAD: relaxation of thin layer hypothesis.
!   Modified 00-12-18 by P. SAEZ: only 1 proc with C901 and C923
!   D.Salmond (15-10-01) FULLIMP mods
!   R. El Khatib  : 01-03-19 N3DINI+LFPART2 for tests
!   Modified 01-07-06 by K. YESSAD: lvercor=.true. for SL3TL.
!   Modified 01-08-30 by K. YESSAD: pruning and some other cleanings.
!   R. El Khatib 02-01-21 default value for LSLAG
!   Modified 03-01-03 by J. HAGUE: added MASS VF Option (N_VMASS)
!   J. Vivoda 03-2002 PC schemes for NH dynamics (LPC_XXXX keys)
!   Modified 02-09-06 by C. Moussy( via jma): LTENC,LALLTC,RTENC
!   Modified 03-01-21 by D.Giard : no LSLAG for creation of clim files
!   01-Oct-2003 M. Hamrud   CY28 Cleaning
!      Dec-2003 K. YESSAD   remove NOPGMR; move LSIDG to SUDYN/YOMDYN.
!   26-Feb-2004 C. Fischer  some extra default initialization for yemct0
!   09-Jun-2004 J. Masek    NH cleaning (LPC_NOTR, LFULLIMP, LVSLWBC)
!   07-Jul-2004 K. Yessad   LPC_XIDT has moved in YOMDYN/SUDYN.
!   21-Jan-2004 C. Temperton Fix for SWE
!   21-Dec-2004 S. Saarinen Introduced LSCREEN_OPENMP
!   15-Mar-2005 R. El Khatib Setup N_VMASS moved to SUJFH
!   25-Nov-2004 Y. Seity Init. LAROME key
!   G. Desroziers and K. Yessad (sept 2005):
!    - split option LTRAJHR into LTRAJHR_ALTI and LTRAJHR_SURF.
!    - adapt option LTRAJHR to METEO-FRANCE configurations.
!   16-Jan-2006 A. Alias Init. CLIMATE (NFRCORM)
!   06-Jun-2006 M. Ko"hler  Single Column Model option (LSCMEC) 
!   15-May-2006 K. Yessad: ABOR1 when LSPRT with EUL scheme.
!   N. Wedi and K. Yessad (Jan 2008): different dev for NH model and PC scheme
!   23-Oct-2008 R. El Khatib CFPATH now a directory ending with a '/'
!   K. Yessad (Sep 2008): prune conf 951.
!   K. Yessad (Sep 2008): LREGETA -> LREGETA+LVFE_REGETA.
! End Modifications
!------------------------------------------------------------------

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KULOUT 

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

INTEGER(KIND=JPIM) :: J,ICONF
LOGICAL :: LL2D,LLVERCOR,LL_CONF_EXISTS,LL_CONF_ONEPROCONLY
REAL(KIND=JPRB) :: ZUNIT
REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

#include "abor1.intfb.h"
#include "posnam.intfb.h"

#include "namct0.h"

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

IF (LHOOK) CALL DR_HOOK('SUCT0',0,ZHOOK_HANDLE)

!      ----------------------------------------------------------------
!*       1.    SET DEFAULT VALUES.
!              -------------------

!     1.1 Set implicit default values

IF (NCONF < 1) NCONF=1
NFRLSG=1
LE0COTA=.FALSE.
NECOAD=0
NECOTL=0
N1LSG=0
LSLAG=.TRUE.

LPC_FULL=.FALSE.
LPC_CHEAP=.FALSE.
LPC_NESCT=.FALSE.
LPC_NESC=.FALSE.
LPC_OLD =.FALSE.

!     Forcing
LSFORC=.FALSE.

LFPSPEC=.FALSE.

!     Model
IF (LFPART2) THEN
  LELAM=(CFPFMT == 'LELAM').OR.(CFPFMT == 'LALON')
  LRPLANE=CFPFMT == 'LELAM'
ELSE
  IF (NARGS /= 0) THEN
    LELAM=LUELAM
    IF (LELAM) THEN
      LRPLANE=UGEMU(2) >= 0.0_JPRB
    ELSE
      LRPLANE=.FALSE.
    ENDIF
  ELSE
    LELAM  =.FALSE.
    LRPLANE=.FALSE.
  ENDIF
ENDIF
!     Version and name of experiment 
IF (.NOT.LFPART2) THEN
  IF (NARGS /= 0) THEN
    IF(NUECMWF == 1) THEN
      LECMWF=.TRUE.
    ELSEIF (NUECMWF == 2) THEN
      LECMWF=.FALSE.
    ENDIF
    CNMEXP=CUNMEXP
  ELSE
    LECMWF=.TRUE.
    CALL POSNAM(NULNAM,'NAMCT0')
    READ(NULNAM,NAMCT0)
    CNMEXP='0123'
  ENDIF
ENDIF

! AROME key
LAROME=.FALSE.

! ECMWF Single Column Model off by default
LSCMEC=.FALSE.

!     Quadrature
NQUAD =1

!     Interpolation methods applied to trajectory and increments
NINTERPTRAJ =1
NINTERPINCR =1

!     Configuration
IF (NUCONF > 0) THEN
  NCONF=NUCONF
!     else NCONF is the namelist value (default is 1)
ENDIF

LL2D=(NCONF/100 == 2).OR.(MOD(NCONF,100)/10 == 2)
IF (LL2D.AND.NPRGPEW > 1) THEN
  WRITE (KULOUT,*)
  WRITE (KULOUT,*) ' ABORT IN SUCT0!'
  WRITE (KULOUT,*) '  NPRGPEW MUST BE 1 FOR 2D-MODEL'
  WRITE (KULOUT,*) '  CONFIGURATIONS'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF
!     Number of time steps
IF(NUSTOP >= 0) THEN
  NSTOP=NUSTOP
ELSE
  NSTOP=2
ENDIF
!     Advection scheme
IF(NUSLAG >= 0) LSLAG=(NUSLAG==3)
! Tendency coupling in ALADIN
LTENC = .FALSE.
LALLTC = .FALSE.
RTENC = 1.0_JPRB

!     Other variables may depend of the previous ones and the command line arg.

LALLOPR  =.FALSE.
NPRINTLEV= 0
NFRMASSCON=NSTOP+999999
NMASSCONS(:)=0

LSCREEN =.FALSE.
LSCREEN_OPENMP =.TRUE.
L_SPLIT_SCREEN=.FALSE.
L_SCREEN_CALL=.TRUE.
LREFOUT =.FALSE.
LREFGEN =.FALSE.
LSPBSBAL=.FALSE.
LOLDPP  =.FALSE.
LOPDIS=.TRUE.
NTASKS = 1
IF (LECMWF) THEN
  LOLDPP  =.TRUE.
  LTWOTL=.TRUE.
  LSPRT =.TRUE.
  LSITRIC=.FALSE.
  LRFRIC=.TRUE.
  LNHDYN=.FALSE.
  LTRAJNH=.FALSE.
  LRUBC =.FALSE.
  LOBSC1=.FALSE.
  LOBS  =.FALSE.
  LSLPHY=.TRUE.
  NFSRHIS=1
  NSHISTS(:)=0
  IF(NUCONF == 2) THEN
    LOBSC1=.TRUE.
    NUCONF=1
    NCONF=1
    LIFSTRAJ=.true.
  ELSE
    LIFSTRAJ=.false.
  ENDIF
  IF(.NOT.LNHDYN .AND. .NOT.LL2D) THEN
    IF(LSLAG) THEN
      LVERTFE=.TRUE.
      NVSCH=3
    ELSE
      LVERTFE=.FALSE.
      NVSCH=0
    ENDIF
  ELSE
    LVERTFE=.FALSE.
    NVSCH=0
  ENDIF
  IF(NCONF == 1 .OR. NCONF == 302) THEN
!!!    LVSPLIP=.TRUE.
    LVSPLIP=.FALSE.
  ELSE
    LVSPLIP=.FALSE.
  ENDIF
  LAPRXPK=.TRUE.
  LARPEGEF=.FALSE.
  LARPEGEF_TRAJHR=.FALSE.
  LARPEGEF_TRAJBG=.FALSE.
  LARPEGEF_RDGP_INIT=.FALSE.
  LARPEGEF_RDGP_TRAJHR=.FALSE.
  LARPEGEF_RDGP_TRAJBG=.FALSE.
  LGRBOP  =.TRUE.
  LFDBOP  =.TRUE.
  IF((NCONF == 1.OR.NCONF == 302).AND.LOBSC1) THEN
    LOBS=.TRUE.
    NFRHIS=1000
    NHISTS(0)=1
    NHISTS(1)=1
  ENDIF
  IF(NCONF/100 == 1) THEN
    LOBS=.TRUE.
  ENDIF
  IF(NCONF /= 1 .AND. NCONF /= 302) THEN
    LOPDIS=.FALSE.
  ENDIF
  LSMSSIG =.FALSE.
  LFBDAP=.FALSE.
  LNF   =.TRUE.
  LWROUTLAST=.TRUE.
  CFPATH='./ '
  CFCLASS='rd'
  IF (ABS(NCONF)/100 == 8) THEN
    CTYPE='sg'
  ELSE
    CTYPE='fc'
  ENDIF
  CNPPATH=' '
  CNDISPP=' '
  CFDIRLST=' '
  NSTART=0
  N2DINI=1
  N3DINI=0
  NSPPR =0
  NFRPOS=NSTOP
  NFRISP=1
  NFRHIS=NSTOP
  NFRCO =0
  NFRCO_CHEM=0
  NFRCO_VEG=0
  NFRGDI=1
  NFRSDI=24
  NFRDHFG=4
  NFRDHFZ=4
  NFRDHFD=4
  NFRDHP=48
  N6BINS=6
  DO J=0,JPNPST
    NPOSTS(J)=0
    NPISPS(J)=0
    NHISTS(J)=0
    NGDITS(J)=0
    NSDITS(J)=0
    NDHFGTS(J)=0
    NDHFZTS(J)=0
    NDHFDTS(J)=0
    NDHPTS(J)=0
  ENDDO
  NPISPS(0)=1
  NPISPS(1)=100000
  LCANARI=.FALSE.
  LNOBGON=.FALSE.
  IF (NCONF==131) THEN
    LGUESS=.TRUE.
  ELSE
    LGUESS=.FALSE.
  ENDIF
  IF(NCONF/100 == 1)THEN
    LBACKG=.TRUE.
  ELSE
    LBACKG=.FALSE.
  ENDIF
  IF ((NCONF/100 == 1).OR.(NCONF/100 == 8).OR.(NCONF == 923))THEN
    LMINIM=.TRUE.
  ELSE
    LMINIM=.FALSE.
  ENDIF
  LOBSREF=.FALSE.
  LSIMOB=.FALSE.
  NCNTVAR = 2
  LREGETA=.FALSE.
  LVFE_REGETA=.FALSE.
  LFPOS=.FALSE.
  CFPNCF='ncf927'
ELSE
  IF(NUCONF == 2) THEN
    LOBSC1=.TRUE.
    NUCONF=1
    NCONF=1
    LOBS=.TRUE.
    NFRHIS=1000
    NHISTS(0)=1
    NHISTS(1)=1
  ELSE
    LOBSC1=.FALSE.
    LOBS=.FALSE.
  ENDIF
  LSLPHY=.FALSE.
  LTWOTL=.TRUE.
  LVERTFE=.FALSE.
  LVSPLIP=.FALSE.
  LSPRT =.FALSE.
  LSITRIC=.FALSE.
  LRFRIC=.FALSE.
  LNHDYN=.FALSE.
  LTRAJNH=.FALSE.
  LRUBC =.FALSE.
  LARPEGEF=.TRUE.
  LARPEGEF_TRAJHR=.TRUE.
  LARPEGEF_TRAJBG=.TRUE.
  LARPEGEF_RDGP_INIT=.FALSE.
  LARPEGEF_RDGP_TRAJHR=.FALSE.
  LARPEGEF_RDGP_TRAJBG=.FALSE.
  LAPRXPK=.FALSE.
  LFBDAP=.TRUE.
  NFSRHIS=1
  NSHISTS(:)=0
  IF (NARGS /= 0.OR.LFPART2) THEN
    IF (NCONF == 1 .OR. NCONF == 302) THEN
      NFRHIS=1
      NHISTS(0)=-10
      NHISTS(1)=-0
      NHISTS(2)=-6
      NHISTS(3)=-12
      NHISTS(4)=-18
      NHISTS(5)=-24
      NHISTS(6)=-30
      NHISTS(7)=-36
      NHISTS(8)=-48
      NHISTS(9)=-60
      NHISTS(10)=-72
      NFRPOS=1
      NPOSTS(0)=-10
      NPOSTS(1)=-0
      NPOSTS(2)=-6
      NPOSTS(3)=-12
      NPOSTS(4)=-18
      NPOSTS(5)=-24
      NPOSTS(6)=-30
      NPOSTS(7)=-36
      NPOSTS(8)=-48
      NPOSTS(9)=-60
      NPOSTS(10)=-72
      NFRSDI=20
      NFRISP=1
      DO J=11,JPNPST
        NPOSTS(J)=0
        NHISTS(J)=0
      ENDDO
      DO J=0,JPNPST
        NGDITS(J)=0
        NSDITS(J)=0
        NDHFGTS(J)=0
        NDHFZTS(J)=0
        NDHFDTS(J)=0
        NDHPTS(J)=0
        NPISPS(J)=0
      ENDDO
      NPISPS(0)=1
      NPISPS(1)=100000
    ELSEIF (NCONF == 701) THEN
      NFRHIS=1
      NFRPOS=4
      NFRISP=1
      NFRSDI=1
      NHISTS(0)=-1
      NHISTS(1)=-0
      DO J=0,JPNPST
        NPOSTS(J)=0
        NPISPS(J)=0
        NGDITS(J)=0
        NSDITS(J)=0
        NDHFGTS(J)=0
        NDHFZTS(J)=0
        NDHFDTS(J)=0
        NDHPTS(J)=0
      ENDDO
      NPISPS(0)=1
      NPISPS(1)=100000
      DO J=2,JPNPST
        NHISTS(J)=0
      ENDDO
    ELSEIF (NCONF == 131) THEN
      NFRHIS=1
      NFRPOS=4
      NFRSDI=1
      NFRISP=1
      DO J=0,JPNPST
        NPOSTS(J)=0
        NHISTS(J)=0
        NGDITS(J)=0
        NPISPS(J)=0
        NSDITS(J)=0
        NDHFGTS(J)=0
        NDHFZTS(J)=0
        NDHFDTS(J)=0
        NDHPTS(J)=0
      ENDDO
    ENDIF
  ELSE
    NFRHIS=1
    NFRPOS=4
    NFRISP=1
    NFRSDI=1
    DO J=0,JPNPST
      NPOSTS(J)=0
      NPISPS(J)=0
      NHISTS(J)=0
      NGDITS(J)=0
      NSDITS(J)=0
      NDHFGTS(J)=0
      NDHFZTS(J)=0
      NDHFDTS(J)=0
      NDHPTS(J)=0
    ENDDO
    NPISPS(0)=1
    NPISPS(1)=100000
  ENDIF
  LREGETA=.FALSE.
  LVFE_REGETA=.FALSE.
  IF (NCONF == 701) THEN
    LCANARI=.TRUE.
    LSIMOB=.FALSE.
    LOBS=.TRUE.
  ELSE
    LCANARI=.FALSE.
    LSIMOB=.TRUE.
    LOBS=.FALSE.
  ENDIF
  LSMSSIG =.FALSE.
  LFDBOP=.FALSE.
  LGRBOP=.FALSE.
  LNF   =.TRUE.
  LWROUTLAST=.TRUE.
  NCYCLE=0
  CFPATH='./ '
  CFCLASS='rd'
  IF (ABS(NCONF)/100 == 8) THEN
    CTYPE='sg'
  ELSE
    CTYPE='fc'
  ENDIF
  CNPPATH=' '
  CNDISPP=' '
  CFDIRLST=' '
  NSTART=0
  N2DINI=1
  N3DINI=0
  NSPPR =0
  ! EC-EARTH coupling switches
  NFRCO =0
  NFRCO_CHEM =0
  NFRCO_VEG=0
  LTM5CO2=.FALSE.
  NLEV_TM5=999
  !
  NFRGDI=1
  NFRDHFG=4
  NFRDHFZ=4
  NFRDHFD=4
  NFRDHP=48
  LGUESS=.TRUE.
  IF(NCONF/100 == 1)THEN
    LBACKG=.TRUE.
  ELSE
    LBACKG=.FALSE.
  ENDIF
  IF ((NCONF/100 == 1).OR.(NCONF/100 == 8).OR.(NCONF == 923))THEN
    LMINIM=.TRUE.
  ELSE
    LMINIM=.FALSE.
  ENDIF
  LOBSREF=.FALSE.
  NCNTVAR = 2
  LFPOS=.FALSE.
  CFPNCF='ncf927'
ENDIF

LRETCFOU=.FALSE.
LWRTCFOU=.FALSE.
LRFOUTCNORM=.FALSE.
LRGPTCNORM=.FALSE.
LCASIG=.FALSE.
LVERCOR=.FALSE.

LSLADREP=.FALSE.
IF(LOPT_SCALAR) THEN
  LVECADIN=.FALSE.
ELSE
  LVECADIN=.TRUE.
ENDIF  

NFRCORM=0

!      ----------------------------------------------------------------
!*       2.    Modifies default values.
!              -----------------------

!        2.1   Read namelist

CALL POSNAM(NULNAM,'NAMCT0')
READ(NULNAM,NAMCT0)

!        2.2   Overwrite namelist with command line arguments

IF (NARGS /= 0) THEN
  IF (NUCONF > 0 .AND. NCONF /= NUCONF .AND. NCONF /= 302) THEN
    NCONF=NUCONF
    WRITE(NULOUT,*) 'NCONF   OVERWRITTEN BY COMAND LINE'
  ENDIF
  IF (LUELAM.AND..NOT.LELAM) THEN
    LELAM=LUELAM
    WRITE(NULOUT,*) 'LELAM OVERWRITTEN BY COMAND LINE'
  ENDIF
  IF (LELAM) THEN
    IF(LRPLANE.AND.UGEMU(2) < 0.0_JPRB) THEN
      LRPLANE=.FALSE.
      WRITE(NULOUT,*) 'LRPLANE OVERWRITTEN BY COMAND LINE'
    ENDIF
  ENDIF
  IF((NUECMWF == 1).AND.(.NOT.LECMWF)) THEN
    LECMWF=.TRUE.
    WRITE(NULOUT,*) 'LECMWF  OVERWRITTEN BY COMAND LINE'
  ELSEIF((NUECMWF == 2).AND.(LECMWF)) THEN
    LECMWF=.FALSE.
    WRITE(NULOUT,*) 'LECMWF  OVERWRITTEN BY COMAND LINE'
  ENDIF
  IF (CNMEXP /= CUNMEXP) THEN
    CNMEXP=CUNMEXP
    WRITE(NULOUT,*) 'CNMEXP  OVERWRITTEN BY COMAND LINE'
  ENDIF
  IF (NUSTOP >= 0 .AND. NSTOP /= NUSTOP) THEN
    NSTOP=NUSTOP
    WRITE(NULOUT,*) 'NSTOP   OVERWRITTEN BY COMAND LINE'
  ENDIF
  IF (NUSLAG == 1.AND.LSLAG) THEN
    LSLAG=.FALSE.
    WRITE(NULOUT,*) 'LSLAG   OVERWRITTEN BY COMAND LINE'
  ELSEIF((NUSLAG == 3).AND.(.NOT.LSLAG)) THEN
    LSLAG=.TRUE.
    WRITE(NULOUT,*) 'LSLAG   OVERWRITTEN BY COMAND LINE'
  ENDIF
ENDIF

!        2.3   Reset values and test

IF (.NOT.LECMWF.AND..NOT.LFPOS) THEN
  CNPPATH=' '
ENDIF

ZUNIT=3600._JPRB
IF ((UTSTEP > 0.0_JPRB).AND.(NFRPOS < 0)) THEN
  NFRPOS=NINT((REAL(-NFRPOS,JPRB)*ZUNIT)/UTSTEP)
ENDIF
IF ((UTSTEP > 0.0_JPRB).AND.(NFRISP < 0)) THEN
  NFRISP=NINT((REAL(-NFRISP,JPRB)*ZUNIT)/UTSTEP)
ENDIF
IF ((UTSTEP > 0.0_JPRB).AND.(NFRHIS < 0)) THEN
  NFRHIS=NINT((REAL(-NFRHIS,JPRB)*ZUNIT)/UTSTEP)
ENDIF
IF ((UTSTEP > 0.0_JPRB).AND.(NFSRHIS < 0)) THEN
  NFSRHIS=NINT((REAL(-NFSRHIS,JPRB)*ZUNIT)/UTSTEP)
ENDIF
IF ((UTSTEP > 0.0_JPRB).AND.(NFRSDI < 0)) THEN
  NFRSDI=NINT((REAL(-NFRSDI,JPRB)*ZUNIT)/UTSTEP)
ENDIF

ICONF=NCONF/100

IF (LFPART2) THEN
  N3DINI=0
  LSLAG=.FALSE.
  LFPOS=.TRUE.
  CTYPE='an'
  IF (LFPNHPD.AND.LFPNHVD) THEN
    LNHDYN=.TRUE.
  ELSEIF (LFPNHPD.OR.LFPNHVD) THEN
    IF (LFPNHPD) THEN
      WRITE (KULOUT,*) 'VERTICAL DIVERGENCE MISSING IN REQUEST'
    ELSE
      WRITE (KULOUT,*) 'PRESSURE DEPARTURE MISSING IN REQUEST'
    ENDIF
    CALL ABOR1('SUCT0: ABOR1 CALLED')
  ENDIF
ENDIF
IF ( NCONF /= 131 .AND. NCONF /= 701 ) THEN
  LSIMOB=.TRUE.
ENDIF

IF (NCONF /= 1 .AND. NCONF /= 302) LOBSC1=.FALSE.
IF (LOBSC1) LSIMOB=.FALSE.
IF (LSIMOB) NCNTVAR=1
IF (NCONF == 801 .AND. LBACKG) NCNTVAR=2
IF (NPRINTLEV > 0) LOPDIS = .TRUE.
IF (NCONF == 701) LSPRT = .FALSE.

IF (NCONF == 131) THEN
  LOBSREF = .TRUE.
ELSE
  LOBSREF = .FALSE.
ENDIF

! * Ask for non-existing configuration?
LL_CONF_EXISTS=(NCONF == 1) &
 & .OR.(NCONF == 131) &
 & .OR.(NCONF == 201).OR.(NCONF == 202) &
 & .OR.(NCONF == 302) &
 & .OR.(NCONF == 401).OR.(NCONF == 421).OR.(NCONF == 422) &
 & .OR.(NCONF == 501).OR.(NCONF == 521).OR.(NCONF == 522) &
 & .OR.(NCONF == 601) &
 & .OR.(NCONF == 701) &
 & .OR.(NCONF == 801) &
 & .OR.(NCONF == 901).OR.(NCONF == 903) &
 & .OR.(NCONF == 911).OR.(NCONF == 912) &
 & .OR.(NCONF == 923) &
 & .OR.(NCONF == 931).OR.(NCONF == 932) &
 & .OR.(NCONF == 940)
IF (.NOT.LL_CONF_EXISTS) THEN
  WRITE (KULOUT,*) 'SUCT0: NCONF=',NCONF,' does not exist.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Ask for SL scheme for configurations coded only for Eulerian scheme?
IF(LSLAG .AND. (NCONF == 202 .OR. NCONF == 422 .OR. NCONF == 522)) THEN
  WRITE (KULOUT,*)'SEMI-LAGRANGIAN NOT CODED FOR THIS CONFIGURATION!'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * No LSLAG for creation of clim files
IF (LSLAG .AND. NCONF == 923) LSLAG=.FALSE. 

! * Ask for several processors for configurations coded for one processor only?
!   (quid about conf 903,931,932,940 ??)
LL_CONF_ONEPROCONLY=(NCONF == 901) &
 & .OR.(NCONF == 912) &
 & .OR.(NCONF == 923)
IF (NPROC /= 1 .AND. (LL_CONF_ONEPROCONLY)) THEN
  WRITE (KULOUT,*)'SUCT0: must run conf number',NCONF,' with one proc!'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

IF (LFDBOP) THEN
  LGRBOP=.TRUE.
ENDIF

IF (.NOT.LSLAG) THEN
  IF (.NOT.LSCMEC) THEN
    LTWOTL=.FALSE.
  ENDIF
  LVSPLIP=.FALSE.
  LSLPHY=.FALSE.
  LSLADREP=.FALSE.
  LVECADIN=.TRUE.
ENDIF

IF ( LSLPHY.AND.(NCONF /= 1.AND.NCONF /=302)) THEN
  LSLPHY=.FALSE.
ENDIF
ICONF=NCONF/100
LIFSMIN=ANY(SPREAD(ICONF,1,5) ==(/1,4,5,6,8/))
!LIFSMIN=ANY(SPREAD(ICONF,1,6) ==(/1,3,4,5,6,8/))

IF (.NOT.LECMWF) THEN
  ! remark KY+GD: this seems necessary for use at METEO-FRANCE.
  LIFSTRAJ=(NCONF==1)
  WRITE (KULOUT,*)' SUCT0 : LIFSTRAJ=(NCONF==1) ',LIFSTRAJ
ENDIF

! * Use unavailable LSLPHY=T for leap-frog advection schemes?
IF ( LSLPHY.AND..NOT.LTWOTL ) THEN
  WRITE (KULOUT,*)' LSLPHY ONLY ALLOWED WITH TWO-TIME-LEVEL SCHEME!'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Use both LRETCFOU=T and LWRTCFOU=T?
IF (LRETCFOU.AND.LWRTCFOU) THEN
  CALL ABOR1('SUCT0: LRETCFOU and LWRTCFOU cannot be both to TRUE.')
ENDIF

! * reset "lvercor" to .false. in a 2D model.
IF (LVERCOR.AND.LL2D) THEN
  LLVERCOR=.FALSE.
ELSE
  LLVERCOR=LVERCOR
ENDIF
LVERCOR=LLVERCOR

! * provisionally, reset "lvercor" to .false. if "nconf>1" (not yet coded).
IF (LVERCOR.AND.(NCONF /= 1.AND.NCONF /= 302)) THEN
  LLVERCOR=.FALSE.
ELSE
  LLVERCOR=LVERCOR
ENDIF
LVERCOR=LLVERCOR

! * provisionally, reset "lvercor" to .false. if NH model (not yet coded).
IF (LVERCOR.AND.LNHDYN) THEN
  LLVERCOR=.FALSE.
ELSE
  LLVERCOR=LVERCOR
ENDIF
LVERCOR=LLVERCOR

! * caution tendency coupling (use improper value of LTENC?):
IF (.NOT.LTENC.AND.LALLTC) THEN
  CALL ABOR1 ('SUCT0: ABOR1 CALLED: .NOT.LTENC.AND.LALLTC')
ENDIF
IF (LTENC.AND.LRDLSG) THEN
  CALL ABOR1 ('SUCT0: ABOR1 CALLED: LTENC.AND.LRDLSG')
ENDIF

IF(.NOT.LVERTFE) NVSCH=0

! * Use LVERTFE=T when not coded?
!! IF (LVERTFE.AND.LVERCOR) THEN
!!   WRITE (KULOUT,*) 'SUCT0: LVERTFE is coded only for LVERCOR=F.'
!!   CALL ABOR1('SUCT0: ABOR1 CALLED')
!! ENDIF
!! IF (LVERTFE.AND.LSLAG.AND.(.NOT.LTWOTL)) THEN
!!   WRITE (KULOUT,*) 'SUCT0: LVERTFE is coded only for EUL and SL2TL schemes.'
!!   CALL ABOR1('SUCT0: ABOR1 CALLED')
!! ENDIF
! * Switch off LVERTFE for Eulerian advection
!! IF (LVERTFE.AND..NOT.LSLAG) THEN
!!   WRITE (KULOUT,*) 'SUCT0: LVERTFE has been switched off for EUL scheme.'
!!   LVERTFE=.FALSE.
!! ENDIF
IF (LVERTFE.AND.(.NOT.LAPRXPK)) THEN
  WRITE (KULOUT,*) 'SUCT0: if LVERTFE=.TRUE., LAPRXPK must be set to .TRUE.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * No full-type of predictor/corrector in NHS/TL-AD models so far
IF (LNHDYN.AND.(.NOT.LPC_OLD).AND.&
   & (ANY(SPREAD(NCONF,1,4) == (/401,501,601,801/)))) THEN  
  WRITE (KULOUT,*) &
   & 'SUCT0: LNHDYN and LPC_OLD are mandatory for nhs tl ad models'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Use LARPEGEF_TRAJHR=T when LARPEGEF=F?
IF (LARPEGEF_TRAJHR.AND.(.NOT.LARPEGEF)) THEN
  WRITE (KULOUT,*) &
   & 'SUCT0: if LARPEGEF_TRAJHR=.TRUE., LARPEGEF must be set to .TRUE.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Use LARPEGEF_TRAJBG=T when LARPEGEF=F?
IF (LARPEGEF_TRAJBG.AND.(.NOT.LARPEGEF)) THEN
  WRITE (KULOUT,*) &
   & 'SUCT0: if LARPEGEF_TRAJBG=.TRUE., LARPEGEF must be set to .TRUE.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Use LARPEGEF_RDGP=T when LARPEGEF=F?
IF (LARPEGEF_RDGP_INIT.AND.(.NOT.LARPEGEF)) THEN
  WRITE (KULOUT,*) &
   & 'SUCT0: if LARPEGEF_RDGP_INIT=.TRUE., LARPEGEF must be set to .TRUE.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Use LARPEGEF_RDGP_TRAJHR=T when LARPEGEF_TRAJHR=F?
IF (LARPEGEF_RDGP_TRAJHR.AND.(.NOT.LARPEGEF_TRAJHR)) THEN
  WRITE (KULOUT,*) &
   & 'SUCT0: if LARPEGEF_RDGP_TRAJHR=.TRUE., LARPEGEF_TRAJHR must be set to .TRUE.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Use LARPEGEF_RDGP_TRAJBG=T when LARPEGEF_TRAJBG=F?
IF (LARPEGEF_RDGP_TRAJBG.AND.(.NOT.LARPEGEF_TRAJBG)) THEN
  WRITE (KULOUT,*) &
   & 'SUCT0: if LARPEGEF_RDGP_TRAJBG=.TRUE., LARPEGEF_TRAJBG must be set to .TRUE.'
  CALL ABOR1('SUCT0: ABOR1 CALLED')
ENDIF

! * Save T9 arrays in I/O buffer is mandatory in NHS tl ad models
IF (LNHDYN.AND.LPC_OLD.AND.&
   & (ANY(SPREAD(NCONF,1,4) == (/401,501,601,801/)))) THEN  
  LTRAJNH=.TRUE.
ENDIF

!      -----------------------------------------------------------
!*       3.    Print final values.
!              ------------------

WRITE(UNIT=KULOUT,FMT='('' COMMON YOMCT0B '')')
WRITE(UNIT=KULOUT,FMT='('' LECMWF = '',L2)') LECMWF
WRITE(UNIT=KULOUT,FMT='('' LSCMEC = '',L2)') LSCMEC
WRITE(UNIT=KULOUT,FMT='('' COMMON YOMCT0 '')')
WRITE(UNIT=KULOUT,FMT='('' LNF    = '',L2,'' LWROUTLAST = '',L2,'' LFDBOP = '',L2,'' LGRBOP = '',L2 &
 & ,'' LFBDAP = '',L2)')&
 & LNF,LWROUTLAST,LFDBOP,LGRBOP,LFBDAP  
WRITE(UNIT=KULOUT,FMT='('' NCONF  = '',I6 &
 & ,'' NTASKS = '',I6,'' NCYCLE = '',I6 )')&
 & NCONF ,NTASKS,NCYCLE  
WRITE(UNIT=KULOUT,FMT='('' LVERTFE= '',L2,'' NVSCH= '',I2)')LVERTFE,NVSCH
WRITE(UNIT=KULOUT,FMT='('' LVSPLIP = '',L2)') LVSPLIP
WRITE(UNIT=KULOUT,FMT='('' CNMEXP = '',A16)')CNMEXP
WRITE(UNIT=KULOUT,FMT='('' CFPATH  = '',A200)') CFPATH
WRITE(UNIT=KULOUT,FMT='('' LSLAG = '',L2,'' LSLPHY = '',L2)')LSLAG,LSLPHY
WRITE(UNIT=KULOUT,FMT='('' LRUBC = '',L2)') LRUBC
WRITE(UNIT=KULOUT,FMT='('' LSPRT = '',L2,'' LNHDYN = '',L2 &
 & ,'' LTRAJNH = '',L2 &
 & ,'' LTWOTL = '',L2,'' LRFRIC = '',L2)')&
 & LSPRT,LNHDYN,LTRAJNH,LTWOTL,LRFRIC  
WRITE(UNIT=KULOUT,FMT='('' LSITRIC = '',L2)') LSITRIC
WRITE(UNIT=KULOUT,FMT='('' LSLADREP = '',L2)')LSLADREP
WRITE(UNIT=KULOUT,FMT='('' LVECADIN = '',L2)')LVECADIN
IF(LAPRXPK) THEN
  WRITE(UNIT=KULOUT,FMT='(A)') ' LAPRXPK=.TRUE. :'&
   & // ' FULL LEVEL PRESSURES WILL BE CALCULATED ACCORDING TO'  
  WRITE(UNIT=KULOUT,FMT='(A)')&
   & ' THE APPROXIMATE (CHEAPER) DEFINITION:'&
   & // ' PK=(PK+1/2 + PK-1/2) * 0.5   (IN GPPRE)'  
ELSE
  WRITE(UNIT=KULOUT,FMT='(A)') ' LAPRXPK=.FALSE. :'&
   & //' ACCURATE DEFINITION OF FULL LEVELS USED (IN GPPRE)'  
ENDIF
WRITE(UNIT=KULOUT,FMT='('' NQUAD  = '',I6,'' N2DINI = '',I6 &
 & ,'' NSPPR  = '',I6)')&
 & NQUAD,N2DINI,NSPPR  
WRITE(UNIT=KULOUT,FMT='('' NINTERPTRAJ = '',I2, &
 & '' NINTERPINCR = '',I2)') NINTERPTRAJ, NINTERPINCR
WRITE(UNIT=KULOUT,FMT='('' NSTART = '',I6,'' NSTOP  = '',I6 &
 & ,'' NFRPOS = '',I6,'' NFRISP = '',I6, '' NFSRHIS = '',I6 &
 & ,'' NFRHIS = '',I6,'' NFRGDI = '',I6,'' NFRSDI = '',I6)')&
 & NSTART,NSTOP ,NFRPOS,NFRISP,NFSRHIS,NFRHIS,NFRGDI,NFRSDI  
WRITE(UNIT=KULOUT,FMT='('' NFRDHFG = '',I6,'' NFRDHFZ = '',I6,&
 & '' NFRDHFD = '',I6,'' NFRDHP = '',I6,'' N6BINS = '',I6)')&
 & NFRDHFG,NFRDHFZ,NFRDHFD,NFRDHP,N6BINS  
WRITE(UNIT=KULOUT,FMT='('' NFRCO = '',I6)') NFRCO
WRITE(UNIT=KULOUT,FMT='('' NFRCORM = '',I6)') NFRCORM
WRITE(UNIT=KULOUT,FMT='('' NFRCO_CHEM = '',I6)') NFRCO_CHEM
WRITE(UNIT=KULOUT,FMT='('' NFRCO_VEG = '',I6)') NFRCO_VEG

WRITE(KULOUT,*) ' NPOSTS =  ',NPOSTS(0),(NPOSTS(J),J=1,ABS(NPOSTS(0)))
WRITE(KULOUT,*) ' NPISPS =  ',NPISPS(0),(NPISPS(J),J=1,ABS(NPISPS(0)))
WRITE(KULOUT,*) ' NHISTS =  ',NHISTS(0),(NHISTS(J),J=1,ABS(NHISTS(0)))
WRITE(KULOUT,*) ' NSHISTS = ',NSHISTS(0),(NSHISTS(J),J=1,ABS(NSHISTS(0)))
WRITE(KULOUT,*) ' NGDITS =  ',NGDITS(0),(NGDITS(J),J=1,ABS(NGDITS(0)))
WRITE(KULOUT,*) ' NSDITS =  ',NSDITS(0),(NSDITS(J),J=1,ABS(NSDITS(0)))
WRITE(KULOUT,*) ' NDHPTS =  ',NDHPTS(0),(NDHPTS(J),J=1,ABS(NDHPTS(0)))
WRITE(KULOUT,*) ' NDHFGTS = ',NDHFGTS(0),(NDHFGTS(J),J=1,ABS(NDHFGTS(0)))
WRITE(KULOUT,*) ' NDHFZTS = ',NDHFZTS(0),(NDHFZTS(J),J=1,ABS(NDHFZTS(0)))
WRITE(KULOUT,*) ' NDHFDTS = ',NDHFDTS(0),(NDHFDTS(J),J=1,ABS(NDHFDTS(0)))
WRITE(KULOUT,*) ' NMASSCONS = '&
 & ,NMASSCONS(0),(NMASSCONS(J),J=1,ABS(NMASSCONS(0)))  

WRITE(UNIT=KULOUT,FMT='('' LCANARI= '',L2,'' LCASIG= '',L2 &
 & ,'' LGUESS = '',L2,'' LOBSC1 = '',L2 &
 & ,'' LOBSREF= '',L2,'' LOBS = '',L2 &
 & ,'' LSIMOB = '',L2 )')&
 & LCANARI,LCASIG,LGUESS,LOBSC1,LOBSREF,LOBS,LSIMOB  
WRITE(UNIT=KULOUT,FMT='('' LSCREEN = '',L2,'' L_SCREEN_CALL = '',L2, &
 & '' L_SPLIT_SCREEN = '',L2,'' LBACKG = '',L2,'' LMINIM = '',L2)') &
 & LSCREEN,L_SCREEN_CALL,L_SPLIT_SCREEN,LBACKG,LMINIM  
WRITE(UNIT=KULOUT,FMT='('' NPRINTLEV  = '',I2)') NPRINTLEV
WRITE(UNIT=KULOUT &
 & ,FMT='('' LELAM  = '',L2,'' LRPLANE  = '',L2)') LELAM,LRPLANE  
WRITE(UNIT=KULOUT,FMT='('' LREGETA = '',L2)') LREGETA
WRITE(UNIT=KULOUT,FMT='('' LVFE_REGETA = '',L2)') LVFE_REGETA
WRITE(UNIT=KULOUT,FMT='('' LARPEGEF = '',L2)') LARPEGEF
WRITE(UNIT=KULOUT,FMT='('' LARPEGEF_TRAJHR = '',L2)') LARPEGEF_TRAJHR
WRITE(UNIT=KULOUT,FMT='('' LARPEGEF_TRAJBG = '',L2)') LARPEGEF_TRAJBG
WRITE(UNIT=KULOUT,FMT='('' LARPEGEF_RDGP_INIT = '',L2)') LARPEGEF_RDGP_INIT
WRITE(UNIT=KULOUT,FMT='('' LARPEGEF_RDGP_TRAJHR = '',L2)') LARPEGEF_RDGP_TRAJHR
WRITE(UNIT=KULOUT,FMT='('' LARPEGEF_RDGP_TRAJBG = '',L2)') LARPEGEF_RDGP_TRAJBG
WRITE(UNIT=KULOUT,FMT='('' LFPOS = '',L2)') LFPOS
WRITE(UNIT=KULOUT,FMT='('' CFPNCF = '',A6,'' LFPART2 = '',L2)')&
 & CFPNCF, LFPART2  
WRITE(UNIT=KULOUT,FMT='('' LOLDPP ='',L2)')LOLDPP
WRITE(UNIT=KULOUT,FMT='('' LAROME ='',L2)')LAROME

IF (NCONF/100 == 1.OR.NCONF == 801) THEN
  IF (NCNTVAR == 1) THEN
    WRITE(NULOUT,'('' NCNTVAR = 1: CONTROL VARIABLES ARE'',&
     & '' MODEL VARIABLES'')')  
  ELSEIF (NCNTVAR == 2) THEN
    WRITE(NULOUT,'('' NCNTVAR = 2: CONTROL VARIABLES ARE'',&
     & '' DEPARTURES FROM THE FIRST GUESS '',/,&
     & '' NORMALIZED BY FORECAST ERROR '',&
     & '' STANDARD DEVIATIONS'',/,&
     & '' PROJECTED ONTO THE EIGENVALUES OF THE '',&
     & '' VERTICAL PREDICTION ERROR CORRELATION'',&
     & '' MATRICES'')')  
  ELSE
    WRITE(NULOUT,'('' NCNTVAR = '',I5)') NCNTVAR
  ENDIF
ENDIF
WRITE(NULOUT,*)'LIFSTRAJ, LIFSMIN=',LIFSTRAJ,LIFSMIN

WRITE(UNIT=KULOUT,FMT='(A,L2,A,L2)')&
 & ' LRETCFOU = ',LRETCFOU,' ; LWRTCFOU = ',LWRTCFOU  
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRFOUTCNORM(1) = ',LRFOUTCNORM(1)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRFOUTCNORM(2) = ',LRFOUTCNORM(2)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRFOUTCNORM(3) = ',LRFOUTCNORM(3)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRFOUTCNORM(4) = ',LRFOUTCNORM(4)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRGPTCNORM(1) = ',LRGPTCNORM(1)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRGPTCNORM(2) = ',LRGPTCNORM(2)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LRGPTCNORM(3) = ',LRGPTCNORM(3)
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LVERCOR = ',LVERCOR
IF (LELAM) THEN
  WRITE(KULOUT,*) ' LTENC = ',LTENC,' LALLTC = ',LALLTC,' RTENC = ',RTENC
ENDIF

! PC output

WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LPC_FULL = ',LPC_FULL
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LPC_CHEAP = ',LPC_CHEAP
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LPC_OLD = ',LPC_OLD
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LPC_NESCT = ',LPC_NESCT
WRITE(UNIT=KULOUT,FMT='(A,L2)') ' LPC_NESC = ',LPC_NESC
WRITE(UNIT=KULOUT,FMT='(A,L2,A,L2)')&
 & ' LOPT_SCALAR = ',LOPT_SCALAR,' LOPT_RS6K = ',LOPT_RS6K  
WRITE(NULOUT,*)'PRINTOUT of SETUPS DONE BEFORE OUTPUT UNIT DEFINED'
WRITE(NULOUT,'(A,I10,A,I10)')&
 & ' MP_TYPE= ',MP_TYPE,' MBX_SIZE= ',MBX_SIZE  
!     ------------------------------------------------------------------
!  GSTATS  printing
WRITE(NULOUT,'(''LSTATS,LSYNCSTATS,LDETAILED_STATS,LXML_STATS '')')
WRITE(NULOUT,'(4(1X,L4))') LSTATS,LSYNCSTATS,LDETAILED_STATS,LXML_STATS
WRITE(NULOUT,'(''LSTATS_COMMS,LSTATS_OMP,LTRACE_STATS '')')
WRITE(NULOUT,'(3(1X,L4))') LSTATS_COMMS,LSTATS_OMP,LTRACE_STATS
!     ------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('SUCT0',1,ZHOOK_HANDLE)
END SUBROUTINE SUCT0
