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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 227 - (hide annotations)
Thu Nov 2 15:47:03 2017 UTC (6 years, 6 months ago) by guez
File size: 1252 byte(s)
Rename phisinit to phis in restart.nc: clearer, same name as Fortran variable.

In aaam_bud, use rlat and rlon from phyetat0_m instead of having these
module variables associated to actual arguments in physiq.

In clmain, too many wind variables make the procedure hard to
understand. Use yu(:knon, 1) and yv(:knon, 1) instead of u1lay(:knon)
and v1lay(:knon). Note that when yu(:knon, 1) and yv(:knon, 1) are
used as actual arguments, they are probably copied to new arrays since
the elements are not contiguous. Rename yu10m to wind10m because this
is the norm of wind vector, not its zonal component. Rename yustar to
ustar. Rename uzon and vmer to u1 and v1 since these are wind
components at first layer and u1 and v1 are the names of corresponding
dummy arguments in stdlevvar.

In clmain, rename yzlev to zlev.

In clmain, screenc, stdlevvar and coefcdrag, remove the code
corresponding to zxli true (not used in LMDZ either).

Subroutine ustarhb becomes a function. Simplifications using the fact
that zx_alf2 = 0 and zx_alf1 = 1 (discarding the possibility to change
this).

In procedure vdif_kcay, remove unused dummy argument plev. Remove
useless computations of sss and sssq.

In clouds_gno, exp(100.) would overflow in single precision. Set
maximum to exp(80.) instead.

In physiq, use u(:, 1) and v(:, 1) as arguments to phytrac instead of
creating ad hoc variables yu1 and yv1.

In stdlevvar, rename dummy argument u_10m to wind10m, following the
corresponding modification in clmain. Simplifications using the fact
that ok_pred = 0 and ok_corr = 1 (discarding the possibility to change
this).

1 guez 62 module ustarhb_m
2    
3     IMPLICIT none
4    
5     contains
6    
7 guez 227 pure function ustarhb(u, v, cd_m)
8 guez 62
9 guez 227 ! From LMDZ4/libf/phylmd/ustarhb.F, version 1.1, 2004/06/22 11:45:35
10 guez 62
11     ! Laurent Li (LMD/CNRS), le 30 septembre 1998
12     ! Couche limite non-locale. Adaptation du code du CCM3.
13 guez 227 ! Code non test\'e, donc \`a ne pas utiliser.
14 guez 62
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 guez 227 ! For more information, see Holtslag, A.A.M. and B.A. Boville, 1993:
20 guez 62 ! Local versus nonlocal boundary-layer diffusion in a global climate
21     ! model. J. of Climate, vol. 6, 1825-1842.
22    
23 guez 227 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     REAL ustarhb(size(u))
26 guez 62
27 guez 227 ! Local:
28 guez 105 INTEGER i
29 guez 227 REAL zxmod, taux, tauy
30 guez 62
31     !---------------------------------------------------------------
32    
33 guez 227 DO i = 1, size(u)
34     zxmod = 1. + SQRT(u(i)**2 + v(i)**2)
35     taux = u(i) * zxmod * cd_m(i)
36     tauy = v(i) * zxmod * cd_m(i)
37     ustarhb(i) = SQRT(taux**2 + tauy**2)
38 guez 62 ENDDO
39    
40 guez 227 end function ustarhb
41 guez 62
42     end module ustarhb_m

  ViewVC Help
Powered by ViewVC 1.1.21