subroutine scaleae (pscale)

!*** *SCALEAE*

!   Purpose.
!   --------
!      To multiply the variances of background/analysis/forecast
!      error in yomaneb by 'pscale'.

!   Interface.
!   ----------

!      CALL SCALEAE (PSCALE)

!   Externals.
!   ----------
!      SC2RDG
!      SC2WRG

!   Reference.
!   ----------

!   Author.
!   -------
!      Mike Fisher *ECMWF*

!   Modifications.
!   --------------
!      Original   96-03-28
!      L. Isaksen 96-05-05  Adapted for Message Passing
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!        M.Hamrud      10-Jan-2004 CY28R1 Cleaning

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

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMDIM   , ONLY : NPROMA
USE YOMGEM   , ONLY : NGPTOT
USE YOMVAR   , ONLY : NOANEF
USE YOMANEB  , ONLY : ANEBUF

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

IMPLICIT NONE

! * DUMMY:
REAL(KIND=JPRB)   ,INTENT(IN)    :: PSCALE 
REAL(KIND=JPRB) :: zane(NPROMA,NOANEF)

INTEGER(KIND=JPIM) :: iendc, istc, jk, jkglo, jf
REAL(KIND=JPRB) :: ZHOOK_HANDLE

#include "sc2rdg.intfb.h"
#include "sc2wrg.intfb.h"

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

IF (LHOOK) CALL DR_HOOK('SCALEAE',0,ZHOOK_HANDLE)
do jkglo=1,NGPTOT,NPROMA
  istc=1
  iendc=min(NPROMA,NGPTOT-jkglo+1)
  call SC2RDG (ANEBUF,jkglo,istc,iendc,zane)
  do jf=1,NOANEF
    do jk=istc,iendc
      zane(jk,jf)=pscale*zane(jk,jf)
    enddo
  enddo
  call SC2WRG (ANEBUF,jkglo,istc,iendc,zane)
enddo

IF (LHOOK) CALL DR_HOOK('SCALEAE',1,ZHOOK_HANDLE)
end subroutine scaleae
