source: LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/ustarhb.f90 @ 5919

Last change on this file since 5919 was 5876, checked in by yann meurdesoif, 3 months ago

GPU port of cdrag + call_atke + coef_diff_turb

YM

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1
2! $Header$
3MODULE ustarhb_mod
4
5CONTAINS
6
7SUBROUTINE ustarhb(klon, klev, knon, u, v, cd_m, ustar)
8!$gpum horizontal knon klon
9  IMPLICIT NONE
10  ! ======================================================================
11  ! Laurent Li (LMD/CNRS), le 30 septembre 1998
12  ! Couche limite non-locale. Adaptation du code du CCM3.
13  ! Code non teste, donc a ne pas utiliser.
14  ! ======================================================================
15  ! Nonlocal scheme that determines eddy diffusivities based on a
16  ! diagnosed boundary layer height and a turbulent velocity scale.
17  ! Also countergradient effects for heat and moisture are included.
18
19  ! For more information, see Holtslag, A.A.M., and B.A. Boville, 1993:
20  ! Local versus nonlocal boundary-layer diffusion in a global climate
21  ! model. J. of Climate, vol. 6, 1825-1842.
22  ! ======================================================================
23
24  ! Arguments:
25
26  INTEGER, INTENT(IN) :: klon, klev, knon ! nombre de points a calculer
27  REAL, DIMENSION(klon, klev), INTENT(IN) :: u,v ! vent horizontal (m/s)
28  REAL, DIMENSION(klon), INTENT(IN) :: cd_m ! coefficient de friction au sol pour vitesse
29  REAL, DIMENSION(klon), INTENT(OUT) :: ustar
30
31  INTEGER :: i, k
32  REAL :: zxt, zxq, zxu, zxv, zxmod, taux, tauy
33  REAL :: zx_alf1, zx_alf2 ! parametres pour extrapolation
34
35  DO i = 1, knon
36    zx_alf1 = 1.0
37    zx_alf2 = 1.0 - zx_alf1
38    zxu = u(i, 1)*zx_alf1 + u(i, 2)*zx_alf2
39    zxv = v(i, 1)*zx_alf1 + v(i, 2)*zx_alf2
40    zxmod = 1.0 + sqrt(zxu**2+zxv**2)
41    taux = zxu*zxmod*cd_m(i)
42    tauy = zxv*zxmod*cd_m(i)
43    ustar(i) = sqrt(taux**2+tauy**2)
44  END DO
45
46  RETURN
47END SUBROUTINE ustarhb
48
49END MODULE ustarhb_mod
Note: See TracBrowser for help on using the repository browser.