SUBROUTINE SUGEM

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
USE YOMCT0   , ONLY : NCONF
USE YOMCST   , ONLY : RPI      ,RA
USE YOMDIM   , ONLY : NDGLG    ,NDGSUR
USE YOMLEG   , ONLY : RW       ,RMU      ,R1MU2    ,R1MUI    ,R1MUA    ,&
 & RSQM2    ,R1QM2    ,RACTHE   ,RLATIG  
USE IOSTREAM_MIX , ONLY : INI_IOSTREAM

!**** *SUGEM*  - Initialize geometry parameters - first part
!                and Legendre polynomials

!     Purpose.
!     --------
!        Initialize geometry, get Gaussian weights and latitudes.

!**   Interface.
!     ----------
!        *CALL* *SUGEM

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

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

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

!     Externals.
!     ----------
!                   SULEG  -  initialize Legendre polynomials
!                   SUGEM1b -  
!        Called by SU0YOMB.
!     Reference.
!     ----------
!        ECMWF Research Department documentation of the IFS

!     Author.
!     -------
!        Ryad el Khatib *METEO-FRANCE*

!     Modifications.
!     --------------
!        Original : 94-02-03
!    R. El Khatib : 01-08-07 Pruning options
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!        M.Hamrud      01-Dec-2003 CY28R1 Cleaning
!        K.Yessad : 09-09-08 Inline content of old arp/setup/suleg.F90.
!        A. Fouilloux: 09-09-09 remove inlined suleg
!     ------------------------------------------------------------------

IMPLICIT NONE

REAL(KIND=JPRB) :: ZHOOK_HANDLE

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

#include "sugem1b.intfb.h"

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


IF (LHOOK) CALL DR_HOOK('SUGEM',0,ZHOOK_HANDLE)

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

!*       2.    Initialize geometry parameters - first part - b
!              -----------------------------------------------

CALL SUGEM1B

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

CALL INI_IOSTREAM(PLATIG=RLATIG(1:NDGLG))

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