/[lmdze]/trunk/Sources/phylmd/ustarhb.f
ViewVC logotype

Diff of /trunk/Sources/phylmd/ustarhb.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 134 by guez, Wed Apr 29 15:47:56 2015 UTC revision 227 by guez, Thu Nov 2 15:47:03 2017 UTC
# Line 4  module ustarhb_m Line 4  module ustarhb_m
4    
5  contains  contains
6    
7    SUBROUTINE ustarhb(knon, u, v, cd_m, ustar)    pure function ustarhb(u, v, cd_m)
8    
9      ! From LMDZ4/libf/phylmd/ustarhb.F, version 1.1 2004/06/22 11:45:35      ! From LMDZ4/libf/phylmd/ustarhb.F, version 1.1, 2004/06/22 11:45:35
10    
11      ! Laurent Li (LMD/CNRS), le 30 septembre 1998      ! Laurent Li (LMD/CNRS), le 30 septembre 1998
12      ! Couche limite non-locale. Adaptation du code du CCM3.      ! Couche limite non-locale. Adaptation du code du CCM3.
13      ! Code non teste, donc a ne pas utiliser.      ! Code non test\'e, donc \`a ne pas utiliser.
14    
15      ! Nonlocal scheme that determines eddy diffusivities based on a      ! Nonlocal scheme that determines eddy diffusivities based on a
16      ! diagnosed boundary layer height and a turbulent velocity scale.      ! diagnosed boundary layer height and a turbulent velocity scale.
17      ! Also countergradient effects for heat and moisture are included.      ! Also countergradient effects for heat and moisture are included.
18    
19      ! For more information, see Holtslag, A.A.M., and B.A. Boville, 1993:      ! For more information, see Holtslag, A.A.M. and B.A. Boville, 1993:
20      ! Local versus nonlocal boundary-layer diffusion in a global climate      ! Local versus nonlocal boundary-layer diffusion in a global climate
21      ! model. J. of Climate, vol. 6, 1825-1842.      ! model. J. of Climate, vol. 6, 1825-1842.
22    
23      USE dimphy, ONLY: klev, klon      REAL, intent(in):: u(:), v(:) ! wind in first layer (m/s)
24        REAL, intent(in):: cd_m(:) ! coefficient de friction au sol pour vitesse
25      ! Arguments:      REAL ustarhb(size(u))
   
     INTEGER knon ! nombre de points a calculer  
     REAL u(klon, klev) ! vitesse U (m/s)  
     REAL v(klon, klev) ! vitesse V (m/s)  
   
     REAL, intent(in):: cd_m(:)  
     ! (knon) coefficient de friction au sol pour vitesse  
   
     REAL ustar(klon)  
26    
27        ! Local:
28      INTEGER i      INTEGER i
29      REAL zxu, zxv, zxmod, taux, tauy      REAL zxmod, taux, tauy
     REAL zx_alf1, zx_alf2 ! parametres pour extrapolation  
30    
31      !---------------------------------------------------------------      !---------------------------------------------------------------
32    
33      DO i = 1, knon      DO i = 1, size(u)
34         zx_alf1 = 1.0         zxmod = 1. + SQRT(u(i)**2 + v(i)**2)
35         zx_alf2 = 1.0 - zx_alf1         taux = u(i) * zxmod * cd_m(i)
36         zxu = u(i, 1)*zx_alf1+u(i, 2)*zx_alf2         tauy = v(i) * zxmod * cd_m(i)
37         zxv = v(i, 1)*zx_alf1+v(i, 2)*zx_alf2         ustarhb(i) = SQRT(taux**2 + tauy**2)
        zxmod = 1.0+SQRT(zxu**2+zxv**2)  
        taux = zxu *zxmod*cd_m(i)  
        tauy = zxv *zxmod*cd_m(i)  
        ustar(i) = SQRT(taux**2+tauy**2)  
38      ENDDO      ENDDO
39    
40    end SUBROUTINE ustarhb    end function ustarhb
41    
42  end module ustarhb_m  end module ustarhb_m

Legend:
Removed from v.134  
changed lines
  Added in v.227

  ViewVC Help
Powered by ViewVC 1.1.21