SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/canopy_evol_temp.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE CANOPY_EVOL_TEMP(KI,KLVL,PTSTEP,KIMPL,PTHA,PK,PDKDDVDZ,           &
00003                                    PSFLUX_T,PFORC_T,PDFORC_TDT,PDZ,PDZF,PTH,PWTH,   &
00004                                    PALFA,PBETA                                      ) 
00005 !     #########################################
00006 !
00007 !!****  *CANOPY_EVOL_TEMP* - evolution of wind in canopy 
00008 !!                        
00009 !!
00010 !!    PURPOSE
00011 !!    -------
00012 !!
00013 !!**  METHOD
00014 !!    ------
00015 !!
00016 !!    EXTERNAL
00017 !!    --------
00018 !!
00019 !!
00020 !!    IMPLICIT ARGUMENTS
00021 !!    ------------------
00022 !!
00023 !!    REFERENCE
00024 !!    ---------
00025 !!
00026 !!
00027 !!    AUTHOR
00028 !!    ------
00029 !!      V. Masson   *Meteo France*      
00030 !!
00031 !!    MODIFICATIONS
00032 !!    -------------
00033 !!      Original    07/2006 
00034 !-------------------------------------------------------------------------------
00035 !
00036 !*       0.    DECLARATIONS
00037 !              ------------
00038 !
00039 USE MODI_CANOPY_EVOL_FIELD
00040 !
00041 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00042 USE PARKIND1  ,ONLY : JPRB
00043 !
00044 IMPLICIT NONE
00045 !
00046 !*       0.1   Declarations of arguments
00047 !              -------------------------
00048 !
00049 INTEGER,                  INTENT(IN)    :: KI        ! number of horizontal points
00050 INTEGER,                  INTENT(IN)    :: KLVL      ! number of levels in canopy
00051 REAL,                     INTENT(IN)    :: PTSTEP    ! time-step                             (s)
00052 INTEGER,                  INTENT(IN)    :: KIMPL     ! implicitation code: 
00053 !                                                    ! 1 : computes only alfa and beta coupling
00054 !                                                    !     coefficients for all variables
00055 !                                                    ! 2 : computes temporal evolution of the
00056 !                                                    !     variables
00057 REAL, DIMENSION(KI),      INTENT(IN)    :: PTHA      ! potential temp.  at forcing level     (K)
00058 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PK        ! mixing exchange coefficient           (m2/s)
00059 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PDKDDVDZ  ! derivative of mixing coefficient as a
00060 !                                                    ! function of vertical gradient of wind
00061 !                                                    ! (at mid levels)                       (m2)
00062 REAL, DIMENSION(KI),      INTENT(IN)    :: PSFLUX_T  ! surface flux w'Th'                    (mK/s)
00063 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PFORC_T   ! tendency of wind due to canopy drag   (K/s)
00064 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PDFORC_TDT! formal derivative of the tendency of
00065 !                                                    ! wind due to canopy drag               (1/s)
00066 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PDZ       ! deltaZ between canopy half levels,
00067 !                                                    ! located at full levels                (m)
00068 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PDZF      ! deltaZ between canopy (full) levels,
00069 !                                                    ! located at half levels                (m)
00070 REAL, DIMENSION(KI,KLVL), INTENT(INOUT) :: PTH       ! pot. temp. at canopy levels           (K)
00071 REAL, DIMENSION(KI,KLVL), INTENT(OUT)   :: PWTH      ! turbulent flux (at half levels)       (mK/s)
00072 REAL, DIMENSION(KI),      INTENT(OUT)   :: PALFA     !  V+(1) = alfa F(1) + beta
00073 REAL, DIMENSION(KI),      INTENT(OUT)   :: PBETA     !  V+(1) = alfa F(1) + beta
00074 !
00075 !
00076 !*       0.2   Declarations of local variables
00077 !              -------------------------------
00078 !
00079 INTEGER                     :: JLAYER   ! loop counter on layers
00080 !
00081 REAL, DIMENSION(KI,KLVL)   :: ZDTHDZ   ! dTh/dz at mid levels
00082 REAL, DIMENSION(KI,KLVL)   :: ZF       ! turbulent flux at mid levels
00083 REAL, DIMENSION(KI,KLVL)   :: ZDFDDVDZ ! derivative of turbulent flux as a
00084 !                                       ! function of vertical gradient of wind variable
00085 !                                       ! (at mid levels)
00086 REAL, DIMENSION(KI,KLVL)   :: ZEXT     ! external forcing at full levels
00087 REAL, DIMENSION(KI,KLVL)   :: ZDEXTDV  ! derivative of external forcing as a
00088 !                                       ! function of vertical variable
00089 !                                       ! (at full levels)
00090 REAL, DIMENSION(KI,KLVL)   :: ZTH      ! work variable : pot. temp at futur instant 
00091 !                                       ! (or past at the end of the routine) 
00092 REAL, DIMENSION(KI)         :: ZDTHADT  ! dTHa/dt   at forcing level
00093 REAL, DIMENSION(KI)         :: ZDWTHDZ  ! dw'Th'/dz at forcing level
00094 LOGICAL                     :: LIMPL
00095 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00096 !
00097 !-------------------------------------------------------------------------------
00098 !
00099 !
00100 !*    1. initializations
00101 !        ---------------
00102 !
00103 !* external forces
00104 !
00105 IF (LHOOK) CALL DR_HOOK('CANOPY_EVOL_TEMP',0,ZHOOK_HANDLE)
00106 ZEXT = 0.
00107 ZDEXTDV = 0.
00108 !
00109 !-------------------------------------------------------------------------------
00110 !
00111 !*    5. Forcing due to drag (at full levels)
00112 !        -------------------
00113 !
00114 ZEXT = ZEXT + PFORC_T
00115 ZDEXTDV = ZDEXTDV + PDFORC_TDT
00116 !
00117 !-------------------------------------------------------------------------------
00118 !
00119 !*    6. External forcing due to large-scale forces (at full levels)
00120 !        ------------------------------------------
00121 !
00122 !
00123 !* forces due to large-scale forcing
00124 !
00125 ! These are computed from wind evolution equation at forcing level :
00126 !
00127 ! dUa/dt = Large_Scale_Forcing - d(u'w')/dz|z=forcing_level
00128 !
00129 ! because vertical derivative of turbulent flux is not available at forcing
00130 ! level, one must make the assumption that the turbulent flux is uniform
00131 ! between the forcing level and the level just below.
00132 ! This means that one assume that the forcing layer is in the inertial sublayer
00133 ! (where turbulent fluxes are constant).
00134 !
00135 ZDTHADT(:) = ( PTHA(:) - PTH(:,KLVL) ) /PTSTEP
00136 !
00137 ZDWTHDZ(:) = 0.
00138 !
00139 DO JLAYER=1,KLVL
00140   ZEXT(:,JLAYER) = ZEXT(:,JLAYER) + ZDWTHDZ(:) + ZDTHADT(:)
00141 END DO
00142 !
00143  CALL  CANOPY_EVOL_FIELD(KI, KLVL, PTSTEP, KIMPL, PK, PDKDDVDZ,   &
00144                         PSFLUX_T, PFORC_T, PDFORC_TDT, PDZ, PDZF,      &
00145                         ZEXT, ZDEXTDV, PTH, PWTH, PALFA, PBETA         ) 
00146 !
00147 IF (LHOOK) CALL DR_HOOK('CANOPY_EVOL_TEMP',1,ZHOOK_HANDLE)
00148 !----------------------------------------------------------------
00149 !
00150 END SUBROUTINE CANOPY_EVOL_TEMP