FUNCTION fcsglat(P_LAT_IN_DEG)

!**** *fcsglat* - calculates g value at a given latitude.

!     S. Healy             ECMWF          2004/10/26
!     Based on a EUMETSAT GRAS-SAF routine that was Dr'd automatically by the CY27 merge.  

!     PURPOSE
!     -------
!     It calculates the g value at a given latitude:

!**   INTERFACE
!     ---------

!     fcsglat(P_LAT_IN_DEG) 
!     WHERE P_LAT_IN_DEG   = latitude in degrees.

!     fcseradi is called from gpscalc_nr, gpscalc_nrtl and gpscalc_nrad

!**   METHOD
!     ------
!     Method and values taken from List (1968), Smithsonian Met. Tables   

!**   EXTERNALS
!     ---------

!**   MODIFICATIONS
!     -------------
!     Sean Healy      2004/10/26 : Original
!     -------------------------------------------------------------------------


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

! calculate the value of gravity as a function of latitude

IMPLICIT NONE
! input
REAL(KIND=JPRB), INTENT(IN) :: P_LAT_IN_DEG   
REAL(KIND=JPRB) :: Z_LAT_IN_RAD,Z_SIN_LAT,Z_SIN_2_LAT
REAL(KIND=JPRB) :: fcsglat
REAL(KIND=JPRB) :: ZHOOK_HANDLE

! calculate the lat in radians

IF (LHOOK) CALL DR_HOOK('FCSGLAT',0,ZHOOK_HANDLE)
Z_LAT_IN_RAD= 1.745329E-2_JPRB*P_LAT_IN_DEG
Z_SIN_LAT   = SIN(Z_LAT_IN_RAD)
Z_SIN_2_LAT = SIN(2.0_JPRB*Z_LAT_IN_RAD)

! values taken from List (1968), Smithsonian Met. Tables

fcsglat=9.780356_JPRB* &
 & (1.0_JPRB+5.2885E-3_JPRB*Z_SIN_LAT**2-5.9E-6_JPRB*Z_SIN_2_LAT**2)  

IF (LHOOK) CALL DR_HOOK('FCSGLAT',1,ZHOOK_HANDLE)

END FUNCTION fcsglat
