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

Contents of /trunk/Sources/phylmd/clvent.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (show annotations)
Mon Jul 21 16:05:07 2008 UTC (15 years, 9 months ago) by guez
Original Path: trunk/libf/phylmd/clvent.f
File size: 4567 byte(s)
-- Minor modification of input/output:

Created procedure "read_logic". Variables of module "logic" are read
by "read_logic" instead of "conf_gcm". Variable "offline" of module
"conf_gcm" is read from namelist instead of "*.def".

Deleted arguments "dtime", "co2_ppm_etat0", "solaire_etat0",
"tabcntr0" and local variables "radpas", "tab_cntrl" of
"phyetat0". "phyetat0" does not read "controle" in "startphy.nc" any
longer. "phyetat0" now reads global attribute "itau_phy" from
"startphy.nc". "phyredem" does not create variable "controle" in
"startphy.nc" any longer. "phyredem" now writes global attribute
"itau_phy" of "startphy.nc". Deleted argument "tabcntr0" of
"printflag". Removed diagnostic messages written by "printflag" for
comparison of the variable "controle" of "startphy.nc" and the
variables read from "*.def" or namelist input.

-- Removing unwanted functionality:

Removed variable "lunout" from module "iniprint", replaced everywhere
by standard output.

Removed case "ocean == 'couple'" in "clmain", "interfsurf_hq" and
"physiq". Removed procedure "interfoce_cpl".

-- Should not change anything at run time:

Automated creation of graphs in documentation. More documentation on
input files.

Converted Fortran files to free format: "phyredem.f90", "printflag.f90".

Split module "clesphy" into "clesphys" and "clesphys2".

Removed variables "conser", "leapf", "forward", "apphys", "apdiss" and
"statcl" from module "logic". Added arguments "conser" to "advect",
"leapf" to "integrd". Added local variables "forward", "leapf",
"apphys", "conser", "apdiss" in "leapfrog".

Added intent attributes.

Deleted arguments "dtime" of "phyredem", "pdtime" of "flxdtdq", "sh"
of "phytrac", "dt" of "yamada".

Deleted local variables "dtime", "co2_ppm_etat0", "solaire_etat0",
"length", "tabcntr0" in "physiq". Replaced all references to "dtime"
by references to "pdtphys".

1 SUBROUTINE clvent(knon,dtime, u1lay,v1lay,coef,t,ven,
2 e paprs,pplay,delp,
3 s d_ven,flux_v)
4 use dimens_m
5 use dimphy
6 use iniprint
7 use YOMCST
8 IMPLICIT none
9 c======================================================================
10 c Auteur(s): Z.X. Li (LMD/CNRS) date: 19930818
11 c Objet: diffusion vertical de la vitesse "ven"
12 c======================================================================
13 c Arguments:
14 c dtime----input-R- intervalle du temps (en second)
15 c u1lay----input-R- vent u de la premiere couche (m/s)
16 c v1lay----input-R- vent v de la premiere couche (m/s)
17 c coef-----input-R- le coefficient d'echange (m**2/s) multiplie par
18 c le cisaillement du vent (dV/dz); la premiere
19 c valeur indique la valeur de Cdrag (sans unite)
20 c t--------input-R- temperature (K)
21 c ven------input-R- vitesse horizontale (m/s)
22 c paprs----input-R- pression a inter-couche (Pa)
23 c pplay----input-R- pression au milieu de couche (Pa)
24 c delp-----input-R- epaisseur de couche (Pa)
25 c
26 c
27 c d_ven----output-R- le changement de "ven"
28 c flux_v---output-R- (diagnostic) flux du vent: (kg m/s)/(m**2 s)
29 c======================================================================
30 INTEGER knon
31 REAL, intent(in):: dtime
32 REAL u1lay(klon), v1lay(klon)
33 REAL coef(klon,klev)
34 REAL t(klon,klev), ven(klon,klev)
35 REAL paprs(klon,klev+1), pplay(klon,klev), delp(klon,klev)
36 REAL d_ven(klon,klev)
37 REAL flux_v(klon,klev)
38 c======================================================================
39 c======================================================================
40 INTEGER i, k
41 REAL zx_cv(klon,2:klev)
42 REAL zx_dv(klon,2:klev)
43 REAL zx_buf(klon)
44 REAL zx_coef(klon,klev)
45 REAL local_ven(klon,klev)
46 REAL zx_alf1(klon), zx_alf2(klon)
47 c======================================================================
48 DO k = 1, klev
49 DO i = 1, knon
50 local_ven(i,k) = ven(i,k)
51 ENDDO
52 ENDDO
53 c======================================================================
54 DO i = 1, knon
55 ccc zx_alf1(i) = (paprs(i,1)-pplay(i,2))/(pplay(i,1)-pplay(i,2))
56 zx_alf1(i) = 1.0
57 zx_alf2(i) = 1.0 - zx_alf1(i)
58 zx_coef(i,1) = coef(i,1)
59 . * (1.0+SQRT(u1lay(i)**2+v1lay(i)**2))
60 . * pplay(i,1)/(RD*t(i,1))
61 zx_coef(i,1) = zx_coef(i,1) * dtime*RG
62 ENDDO
63 c======================================================================
64 DO k = 2, klev
65 DO i = 1, knon
66 zx_coef(i,k) = coef(i,k)*RG/(pplay(i,k-1)-pplay(i,k))
67 . *(paprs(i,k)*2/(t(i,k)+t(i,k-1))/RD)**2
68 zx_coef(i,k) = zx_coef(i,k) * dtime*RG
69 ENDDO
70 ENDDO
71 c======================================================================
72 DO i = 1, knon
73 zx_buf(i) = delp(i,1) + zx_coef(i,1)*zx_alf1(i)+zx_coef(i,2)
74 zx_cv(i,2) = local_ven(i,1)*delp(i,1) / zx_buf(i)
75 zx_dv(i,2) = (zx_coef(i,2)-zx_alf2(i)*zx_coef(i,1))
76 . /zx_buf(i)
77 ENDDO
78 DO k = 3, klev
79 DO i = 1, knon
80 zx_buf(i) = delp(i,k-1) + zx_coef(i,k)
81 . + zx_coef(i,k-1)*(1.-zx_dv(i,k-1))
82 zx_cv(i,k) = (local_ven(i,k-1)*delp(i,k-1)
83 . +zx_coef(i,k-1)*zx_cv(i,k-1) )/zx_buf(i)
84 zx_dv(i,k) = zx_coef(i,k)/zx_buf(i)
85 ENDDO
86 ENDDO
87 DO i = 1, knon
88 local_ven(i,klev) = ( local_ven(i,klev)*delp(i,klev)
89 . +zx_coef(i,klev)*zx_cv(i,klev) )
90 . / ( delp(i,klev) + zx_coef(i,klev)
91 . -zx_coef(i,klev)*zx_dv(i,klev) )
92 ENDDO
93 DO k = klev-1, 1, -1
94 DO i = 1, knon
95 local_ven(i,k) = zx_cv(i,k+1) + zx_dv(i,k+1)*local_ven(i,k+1)
96 ENDDO
97 ENDDO
98 c======================================================================
99 c== flux_v est le flux de moment angulaire (positif vers bas)
100 c== dont l'unite est: (kg m/s)/(m**2 s)
101 DO i = 1, knon
102 flux_v(i,1) = zx_coef(i,1)/(RG*dtime)
103 . *(local_ven(i,1)*zx_alf1(i)
104 . +local_ven(i,2)*zx_alf2(i))
105 ENDDO
106 DO k = 2, klev
107 DO i = 1, knon
108 flux_v(i,k) = zx_coef(i,k)/(RG*dtime)
109 . * (local_ven(i,k)-local_ven(i,k-1))
110 ENDDO
111 ENDDO
112 c
113 DO k = 1, klev
114 DO i = 1, knon
115 d_ven(i,k) = local_ven(i,k) - ven(i,k)
116 ENDDO
117 ENDDO
118 c
119 RETURN
120 END

  ViewVC Help
Powered by ViewVC 1.1.21