SUBROUTINE SPNORMBL(PX,PSN,PSM,KLEV,PMET,KFLEV,KFLSUR,LDNWAVE)

!**** *SPNORMBL* - Compute norms in spectral space, multitasking interface

!     Purpose.
!     --------
!        Compute the norm in spectral space

!**   Interface.
!     ----------
!        *CALL* *SPNORMBL(PX,PSN,PSM,KLEV,PMET,KFLEV,KFLSUR,LDNWAVE)

!        Explicit arguments :
!        --------------------
!        PX      : Input array
!        PSN     : spectrum at constant n
!        PSM     : spectrum at constant m
!        KLEV    : number of levels of computation
!        PMET    : Metric
!        KFLEV   : first dimensioning of output arrays.
!        KFLSUR  : first dimensioning of input array.
!        LDNWAVE : .TRUE. to compute spectrum at constant n

!        Implicit arguments :  none.
!        --------------------

!     Method.
!     -------

!     Externals.
!     ----------
!      Calls SPNORMBM.
!      Called by SPNORM.

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

!     Author.
!     -------
!        Philippe Courtier  *ECMWF*

!     Modifications.
!     --------------
!        Original : 92-12-20
!        Modified : 95-06-06 L.Isaksen   Reordering of spectral arrays
!        Modified : 97-02-02 L.Isaksen   Merged with Message Passing code
!        D Dent   : 97-10-03 replace SECOND by USER_CLOCK
!     R. El Khatib: 99-02-09 LDNWAVE ; overdimension NSPECG for PMET
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!     ------------------------------------------------------------------

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

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KFLEV 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFLSUR 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PX(:,:) 
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PSN(:,:) 
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PSM(:,:) 
INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PMET(:) 
LOGICAL           ,INTENT(IN)    :: LDNWAVE 
REAL(KIND=JPRB) :: ZHOOK_HANDLE

#include "spnormbm.intfb.h"

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

!*       1.    Call SPNORMBM.
!              --------------

IF (LHOOK) CALL DR_HOOK('SPNORMBL',0,ZHOOK_HANDLE)
CALL SPNORMBM(PX,PSN,PSM,KLEV,PMET,KFLEV,KFLSUR,LDNWAVE)

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

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