SUBROUTINE WRMLPPL(CDCONF)

!**** *WRMLPPL*  - writes out some model level fields 

!     Purpose.
!     --------
!     Write out model level fields in lagged mode, after going
!     into grid-point space and calling the physics.

!**   Interface.
!     ----------
!        *CALL* *WRMLPPL(CDCONF)

!        Explicit arguments :     CDCONF - configuration of call
!        --------------------

!        Implicit arguments :      None
!        --------------------

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

!     Externals.
!     ----------

!         WRMLPPLG  - write out in GRIB
!         WRMLPPLA  - write out to ARPEGE file

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

!        Note de travail ARPEGE NR 17

!        MARS users guide

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

!     Modifications.
!     --------------
!       Original : 88-03-02
!       Modified  93-10-29 M.Hamrud (split in two routines, one for
!       writing out in GRIB, one for ARPEGE file output)
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!        M.Hamrud      01-Dec-2003 CY28R1 Cleaning
!     ------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMCT0   , ONLY : LGRBOP   ,LFPOS

IMPLICIT NONE

CHARACTER(LEN=1)                 :: CDCONF ! Argument NOT used
REAL(KIND=JPRB) :: ZHOOK_HANDLE

#include "wrmlfpl.intfb.h"
#include "wrmlpplg.intfb.h"

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

!*       1.    CALL APPROPRIATE OUTPUT ROUTINE
!              -------------------------------

!*       1.1   GRIB OUTPUT
IF (LHOOK) CALL DR_HOOK('WRMLPPL',0,ZHOOK_HANDLE)
IF(LGRBOP) THEN
  IF (LFPOS) THEN
    CALL WRMLFPL(CDCONF)
  ELSE
    CALL WRMLPPLG(CDCONF)
  ENDIF
ENDIF

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

IF (LHOOK) CALL DR_HOOK('WRMLPPL',1,ZHOOK_HANDLE)
END SUBROUTINE WRMLPPL
