SUBROUTINE SCAAS(KDUM,YD_PX,YD_PY,PSC)

!**** *SCAAS*  - SCALAR PRODUCT

!     Purpose.
!     --------
!           COMPUTES THE SCALAR PRODUCT OF TWO CONTROL VECTORS

!**   Interface.
!     ----------
!        *CALL* *SCAAS(PX,PY,PSC)

!        Explicit arguments :
!        --------------------
!        KDUM   : DIMENSION OF THE PROBLEM (not used)
!        PX     :
!        PY     :
!        PSC    : SCALAR PRODUCT OF PX AND PY

!        Implicit arguments : SCALP from YOMCVA
!        --------------------

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

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

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

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

!     Modifications.
!     --------------
!        Original : 87-10-15
!        97-11-20 Mike Fisher : Distribute the work
!        02-08-09 Y Tremolet  : Moved out of module
!        M.Hamrud      01-Oct-2003 CY28 Cleaning

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

USE YOMCVA, ONLY : YSCALP
USE CONTROL_VECTORS

IMPLICIT NONE

INTEGER(KIND=JPIM)               :: KDUM ! Argument NOT used
TYPE(CONTROL_VECTOR),INTENT(IN)    :: YD_PX 
TYPE(CONTROL_VECTOR),INTENT(IN)    :: YD_PY 
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PSC 
REAL(KIND=JPRB) :: ZHOOK_HANDLE

IF (LHOOK) CALL DR_HOOK('SCAAS',0,ZHOOK_HANDLE)
PSC = DOT_PRODUCT(YD_PX,YD_PY,YSCALP)

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