SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/surface_ri.F90
Go to the documentation of this file.
00001 !     #########
00002     SUBROUTINE SURFACE_RI(PTG, PQS, PEXNS, PEXNA, PTA, PQA,   &
00003                                PZREF, PUREF, PDIRCOSZW, PVMOD, PRI )  
00004 !   ######################################################################
00005 !
00006 !!****  *SURFACE_RI*  
00007 !!
00008 !!    PURPOSE
00009 !!    -------
00010 !
00011 !     Computes the richardson number near the ground
00012 !         
00013 !     
00014 !!**  METHOD
00015 !!    ------
00016 !
00017 !
00018 !
00019 !
00020 !!    EXTERNAL
00021 !!    --------
00022 !!
00023 !!
00024 !!    IMPLICIT ARGUMENTS
00025 !!    ------------------
00026 !!
00027 !!    MODD_CST
00028 !!    MODD_GROUND_PAR
00029 !!
00030 !!      
00031 !!    REFERENCE
00032 !!    ---------
00033 !!
00034 !!      
00035 !!    AUTHOR
00036 !!    ------
00037 !!
00038 !!      V. Masson           * Meteo-France *
00039 !!
00040 !!    MODIFICATIONS
00041 !!    -------------
00042 !!      Original    22/09/98 
00043 !-------------------------------------------------------------------------------
00044 !
00045 !*       0.     DECLARATIONS
00046 !               ------------
00047 !
00048 USE MODD_CSTS,     ONLY : XRV, XRD, XG
00049 USE MODD_SURF_ATM, ONLY : XRIMAX
00050 USE MODI_WIND_THRESHOLD
00051 !
00052 !
00053 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00054 USE PARKIND1  ,ONLY : JPRB
00055 !
00056 IMPLICIT NONE
00057 !
00058 !*      0.1    declarations of arguments
00059 !
00060 !
00061 REAL, DIMENSION(:), INTENT(IN)    :: PTG      ! surface temperature
00062 REAL, DIMENSION(:), INTENT(IN)    :: PQS      ! surface specific humidity
00063 REAL, DIMENSION(:), INTENT(IN)    :: PEXNS    ! surface exner function
00064 REAL, DIMENSION(:), INTENT(IN)    :: PTA      ! temperature at the lowest level
00065 REAL, DIMENSION(:), INTENT(IN)    :: PQA      ! specific humidity
00066                                               ! at the lowest level
00067 REAL, DIMENSION(:), INTENT(IN)    :: PEXNA    ! exner function
00068                                               ! at the lowest level
00069 REAL, DIMENSION(:), INTENT(IN)    :: PVMOD    ! module of the horizontal wind
00070 !
00071 REAL, DIMENSION(:), INTENT(IN)    :: PZREF    ! reference height of the first
00072                                               ! atmospheric level
00073 REAL, DIMENSION(:), INTENT(IN)    :: PUREF    ! reference height of the wind
00074 !                                             ! NOTE this is different from ZZREF
00075 !                                             ! ONLY in stand-alone/forced mode,
00076 !                                             ! NOT when coupled to a model (MesoNH)
00077 REAL, DIMENSION(:), INTENT(IN)    :: PDIRCOSZW! Cosine of the angle between
00078 !                                             ! the normal to the surface and
00079 !                                             ! the vertical
00080 !
00081 REAL, DIMENSION(:), INTENT(OUT)   :: PRI      ! Richardson number
00082 !
00083 !*      0.2    declarations of local variables
00084 !
00085 !
00086 REAL, DIMENSION(SIZE(PTG))   :: ZTHVA, ZTHVS
00087 REAL, DIMENSION(SIZE(PVMOD)) :: ZVMOD
00088 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00089 !-------------------------------------------------------------------------------
00090 !
00091 !       1.     Richardson number
00092 !              -----------------
00093 !                
00094 !                                                 virtual potential        
00095 !                                                 temperature at the 
00096 !                                                 first atmospheric level and
00097 !                                                 at the surface
00098 !
00099 IF (LHOOK) CALL DR_HOOK('SURFACE_RI',0,ZHOOK_HANDLE)
00100 !
00101 ZTHVA(:)=PTA(:)/PEXNA(:)*( 1.+(XRV/XRD-1.)*PQA(:) )   
00102 ZTHVS(:)=PTG(:)/PEXNS(:)*( 1.+(XRV/XRD-1.)*PQS(:) )
00103 !                                                 
00104 ZVMOD(:) = WIND_THRESHOLD(PVMOD(:),PUREF(:))
00105 !
00106                                                 ! Richardson's number
00107 PRI(:) = XG * PDIRCOSZW(:) * PUREF(:) * PUREF(:)              &
00108           * (ZTHVA(:)-ZTHVS(:)) / (0.5 * (ZTHVA(:)+ZTHVS(:)) )  &
00109           / (ZVMOD(:)*ZVMOD(:)) /PZREF(:)  
00110 !
00111 PRI(:) = MIN(PRI(:),XRIMAX)
00112 !
00113 IF (LHOOK) CALL DR_HOOK('SURFACE_RI',1,ZHOOK_HANDLE)
00114 !-------------------------------------------------------------------------------
00115 !
00116 END SUBROUTINE SURFACE_RI