SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/tsz0.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE TSZ0( PTIME, PTSTEP, PWFC, PTG, PWG )
00003 !     ################################################################
00004 !
00005 !
00006 !!****  *TSZ0*  
00007 !!
00008 !!    PURPOSE
00009 !!    -------
00010 !       This subroutine computes the surface fluxes when  the soil temperature,
00011 !     humidity and rugisty length are prescribed. It uses these values and the 
00012 !     atmospheric fields at the first level located at dz/2 to compute a
00013 !     vertical gradient and a drag coefficient is computed according to a
00014 !     stability index ( Richardson number )    
00015 !     
00016 !!**  METHOD
00017 !!    ------
00018 !!
00019 !!    EXTERNAL
00020 !!    --------
00021 !!
00022 !!    IMPLICIT ARGUMENTS
00023 !!    ------------------ 
00024 !!      
00025 !!    REFERENCE
00026 !!    ---------
00027 !!
00028 !!      
00029 !!    AUTHOR
00030 !!    ------
00031 !!      J. Stein           * Meteo-France *
00032 !!
00033 !!    MODIFICATIONS
00034 !!    -------------
00035 !!      Original    25/01/96 
00036 !!                  25/03/96   spatialize the input TS, WG, SST fields
00037 !!                  22/05/96   correct igrid value for the rain rate
00038 !!                  27/11/96   set realistic values for z0 fields on sea
00039 !!      (V.Masson)  09/07/97  add directional z0 computations and RESA correction
00040 !!      (V.Masson)  15/03/99  some computations are now done in GROUND_PARAMn
00041 !!      (V.Masson)  04/01/00  all computations are now done in ISBA
00042 !-------------------------------------------------------------------------------
00043 !
00044 !*       0.     DECLARATIONS
00045 !               ------------
00046 !
00047 USE MODD_CSTS,       ONLY : XPI
00048 USE MODD_SURF_PAR,   ONLY : XUNDEF
00049 USE MODD_DATA_TSZ0_n
00050 !
00051 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00052 USE PARKIND1  ,ONLY : JPRB
00053 !
00054 IMPLICIT NONE
00055 !
00056 !*      0.1    declarations of arguments
00057 !
00058 !
00059 !* general variables
00060 !  -----------------
00061 REAL,                   INTENT(IN)  :: PTIME      ! Current time
00062 REAL,                   INTENT(IN)  :: PTSTEP     ! timestep of the integration
00063 !
00064 !* soil variables
00065 !  --------------
00066 !
00067 REAL, DIMENSION(:,:),   INTENT(IN)  :: PWFC       ! field capacity
00068 !
00069 !* prognostic variables
00070 !  --------------------
00071 !
00072 REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PTG      ! surface temperature
00073 REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PWG      ! near-surface volumetric water
00074 !
00075 !
00076 !*      0.2    declarations of local variables
00077 !
00078 !
00079 !* local variables for Ts time interpolation
00080 !   ----------------------------------------
00081 !
00082 REAL    :: ZA,ZTIMEP    ! weigths and instant for the temporal interpolation
00083 INTEGER :: IHOURP       ! hourly data index for intant t +dt
00084 INTEGER :: JPATCH       ! loop counter on patches
00085 !
00086 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00087 ! enter here the temporal variations of the soil fields increments
00088 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
00089 !
00090 ! prescribed values of the surface temperature increment over land (K)
00091 REAL :: ZDTS_HOUR 
00092 ! prescribed values of the soil humidity increment at every hour (fraction)
00093 REAL :: ZDHUGRD_HOUR              
00094 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00095 !-------------------------------------------------------------------------------
00096 !
00097 !*       1.     TEMPORAL INTERPOLATION OF THE SURFACE TEMPERATURES AT T+DT
00098 !               ----------------------------------------------------------
00099 !
00100 IF (LHOOK) CALL DR_HOOK('TSZ0',0,ZHOOK_HANDLE)
00101 !
00102 ZTIMEP = MOD(PTIME+PTSTEP,86400.)  ! recover the time from O HTU
00103 !
00104 IHOURP = INT(ZTIMEP/3600.)+1
00105 !
00106 IF (NTIME==25) THEN
00107   ZDTS_HOUR    = XDATA_DTS   (IHOURP)
00108   ZDHUGRD_HOUR = XDATA_DHUGRD(IHOURP)
00109 ELSEIF (NTIME==1) THEN
00110   ZDTS_HOUR    = XDATA_DTS   (1)
00111   ZDHUGRD_HOUR = XDATA_DHUGRD(1)
00112 ENDIF
00113 !
00114 ! temporal interpolation of the surface temperature increment  over land at time t
00115 ZA= ZDTS_HOUR /3600. * PTSTEP
00116 WHERE (PTG(:,:,:)/=XUNDEF)
00117   PTG(:,:,:)= PTG(:,:,:) + ZA
00118 END WHERE
00119 !
00120 ! temporal interpolation of the soil humidity increment at time t
00121 ZA= ZDHUGRD_HOUR /3600.* PTSTEP
00122 DO JPATCH=1,SIZE(PWG,3)
00123   WHERE (PWG(:,:,JPATCH)/=XUNDEF)
00124   PWG(:,:,JPATCH)= ACOS( 1.                                                               &
00125       - 2.* MIN( 0.5 * (1. - COS( XPI * MIN(PWG(:,:,JPATCH) /PWFC(:,:),1.)  )) + ZA , 1.) &
00126             ) / XPI * PWFC(:,:)  
00127   END WHERE
00128 END DO
00129 !
00130 IF (LHOOK) CALL DR_HOOK('TSZ0',1,ZHOOK_HANDLE)
00131 !-------------------------------------------------------------------------------
00132 !
00133 END SUBROUTINE TSZ0