SUBROUTINE ADD3TO5

!**** *ADD5TO3* - ROUTINE TO ADD SP5 AND SP3 SPECTRAL ARRAYS

!     PURPOSE.
!     --------

!**   INTERFACE.
!     ----------
!        *CALL* *ADD3TO5*

!        IMPLICIT ARGUMENTS :  SP5Ax and SPAx
!        --------------------

!     METHOD.
!     -------

!     EXTERNALS.
!     ----------

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

!     AUTHOR.
!     -------
!        J.N. Thepaut based on ADD5TO3  *ECMWF*

!     MODIFICATIONS.
!     --------------
!        ORIGINAL : 94-07-29
!        Modified 95-06-06 by L.Isaksen : Reordering of spectral arrays
!        Modified 95-12-12 by M.Hamrud  : Array syntax for vect. 
!        Modified 97-12-01 by E.Holm    : Ozone included
!        Modified 97-05-23 by L. Dragulanescu: Mean wind for ALADIN
!        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 YOMDIM   , ONLY : NFD2D
USE YOMMP    , ONLY : NPSP
USE YOMSP    , ONLY : SPA2     ,SP5A2    ,SPVOR    ,SPDIV    ,&
 & SP5VOR   ,SP5DIV   ,SPT     ,SPGFL     ,&
 & SP5T     ,SP5GFL   ,SPA1    ,SP5A1  
USE YOMCT0   , ONLY : LELAM

IMPLICIT NONE

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

!*    1.    ADD SP5Ax to SPAx.
!           ------------------

IF (LHOOK) CALL DR_HOOK('ADD3TO5',0,ZHOOK_HANDLE)
SP5VOR(:,:) = SPVOR(:,:) + SP5VOR(:,:)
SP5DIV(:,:) = SPDIV(:,:) + SP5DIV(:,:)
SP5T(:,:)   = SPT(:,:)   + SP5T(:,:)
SP5GFL(:,:,:)   = SPGFL(:,:,:)   + SP5GFL(:,:,:)

IF(NPSP == 1) THEN
  SP5A2(:,1:NFD2D) = SPA2(:,1:NFD2D) + SP5A2(:,1:NFD2D)
ENDIF

IF (LELAM) SP5A1(:,:) = SPA1(:,:) + SP5A1(:,:)

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

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