1 |
|
|
! |
2 |
|
|
! $Header$ |
3 |
|
|
! |
4 |
|
1729 |
SUBROUTINE advect(ucov,vcov,teta,w,massebx,masseby,du,dv,dteta) |
5 |
|
|
|
6 |
|
|
USE comconst_mod, ONLY: daysec |
7 |
|
|
USE logic_mod, ONLY: conser |
8 |
|
|
USE ener_mod, ONLY: gtot |
9 |
|
|
|
10 |
|
|
IMPLICIT NONE |
11 |
|
|
c======================================================================= |
12 |
|
|
c |
13 |
|
|
c Auteurs: P. Le Van , Fr. Hourdin . |
14 |
|
|
c ------- |
15 |
|
|
c |
16 |
|
|
c Objet: |
17 |
|
|
c ------ |
18 |
|
|
c |
19 |
|
|
c ************************************************************* |
20 |
|
|
c .... calcul des termes d'advection vertic.pour u,v,teta,q ... |
21 |
|
|
c ************************************************************* |
22 |
|
|
c ces termes sont ajoutes a du,dv,dteta et dq . |
23 |
|
|
c Modif F.Forget 03/94 : on retire q de advect |
24 |
|
|
c |
25 |
|
|
c======================================================================= |
26 |
|
|
c----------------------------------------------------------------------- |
27 |
|
|
c Declarations: |
28 |
|
|
c ------------- |
29 |
|
|
|
30 |
|
|
include "dimensions.h" |
31 |
|
|
include "paramet.h" |
32 |
|
|
include "comgeom.h" |
33 |
|
|
|
34 |
|
|
c Arguments: |
35 |
|
|
c ---------- |
36 |
|
|
|
37 |
|
|
REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm),teta(ip1jmp1,llm) |
38 |
|
|
REAL massebx(ip1jmp1,llm),masseby(ip1jm,llm),w(ip1jmp1,llm) |
39 |
|
|
REAL dv(ip1jm,llm),du(ip1jmp1,llm),dteta(ip1jmp1,llm) |
40 |
|
|
|
41 |
|
|
c Local: |
42 |
|
|
c ------ |
43 |
|
|
|
44 |
|
|
REAL uav(ip1jmp1,llm),vav(ip1jm,llm),wsur2(ip1jmp1) |
45 |
|
|
REAL unsaire2(ip1jmp1), ge(ip1jmp1) |
46 |
|
|
REAL deuxjour, ww, gt, uu, vv |
47 |
|
|
|
48 |
|
|
INTEGER ij,l |
49 |
|
|
|
50 |
|
|
REAL SSUM |
51 |
|
|
|
52 |
|
|
c----------------------------------------------------------------------- |
53 |
|
|
c 2. Calculs preliminaires: |
54 |
|
|
c ------------------------- |
55 |
|
|
|
56 |
✓✓ |
1729 |
IF (conser) THEN |
57 |
|
49 |
deuxjour = 2. * daysec |
58 |
|
|
|
59 |
✓✓ |
53410 |
DO 1 ij = 1, ip1jmp1 |
60 |
|
53361 |
unsaire2(ij) = unsaire(ij) * unsaire(ij) |
61 |
|
49 |
1 CONTINUE |
62 |
|
|
END IF |
63 |
|
|
|
64 |
|
|
|
65 |
|
|
c------------------ -yy ---------------------------------------------- |
66 |
|
|
c . Calcul de u |
67 |
|
|
|
68 |
✓✓ |
69160 |
DO l=1,llm |
69 |
✓✓ |
71274567 |
DO ij = iip2, ip1jmp1 |
70 |
|
71274567 |
uav(ij,l) = 0.25 * ( ucov(ij,l) + ucov(ij-iip1,l) ) |
71 |
|
|
ENDDO |
72 |
✓✓ |
69049344 |
DO ij = iip2, ip1jm |
73 |
|
69049344 |
uav(ij,l) = uav(ij,l) + uav(ij+iip1,l) |
74 |
|
|
ENDDO |
75 |
✓✓ |
2294383 |
DO ij = 1, iip1 |
76 |
|
2225223 |
uav(ij ,l) = 0. |
77 |
|
2292654 |
uav(ip1jm+ij,l) = 0. |
78 |
|
|
ENDDO |
79 |
|
|
ENDDO |
80 |
|
|
|
81 |
|
|
c------------------ -xx ---------------------------------------------- |
82 |
|
|
c . Calcul de v |
83 |
|
|
|
84 |
✓✓ |
69160 |
DO l=1,llm |
85 |
✓✓ |
71207136 |
DO ij = 2, ip1jm |
86 |
|
71207136 |
vav(ij,l) = 0.25 * ( vcov(ij,l) + vcov(ij-1,l) ) |
87 |
|
|
ENDDO |
88 |
|
2157792 |
DO ij = 1,ip1jm,iip1 |
89 |
✓✓ |
2157792 |
vav(ij,l) = vav(ij+iim,l) |
90 |
|
|
ENDDO |
91 |
✓✓ |
71207136 |
DO ij = 1, ip1jm-1 |
92 |
|
71207136 |
vav(ij,l) = vav(ij,l) + vav(ij+1,l) |
93 |
|
|
ENDDO |
94 |
|
1729 |
DO ij = 1, ip1jm, iip1 |
95 |
✓✓ |
2157792 |
vav(ij+iim,l) = vav(ij,l) |
96 |
|
|
ENDDO |
97 |
|
|
ENDDO |
98 |
|
|
|
99 |
|
|
c----------------------------------------------------------------------- |
100 |
|
|
|
101 |
|
|
c |
102 |
✓✓ |
67431 |
DO 20 l = 1, llmm1 |
103 |
|
|
|
104 |
|
|
|
105 |
|
|
c ...... calcul de - w/2. au niveau l+1 ....... |
106 |
|
|
|
107 |
✓✓ |
71615180 |
DO 5 ij = 1, ip1jmp1 |
108 |
|
71549478 |
wsur2( ij ) = - 0.5 * w( ij,l+1 ) |
109 |
|
65702 |
5 CONTINUE |
110 |
|
|
|
111 |
|
|
|
112 |
|
|
c ..................... calcul pour du .................. |
113 |
|
|
|
114 |
✓✓ |
67213146 |
DO 6 ij = iip2 ,ip1jm-1 |
115 |
|
67147444 |
ww = wsur2 ( ij ) + wsur2( ij+1 ) |
116 |
|
67147444 |
uu = 0.5 * ( ucov(ij,l) + ucov(ij,l+1) ) |
117 |
|
67147444 |
du(ij,l) = du(ij,l) - ww * ( uu - uav(ij, l ) )/massebx(ij, l ) |
118 |
|
67147444 |
du(ij,l+1)= du(ij,l+1) + ww * ( uu - uav(ij,l+1) )/massebx(ij,l+1) |
119 |
|
65702 |
6 CONTINUE |
120 |
|
|
|
121 |
|
|
c ..... correction pour du(iip1,j,l) ........ |
122 |
|
|
c ..... du(iip1,j,l)= du(1,j,l) ..... |
123 |
|
|
|
124 |
|
|
CDIR$ IVDEP |
125 |
|
2036762 |
DO 7 ij = iip1 +iip1, ip1jm, iip1 |
126 |
|
2036762 |
du( ij, l ) = du( ij -iim, l ) |
127 |
✓✓ |
2036762 |
du( ij,l+1 ) = du( ij -iim,l+1 ) |
128 |
|
65702 |
7 CONTINUE |
129 |
|
|
|
130 |
|
|
c ................. calcul pour dv ..................... |
131 |
|
|
|
132 |
✓✓ |
69447014 |
DO 8 ij = 1, ip1jm |
133 |
|
69381312 |
ww = wsur2( ij+iip1 ) + wsur2( ij ) |
134 |
|
69381312 |
vv = 0.5 * ( vcov(ij,l) + vcov(ij,l+1) ) |
135 |
|
69381312 |
dv(ij,l) = dv(ij, l ) - ww * (vv - vav(ij, l ) )/masseby(ij, l ) |
136 |
|
69381312 |
dv(ij,l+1)= dv(ij,l+1) + ww * (vv - vav(ij,l+1) )/masseby(ij,l+1) |
137 |
|
65702 |
8 CONTINUE |
138 |
|
|
|
139 |
|
|
c |
140 |
|
|
|
141 |
|
|
c ............................................................ |
142 |
|
|
c ............... calcul pour dh ................... |
143 |
|
|
c ............................................................ |
144 |
|
|
|
145 |
|
|
c ---z |
146 |
|
|
c calcul de - d( teta * w ) qu'on ajoute a dh |
147 |
|
|
c ............... |
148 |
|
|
|
149 |
✓✓ |
71615180 |
DO 15 ij = 1, ip1jmp1 |
150 |
|
71549478 |
ww = wsur2(ij) * (teta(ij,l) + teta(ij,l+1) ) |
151 |
|
71549478 |
dteta(ij, l ) = dteta(ij, l ) - ww |
152 |
|
71549478 |
dteta(ij,l+1) = dteta(ij,l+1) + ww |
153 |
|
65702 |
15 CONTINUE |
154 |
|
|
|
155 |
✓✓ |
65702 |
IF( conser) THEN |
156 |
✓✓ |
2029580 |
DO 17 ij = 1,ip1jmp1 |
157 |
|
2027718 |
ge(ij) = wsur2(ij) * wsur2(ij) * unsaire2(ij) |
158 |
|
1862 |
17 CONTINUE |
159 |
|
1862 |
gt = SSUM( ip1jmp1,ge,1 ) |
160 |
|
1862 |
gtot(l) = deuxjour * SQRT( gt/ip1jmp1 ) |
161 |
|
|
END IF |
162 |
|
|
|
163 |
|
1729 |
20 CONTINUE |
164 |
|
|
|
165 |
|
1729 |
RETURN |
166 |
|
|
END |