LMO_2D Function

public function LMO_2D(PUSTAR, PTHETA, PRV, PSFTH, PSFRV)

Arguments

Type IntentOptional AttributesName
real, intent(in), DIMENSION(:,:):: PUSTAR
real, intent(in), DIMENSION(:,:):: PTHETA
real, intent(in), DIMENSION(:,:):: PRV
real, intent(in), DIMENSION(:,:):: PSFTH
real, intent(in), DIMENSION(:,:):: PSFRV

Return Value real, DIMENSION(SIZE(PUSTAR,1),SIZE(PUSTAR,2))


Contents

Source Code


Source Code

FUNCTION LMO_2D(PUSTAR,PTHETA,PRV,PSFTH,PSFRV)
  USE MODD_CSTS
  USE MODD_SURF_PAR,   ONLY : XUNDEF
  IMPLICIT NONE  
  REAL, DIMENSION(:,:), INTENT(IN)               :: PUSTAR
  REAL, DIMENSION(:,:), INTENT(IN)               :: PTHETA
  REAL, DIMENSION(:,:), INTENT(IN)               :: PRV
  REAL, DIMENSION(:,:), INTENT(IN)               :: PSFTH
  REAL, DIMENSION(:,:), INTENT(IN)               :: PSFRV
  REAL, DIMENSION(SIZE(PUSTAR,1),SIZE(PUSTAR,2)) :: LMO_2D
!
  REAL, DIMENSION(SIZE(PUSTAR,1),SIZE(PUSTAR,2)) :: ZTHETAV
  REAL, DIMENSION(SIZE(PUSTAR,1),SIZE(PUSTAR,2)) :: ZQ0
  REAL                                           :: ZEPS
  REAL(KIND=JPRB) :: ZHOOK_HANDLE
!
!
  IF (LHOOK) CALL DR_HOOK('MODE_SBLS:LMO_2D',0,ZHOOK_HANDLE)
  ZEPS=(XRV-XRD)/XRD
  ZTHETAV(:,:) = PTHETA(:,:) * ( 1. +ZEPS * PRV(:,:))
  ZQ0    (:,:) = PSFTH(:,:) + ZTHETAV(:,:) * ZEPS * PSFRV(:,:) 
!
  LMO_2D(:,:) = XUNDEF
  WHERE ( ZQ0(:,:) /=0.  )                                   &
      LMO_2D(:,:) = - MAX(PUSTAR(:,:),1.E-6)**3                &
                    / ( XKARMAN * XG / ZTHETAV(:,:) *ZQ0(:,:) )  
!
  WHERE(ABS(LMO_2D)>10000.) LMO_2D=XUNDEF
IF (LHOOK) CALL DR_HOOK('MODE_SBLS:LMO_2D',1,ZHOOK_HANDLE)

END FUNCTION LMO_2D