SUBROUTINE GPVCW(KPROMA,KD,KF,KFLEV,PVCTSF,PVVELF,PVCWF)

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

USE YOMCST   , ONLY : RD       ,RG

!**** *GPVCW* - Computes the pseudo-vertical velocity W involved in
!               the Coriolis term contribution due to vertical velocity.
!               "W" is computed on model layers.

!**   Purpose.
!     --------

!      When no thin layer hypothesis is applied, the model needs
!      a pseudo-radius "rs" which is not equal to the mean radius "a"
!      except for a reference pressure "prehydref". 
!      "rs" depends on the hydrostatic pressure "prehyd" and its expression is

!                  -- prehyd'=prehydref 
!                  |                       Rd Ts
!       rs = a +   |                     ----------  d prehyd'
!                  |                      g prehyd'
!                 --  prehyd'=prehyd

!      Reference pressure "prehydref" is assumed to be equal to the 
!      standard atmosphere surface temperature "prehydRST_surf".

!      Its expression involves a reference temperature Ts which only depends
!      on the hydrostatic pressure "prehyd".

!      Relaxing the thin layer hypothesis also obliges to take account of
!      the vertical velocity in the Coriolis force: this is done via a
!      pseudo vertical velocity W, the definition of which is W=(D rs/Dt)
!      W is an approximation of the true height coordinate vertical velocity "w"
!      (w=Dz/Dt).

!      W can be computed by the following diagnostic relation:
!       W = - ((Rd Ts)/g) * (omega/prehyd) 
!      where: omega = (D prehyd / Dt)

!**   Interface.
!     ----------
!        *CALL* *GPVCW( ... )

!        Explicit arguments :
!        --------------------
!        INPUT :
!           KPROMA    - horizontal dimensioning.
!           KD        - start of work.
!           KF        - depth of work.
!           KFLEV     - vertical dimensioning (number of layers).
!           PVCTSF    - reference temperature Ts on layers.
!           PVVELF    - (omega/prehyd) on layers.

!        OUTPUT :
!           PVCWF     - "W" on layers.

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

!     Method.
!     -------

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

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

!     Author.
!     -------
!        K. YESSAD (METEO-FRANCE/CNRM/GMAP).

!     Modifications.
!     --------------
!        Original: AUGUST 2000.
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!     ------------------------------------------------------------------

IMPLICIT NONE

INTEGER(KIND=JPIM),INTENT(IN)    :: KPROMA 
INTEGER(KIND=JPIM),INTENT(IN)    :: KFLEV 
INTEGER(KIND=JPIM),INTENT(IN)    :: KD 
INTEGER(KIND=JPIM),INTENT(IN)    :: KF 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PVCTSF(KPROMA,KFLEV) 
REAL(KIND=JPRB)   ,INTENT(IN)    :: PVVELF(KPROMA,KFLEV) 
REAL(KIND=JPRB)   ,INTENT(OUT)   :: PVCWF(KPROMA,KFLEV) 

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

INTEGER(KIND=JPIM) :: JLEV

REAL(KIND=JPRB) :: ZRDSG
REAL(KIND=JPRB) :: ZHOOK_HANDLE

!     ------------------------------------------------------------------
IF (LHOOK) CALL DR_HOOK('GPVCW',0,ZHOOK_HANDLE)
!     ------------------------------------------------------------------

! * Computation of "W" on layers:

ZRDSG=RD/RG

DO JLEV=1,KFLEV
  PVCWF(KD:KF,JLEV)=-ZRDSG*PVCTSF(KD:KF,JLEV)*PVVELF(KD:KF,JLEV)
ENDDO

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

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