!-----------------------------------------------------------------
!--------------- special set of characters for RCS information
!-----------------------------------------------------------------
! $Source$ $Revision$
! MASDEV4_7 modd 2006/05/18 13:07:25
!-----------------------------------------------------------------
!     ###############
      MODULE MODD_FRC
!     ###############
!
!!***  *MODD_FRC -  Declarative module for the forcing fields
!!
!!    PURPOSE
!!    -------
!       This module contains NFRC 1D-arrays used by FORCING (geostrophic wind
!     components, large scale vertical wind, theta and humidity profiles when
!     the relaxation option is used,large scale theta and humidity gradients
!     and the translation speed of the domain of simulation.
!     The following control parameters are used by FORCING:
!     - LGEOST_UV_FRC and LGEOST_TH_FRC
!     - LTEND_THRV_FRC     
!     - LVERT_MOTION_FRC  
!     - LRELAX_THRV_FRC and LRELAX_UV_FRC using:
!         XRELAX_TIME_FRC, XRELAX_HEIGHT_FRC and CRELAX_HEIGHT_TYPE
!     - LTRANS
!!
!!**  IMPLICIT ARGUMENTS
!!    ------------------
!!      None 
!!
!!    REFERENCE
!!    ---------
!!      Book2 of documentation of Meso-NH (module MODD_FRC)
!!      
!!
!!    AUTHOR
!!    ------
!!	    Marc Georgelin Labo d'aerologie
!!
!!    MODIFICATIONS
!!    -------------
!!      Original 29/07/96 
!!      29/07/96 (Pinty&Suhre) revised
!!      18/11/96 J.-P. Pinty   addition of the translation
!!      27/01/98 P. Bechtold   use tendency forcing
!!                             add SST and surface pressure forcing
!!      01/2004  V. Masson     surface externalization: removes SST forcing
!-------------------------------------------------------------------------------
!
!*       0.   DECLARATIONS
!             ------------
!
USE MODD_TYPE_DATE
!
IMPLICIT NONE
!
!*            fields for FORCING
!             ------------------
!
INTEGER,          SAVE                  :: NFRC     ! number of forcing profiles
TYPE (DATE_TIME), SAVE, DIMENSION(:), ALLOCATABLE :: TDTFRC ! date of
                                                    !  each forcing profile
!
REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: XUFRC,   &! geostrophic wind 
					                       XVFRC,   &! components U and V
					                       XWFRC     ! large scale vertical wind
REAL, SAVE, DIMENSION(:,:,:),ALLOCATABLE:: XWTFRC    ! large scale vertical wind
REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: XTHFRC,  &! large scale TH profile
					                       XRVFRC    ! large scale RV profile
REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: XGXTHFRC,&! large scale TH gradient
                                           XGYTHFRC  ! along the X and Y axis
REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: XTENDTHFRC,&! large scale TH tendency
                                           XTENDRVFRC  ! large scale RV tendency
REAL, SAVE                              :: XUTRANS, &! horizontal components of
                                           XVTRANS   !        a constant
                                                     !   Galilean TRANSlation
REAL, SAVE, DIMENSION(:), ALLOCATABLE   :: XPGROUNDFRC! surf. pressure 
!
!*            control parameters for FORCING
!             ------------------------------
!
LOGICAL, SAVE     :: LGEOST_UV_FRC      ! enables geostrophic wind term
LOGICAL, SAVE     :: LGEOST_TH_FRC      ! enables thermal wind advection
LOGICAL, SAVE     :: LTEND_THRV_FRC     ! enables tendency forcing
LOGICAL, SAVE     :: LVERT_MOTION_FRC   ! enables prescribed a forced vertical
					                    ! transport for all prognostic variables
LOGICAL, SAVE     :: LRELAX_THRV_FRC    ! enables temp. and humidity relaxation
LOGICAL, SAVE     :: LRELAX_UV_FRC      ! enables  horizontal  wind  relaxation
!
REAL,    SAVE     :: XRELAX_TIME_FRC    ! e-folding time for relaxation 
REAL,    SAVE     :: XRELAX_HEIGHT_FRC  ! height below which relaxation
                                        ! is never applied
CHARACTER*4, SAVE :: CRELAX_HEIGHT_TYPE ! "THGR" relax. above maximal dTH/dz
					                    ! (but always above XRELAX_HEIGHT_FRC)
					                    ! "FIXE" relax. above XRELAX_HEIGHT_FRC
!
LOGICAL, SAVE     :: LTRANS             ! enables a Galilean translation of the
                                        !         domain of simulation
LOGICAL, SAVE     :: LPGROUND_FRC       ! enables surf. pressure forcing
!
!
END MODULE MODD_FRC
