SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/canopy_evol_wind.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE CANOPY_EVOL_WIND(KI,KLVL,PTSTEP,KIMPL,PWIND,PK,PDKDDVDZ,        &
00003                                    PSFLUX_U,PFORC_U,PDFORC_UDU,PDZ,PDZF,PU,PUW,   &
00004                                    PALFA,PBETA                                    ) 
00005 !     #########################################
00006 !
00007 !!****  *CANOPY_EVOL_WIND* - 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)    :: PWIND     ! wind at forcing level                 (m/s)
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_U  ! Surface flux u'w'                     (m2/s2)
00063 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PFORC_U   ! tendency of wind due to canopy drag   (m/s2)
00064 REAL, DIMENSION(KI,KLVL), INTENT(IN)    :: PDFORC_UDU! 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) :: PU        ! wind speed at canopy levels           (m/s)
00071 REAL, DIMENSION(KI,KLVL), INTENT(OUT)   :: PUW       ! turbulent flux (at half levels)       (m2/s2)
00072 REAL, DIMENSION(KI),      INTENT(OUT)   :: PALFA     !  V+(1) = alfa u'w' + beta
00073 REAL, DIMENSION(KI),      INTENT(OUT)   :: PBETA     !  V+(1) = alfa u'w' + 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)   :: ZDUDZ    ! dU/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)   :: ZU       ! work variable : wind at futur instant 
00091 !                                       ! (or past at the end of the routine) 
00092 REAL, DIMENSION(KI)         :: ZDUADT   ! dUa/dt   at forcing level
00093 LOGICAL                     :: LIMPL
00094 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00095 !
00096 !-------------------------------------------------------------------------------
00097 !
00098 !
00099 !*    1. initializations
00100 !        ---------------
00101 !
00102 !* external forces
00103 !
00104 IF (LHOOK) CALL DR_HOOK('CANOPY_EVOL_WIND',0,ZHOOK_HANDLE)
00105 ZEXT = 0.
00106 ZDEXTDV = 0.
00107 !
00108 !* coupling coefficient with the surface
00109 !
00110 PALFA(:)=0.
00111 PBETA(:)=PU(:,1)
00112 !
00113 !-------------------------------------------------------------------------------
00114 !
00115 !*    5. Forcing due to drag (at full levels)
00116 !        -------------------
00117 !
00118 !* drag force by canopy
00119 !
00120 ZEXT = ZEXT + PFORC_U(:,:)
00121 !
00122 ZDEXTDV = ZDEXTDV + PDFORC_UDU(:,:)
00123 !
00124 !-------------------------------------------------------------------------------
00125 !
00126 !*    6. External forcing due to large-scale forces (at full levels)
00127 !        ------------------------------------------
00128 !
00129 !
00130 !* forces due to large-scale forcing
00131 !
00132 ! These are computed from wind evolution equation at forcing level :
00133 !
00134 ! dUa/dt = Large_Scale_Forcing - d(u'w')/dz|z=forcing_level
00135 !
00136 ! because vertical derivative of turbulent flux is not available at forcing
00137 ! level, one must make the assumption that the turbulent flux is uniform
00138 ! between the forcing level and the level just below.
00139 ! This means that one assume that the forcing layer is in the inertail sublayer
00140 ! (where turbulent fluxes are constant).
00141 !
00142 ZDUADT(:) = ( PWIND(:) - PU(:,KLVL) ) /PTSTEP
00143 !
00144 !* for smoother evolution at large time steps, does not include explicitely
00145 !  forcing term in lower layers
00146 DO JLAYER=1,KLVL-1
00147   ZEXT(:,JLAYER) = ZEXT(:,JLAYER)
00148 END DO
00149 
00150 !* evolution of forcing layer forced by forcing...
00151 ZEXT(:,KLVL) = ZDUADT(:)
00152 !
00153  CALL  CANOPY_EVOL_FIELD(KI, KLVL, PTSTEP, KIMPL, PK, PDKDDVDZ, &
00154                         PSFLUX_U, PFORC_U, PDFORC_UDU, PDZ, PDZF,     &
00155                         ZEXT, ZDEXTDV, PU, PUW, PALFA, PBETA          ) 
00156 !
00157 !-------------------------------------------------------------------------------
00158 !
00159 !*   10. Security at all levels : positivity of wind speed
00160 !        ----------------------
00161 !
00162 PU(:,:) = MAX(PU,0.)
00163 IF (LHOOK) CALL DR_HOOK('CANOPY_EVOL_WIND',1,ZHOOK_HANDLE)
00164 !
00165 !----------------------------------------------------------------
00166 !
00167 END SUBROUTINE CANOPY_EVOL_WIND