SUBROUTINE SUSAVTEND

!**** *SUSAVTEND*   - Initialize pointers for SAVTEND

!     Purpose.
!     --------
!           Initialize pointers for SAVTEND

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

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

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

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

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

!     Called by SUDYN.

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

!     Author.
!     -------
!         K.Yessad

! Modifications
! -------------
!   Original : 10-Feb-2006

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

USE YOMCT0   , ONLY : LPC_FULL
USE YOMDIM   , ONLY : NUNDEFLD
USE YOEPHY   , ONLY : NEPHYS_PCFULL
USE YOMSLPHY  ,ONLY : LSLPHY, NVTEND, &
 & MU_SAVTEND,MV_SAVTEND,MT_SAVTEND,MSAT_SAVTEND, &
 & MU_SAVTEND_S,MV_SAVTEND_S,MT_SAVTEND_S,MSAVTEND_S,MSAT_SAVTEND_S

IMPLICIT NONE

REAL(KIND=JPRB) :: ZHOOK_HANDLE
!     ------------------------------------------------------------------

#include "abor1.intfb.h"

!     ------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('SUSAVTEND',0,ZHOOK_HANDLE)
!     ------------------------------------------------------------------

MU_SAVTEND=NUNDEFLD
MV_SAVTEND=NUNDEFLD
MT_SAVTEND=NUNDEFLD
MSAT_SAVTEND=NUNDEFLD

MU_SAVTEND_S=NUNDEFLD
MV_SAVTEND_S=NUNDEFLD
MT_SAVTEND_S=NUNDEFLD

MSAVTEND_S=0

IF(LSLPHY)THEN

  IF(LPC_FULL.AND.NEPHYS_PCFULL == 2)THEN

    MU_SAVTEND=1
    MU_SAVTEND_S=2
    MV_SAVTEND=3
    MV_SAVTEND_S=4
    MT_SAVTEND=5
    MT_SAVTEND_S=6
    MSAT_SAVTEND=7
    MSAT_SAVTEND_S=8

    MSAVTEND_S=1

    IF(NVTEND < 7)CALL ABOR1('INSUFFICIENT VALUE OF NVTEND')

  ELSE

    MU_SAVTEND=1
    MU_SAVTEND_S=1
    MV_SAVTEND=2
    MV_SAVTEND_S=2
    MT_SAVTEND=3
    MT_SAVTEND_S=3
    MSAT_SAVTEND=4
    MSAT_SAVTEND_S=4
   
    MSAVTEND_S=0

    IF(NVTEND < 4)CALL ABOR1('INSUFFICIENT VALUE OF NVTEND')

  ENDIF

ENDIF

!     ------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('SUSAVTEND',1,ZHOOK_HANDLE)

END SUBROUTINE SUSAVTEND



