SUBROUTINE LCNORAD

!**** *LCNORAD*  - Operator to localize a perturbation in gg space

!     Purpose.
!     --------
!     To localize an input field into a localized area.

!**   Interface.
!     ----------
!        *CALL* *LCNORAD

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

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

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

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

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

!     Author.
!     -------
!        Roberto Buizza                     *ECMWF*

!     Modifications.
!     --------------
!        Original : 93-02-01
!        M.Hamrud : 95-10-30 Changed CLCONF def.
!        G. Desroziers : 02-09-16 also treat Aladin mean wind trajectory
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!        M.Hamrud      01-Dec-2003 CY28R1 Cleaning
!     ------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPRB
USE YOMVAR   , ONLY : LTRREF
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMCT3   , ONLY : NSTEP
USE YOMSP    , ONLY : SP5A3, SP5A2, SP5A1
USE TRAJECTORY_MOD, ONLY: LTRAJGP, GET_TRAJ_SPEC


IMPLICIT NONE

REAL(KIND=JPRB) :: ZHOOK_HANDLE

#include "stepo.intfb.h"
#include "stepoad.intfb.h"

!     CHARACTER*9 CLCONF
!   1 : configuration of WRTRA      write the trajectory
!   2 : configuration of LTINV      inverse Legendre transform
!   3 : configuration of FTINV      inverse Fourier transform
!   4 : configuration of GPC        grid point computations
!   5 : configuration of POS        post processing
!   6 : configuration of OBS        comparison to observations
!   7 : configuration of FTDIR      direct Fourier transform
!   8 : configuration of LTDIR      direct Legendre transform
!   9 : configuration of SPC        spectral space computations
!-----------------------------------------------------------------------

!*    1. Trajectory.
!     --------------

IF (LHOOK) CALL DR_HOOK('LCNORAD',0,ZHOOK_HANDLE)
IF (.NOT.LTRAJGP) THEN
  IF (LTRREF) THEN
    CALL STEPO('BK0000000')
  ELSE
    CALL GSTATS(15,0)
    CALL get_traj_spec(SP5A3,SP5A2,SP5A1,KSTEP=nstep)
    CALL GSTATS(15,1)
    CALL STEPO('0K0000000')
  ENDIF
ENDIF

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

!*    2. Define the correct configuration and call STEPOAD.
!     -----------------------------------------------------

!     NB: CLCONF(5)='L' to call the gg localization routine LCNORGG

CALL STEPOAD('0GB0L0AA0')

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

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

