SUBROUTINE EC_PHYS_LSLPHY(&
 !---------------------------------------------------------------------
 ! - INPUT .
 & KST,KEND,LDLFSTEP,PDTPHY, &
 !---------------------------------------------------------------------
 ! - INPUT/OUTPUT .
 & PULP9,PVLP9,PTLP9,PGFLLP9, &
 & PSAVTEND,PGFLSLP)

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK

USE YOMDIM   , ONLY : NFLEVG   ,NPROMA   ,NFLSA    ,NFLEN 
USE YOMDYN   , ONLY : TDT
USE YOMPHY2  , ONLY : TSPHY
USE YOMSLPHY , ONLY : NVTEND
USE YOM_YGFL , ONLY : YGFL

!**** *EC_PHYS_LSLPHY* - Grid point calculations: get EC physical tendencies.

!     Purpose.
!     --------
!           Grid point calculations: get EC physical tendencies
!           computed at the previous time step (lagged physics)
!           to simulate a non lagged physics.

!**   Interface.
!     ----------
!        *CALL* *EC_PHYS_LSLPHY(...)*

!        Explicit arguments :
!        --------------------

!     INPUT:
!     ------
!        KST       : first element of work.
!        KEND      : last element of work.
!        LDLSLPHY  : .T.: split physics activated.
!        LDLFSTEP  : .T.: first time-step?
!        PDTPHY    : timestep used in the physics.

!     INPUT/OUTPUT:
!     -------------
!        PULP9     : quantity in U-wind eqn for split physics to be
!                    interpolated at the origin point 
!        PVLP9     : quantity in V-wind eqn for split physics to be
!                    interpolated at the origin point 
!        PTLP9     : quantity in T eqn for split physics to be
!                    interpolated at the origin point 
!        PGFLLP9   : unified_treatment grid-point fields to be
!                    interpolated at the origin point for split physics

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

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

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

!     Reference.
!     ----------
!        ARPEGE documentation vol 2 ch 1 and vol 3 ch 6

!     Author.
!     -------
!       K. YESSAD after old version of CPG. 

!     Modifications.
!     --------------
!   Original : 01-08-13
!   M.Hamrud      01-Oct-2003 CY28 Cleaning
!   N. Wedi and K. Yessad (Jan 2008): different dev for NH model and PC scheme
!   K. Yessad (Dec 2008): remove dummy CDLOCK + cleanings
!     ------------------------------------------------------------------

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KST 
INTEGER(KIND=JPIM),INTENT(IN)    :: KEND 
LOGICAL           ,INTENT(IN)    :: LDLFSTEP 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PDTPHY 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PULP9(NPROMA,NFLSA:NFLEN) 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PVLP9(NPROMA,NFLSA:NFLEN) 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PTLP9(NPROMA,NFLSA:NFLEN) 
REAL(KIND=JPRB)   ,INTENT(INOUT) :: PGFLLP9(NPROMA,NFLSA:NFLEN,YGFL%NUMFLDS) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PSAVTEND(NPROMA,NFLEVG,NVTEND) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PGFLSLP(NPROMA,NFLEVG,YGFL%NDIMSLP) 

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

REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

#include "gpaddslphy.intfb.h"

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

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

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

IF(PDTPHY /= TDT) THEN
  TSPHY = MAX(PDTPHY,1.0_JPRB)
ENDIF

CALL GPADDSLPHY(LDLFSTEP,KST,KEND,TSPHY,&
 & PSAVTEND,PGFLSLP,&
 & PULP9(1,1),PVLP9(1,1),PTLP9(1,1),PGFLLP9)  

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

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