GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: phylmd/ustarhb.F90 Lines: 9 9 100.0 %
Date: 2023-06-30 12:51:15 Branches: 2 2 100.0 %

Line Branch Exec Source
1
2
! $Header$
3
4
1152
SUBROUTINE ustarhb(knon, u, v, cd_m, ustar)
5
  USE dimphy
6
  IMPLICIT NONE
7
  ! ======================================================================
8
  ! Laurent Li (LMD/CNRS), le 30 septembre 1998
9
  ! Couche limite non-locale. Adaptation du code du CCM3.
10
  ! Code non teste, donc a ne pas utiliser.
11
  ! ======================================================================
12
  ! Nonlocal scheme that determines eddy diffusivities based on a
13
  ! diagnosed boundary layer height and a turbulent velocity scale.
14
  ! Also countergradient effects for heat and moisture are included.
15
16
  ! For more information, see Holtslag, A.A.M., and B.A. Boville, 1993:
17
  ! Local versus nonlocal boundary-layer diffusion in a global climate
18
  ! model. J. of Climate, vol. 6, 1825-1842.
19
  ! ======================================================================
20
  include "YOMCST.h"
21
22
  ! Arguments:
23
24
  INTEGER knon ! nombre de points a calculer
25
  REAL u(klon, klev) ! vitesse U (m/s)
26
  REAL v(klon, klev) ! vitesse V (m/s)
27
  REAL cd_m(klon) ! coefficient de friction au sol pour vitesse
28
  REAL ustar(klon)
29
30
  INTEGER i, k
31
  REAL zxt, zxq, zxu, zxv, zxmod, taux, tauy
32
  REAL zx_alf1, zx_alf2 ! parametres pour extrapolation
33
  LOGICAL unssrf(klon) ! unstb pbl w/lvls within srf pbl lyr
34
  LOGICAL unsout(klon) ! unstb pbl w/lvls in outer pbl lyr
35
  LOGICAL check(klon) ! True=>chk if Richardson no.>critcal
36
37
  include "YOETHF.h"
38
  include "FCTTRE.h"
39
473954
  DO i = 1, knon
40
    zx_alf1 = 1.0
41
    zx_alf2 = 1.0 - zx_alf1
42
472802
    zxu = u(i, 1)*zx_alf1 + u(i, 2)*zx_alf2
43
472802
    zxv = v(i, 1)*zx_alf1 + v(i, 2)*zx_alf2
44
472802
    zxmod = 1.0 + sqrt(zxu**2+zxv**2)
45
472802
    taux = zxu*zxmod*cd_m(i)
46
472802
    tauy = zxv*zxmod*cd_m(i)
47
473954
    ustar(i) = sqrt(taux**2+tauy**2)
48
    ! print*,'Ust ',zxu,zxmod,taux,ustar(i)
49
  END DO
50
51
1152
  RETURN
52
END SUBROUTINE ustarhb