1 | ! |
---|
2 | ! $Id: calfis.F 1407 2010-07-07 10:31:52Z fairhead $ |
---|
3 | ! |
---|
4 | C |
---|
5 | C |
---|
6 | SUBROUTINE calfis(lafin, |
---|
7 | $ jD_cur, jH_cur, |
---|
8 | $ pucov, |
---|
9 | $ pvcov, |
---|
10 | $ pteta, |
---|
11 | $ pq, |
---|
12 | $ pmasse, |
---|
13 | $ pps, |
---|
14 | $ pp, |
---|
15 | $ ppk, |
---|
16 | $ pphis, |
---|
17 | $ pphi, |
---|
18 | $ pducov, |
---|
19 | $ pdvcov, |
---|
20 | $ pdteta, |
---|
21 | $ pdq, |
---|
22 | $ flxw, |
---|
23 | $ pdufi, |
---|
24 | $ pdvfi, |
---|
25 | $ pdhfi, |
---|
26 | $ pdqfi, |
---|
27 | $ pdpsfi) |
---|
28 | c |
---|
29 | c Auteur : P. Le Van, F. Hourdin |
---|
30 | c ......... |
---|
31 | USE infotrac |
---|
32 | USE control_mod |
---|
33 | USE write_field |
---|
34 | USE cpdet_mod, only: t2tpot,tpot2t |
---|
35 | |
---|
36 | ! used only for zonal averages |
---|
37 | USE moyzon_mod |
---|
38 | |
---|
39 | IMPLICIT NONE |
---|
40 | c======================================================================= |
---|
41 | c |
---|
42 | c 1. rearrangement des tableaux et transformation |
---|
43 | c variables dynamiques > variables physiques |
---|
44 | c 2. calcul des termes physiques |
---|
45 | c 3. retransformation des tendances physiques en tendances dynamiques |
---|
46 | c |
---|
47 | c remarques: |
---|
48 | c ---------- |
---|
49 | c |
---|
50 | c - les vents sont donnes dans la physique par leurs composantes |
---|
51 | c naturelles. |
---|
52 | c - la variable thermodynamique de la physique est une variable |
---|
53 | c intensive : T |
---|
54 | c pour la dynamique on prend T * ( preff / p(l) ) **kappa |
---|
55 | c - les deux seules variables dependant de la geometrie necessaires |
---|
56 | c pour la physique sont la latitude pour le rayonnement et |
---|
57 | c l'aire de la maille quand on veut integrer une grandeur |
---|
58 | c horizontalement. |
---|
59 | c - les points de la physique sont les points scalaires de la |
---|
60 | c la dynamique; numerotation: |
---|
61 | c 1 pour le pole nord |
---|
62 | c (jjm-1)*iim pour l'interieur du domaine |
---|
63 | c ngridmx pour le pole sud |
---|
64 | c ---> ngridmx=2+(jjm-1)*iim |
---|
65 | c |
---|
66 | c Input : |
---|
67 | c ------- |
---|
68 | c pucov covariant zonal velocity |
---|
69 | c pvcov covariant meridional velocity |
---|
70 | c pteta potential temperature |
---|
71 | c pps surface pressure |
---|
72 | c pmasse masse d'air dans chaque maille |
---|
73 | c pts surface temperature (K) |
---|
74 | c callrad clef d'appel au rayonnement |
---|
75 | c |
---|
76 | c Output : |
---|
77 | c -------- |
---|
78 | c pdufi tendency for the natural zonal velocity (ms-1) |
---|
79 | c pdvfi tendency for the natural meridional velocity |
---|
80 | c pdhfi tendency for the potential temperature (K/s) |
---|
81 | c pdtsfi tendency for the surface temperature |
---|
82 | c |
---|
83 | c pdtrad radiative tendencies \ both input |
---|
84 | c pfluxrad radiative fluxes / and output |
---|
85 | c |
---|
86 | c======================================================================= |
---|
87 | c |
---|
88 | c----------------------------------------------------------------------- |
---|
89 | c |
---|
90 | c 0. Declarations : |
---|
91 | c ------------------ |
---|
92 | |
---|
93 | #include "dimensions.h" |
---|
94 | #include "paramet.h" |
---|
95 | #include "temps.h" |
---|
96 | #include "logic.h" |
---|
97 | |
---|
98 | INTEGER ngridmx |
---|
99 | PARAMETER( ngridmx = 2+(jjm-1)*iim - 1/jjm ) |
---|
100 | |
---|
101 | #include "comconst.h" |
---|
102 | #include "comvert.h" |
---|
103 | #include "comgeom2.h" |
---|
104 | #include "iniprint.h" |
---|
105 | |
---|
106 | c Arguments : |
---|
107 | c ----------- |
---|
108 | LOGICAL lafin |
---|
109 | |
---|
110 | |
---|
111 | REAL pvcov(iip1,jjm,llm) |
---|
112 | REAL pucov(iip1,jjp1,llm) |
---|
113 | REAL pteta(iip1,jjp1,llm) |
---|
114 | REAL pmasse(iip1,jjp1,llm) |
---|
115 | REAL pq(iip1,jjp1,llm,nqtot) |
---|
116 | REAL pphis(iip1,jjp1) |
---|
117 | REAL pphi(iip1,jjp1,llm) |
---|
118 | |
---|
119 | REAL pdvcov(iip1,jjm,llm) |
---|
120 | REAL pducov(iip1,jjp1,llm) |
---|
121 | REAL pdteta(iip1,jjp1,llm) |
---|
122 | ! commentaire SL: pdq ne sert que pour le calcul de pcvgq, |
---|
123 | ! qui lui meme ne sert a rien dans la routine telle qu'elle est |
---|
124 | ! ecrite, et que j'ai donc commente.... |
---|
125 | REAL pdq(iip1,jjp1,llm,nqtot) |
---|
126 | |
---|
127 | REAL pps(iip1,jjp1) |
---|
128 | REAL pp(iip1,jjp1,llmp1) |
---|
129 | REAL ppk(iip1,jjp1,llm) |
---|
130 | |
---|
131 | c TENDENCIES in */s |
---|
132 | REAL pdvfi(iip1,jjm,llm) |
---|
133 | REAL pdufi(iip1,jjp1,llm) |
---|
134 | REAL pdhfi(iip1,jjp1,llm) |
---|
135 | REAL pdqfi(iip1,jjp1,llm,nqtot) |
---|
136 | REAL pdpsfi(iip1,jjp1) |
---|
137 | |
---|
138 | |
---|
139 | c Local variables : |
---|
140 | c ----------------- |
---|
141 | |
---|
142 | INTEGER i,j,l,ig0,ig,iq,iiq |
---|
143 | REAL zpsrf(ngridmx) |
---|
144 | REAL zplev(ngridmx,llm+1),zplay(ngridmx,llm) |
---|
145 | REAL zphi(ngridmx,llm),zphis(ngridmx) |
---|
146 | |
---|
147 | REAL zufi(ngridmx,llm), zvfi(ngridmx,llm) |
---|
148 | REAL ztfi(ngridmx,llm),zqfi(ngridmx,llm,nqtot) |
---|
149 | ! ADAPTATION GCM POUR CP(T) |
---|
150 | REAL zteta(ngridmx,llm) |
---|
151 | REAL zpk(ngridmx,llm) |
---|
152 | |
---|
153 | ! RQ SL 13/10/10: |
---|
154 | ! Ces calculs ne servent pas. |
---|
155 | ! Si necessaire, decommenter ces variables et les calculs... |
---|
156 | ! REAL pcvgu(ngridmx,llm), pcvgv(ngridmx,llm) |
---|
157 | ! REAL pcvgt(ngridmx,llm), pcvgq(ngridmx,llm,2) |
---|
158 | |
---|
159 | REAL zdufi(ngridmx,llm),zdvfi(ngridmx,llm) |
---|
160 | REAL zdtfi(ngridmx,llm),zdqfi(ngridmx,llm,nqtot) |
---|
161 | REAL zdpsrf(ngridmx) |
---|
162 | |
---|
163 | REAL zdufic(ngridmx,llm),zdvfic(ngridmx,llm) |
---|
164 | REAL zdtfic(ngridmx,llm),zdqfic(ngridmx,llm,nqtot) |
---|
165 | REAL jH_cur_split,zdt_split |
---|
166 | LOGICAL debut_split,lafin_split |
---|
167 | INTEGER isplit |
---|
168 | |
---|
169 | REAL zsin(iim),zcos(iim),z1(iim) |
---|
170 | REAL zsinbis(iim),zcosbis(iim),z1bis(iim) |
---|
171 | REAL unskap, pksurcp |
---|
172 | save unskap |
---|
173 | |
---|
174 | cIM diagnostique PVteta, Amip2 |
---|
175 | INTEGER ntetaSTD |
---|
176 | PARAMETER(ntetaSTD=3) |
---|
177 | REAL rtetaSTD(ntetaSTD) |
---|
178 | DATA rtetaSTD/350., 380., 405./ ! Earth-specific values, beware !! |
---|
179 | REAL PVteta(ngridmx,ntetaSTD) |
---|
180 | |
---|
181 | REAL flxw(iip1,jjp1,llm) ! Flux de masse verticale sur la grille dynamique |
---|
182 | REAL flxwfi(ngridmx,llm) ! Flux de masse verticale sur la grille physiq |
---|
183 | |
---|
184 | REAL SSUM |
---|
185 | |
---|
186 | LOGICAL firstcal, debut |
---|
187 | DATA firstcal/.true./ |
---|
188 | SAVE firstcal,debut |
---|
189 | ! REAL rdayvrai |
---|
190 | REAL, intent(in):: jD_cur, jH_cur |
---|
191 | |
---|
192 | LOGICAL tracerdyn ! for generic/mars physics call ; possibly to get rid of |
---|
193 | |
---|
194 | ! For Titan only right now: |
---|
195 | ! to allow for 2D computation of microphys and chemistry |
---|
196 | LOGICAL,save :: flag_moyzon |
---|
197 | REAL,allocatable,save :: tmpvar(:,:) |
---|
198 | REAL,allocatable,save :: tmpvarp1(:,:) |
---|
199 | REAL,allocatable,save :: tmpvarbar(:) |
---|
200 | REAL,allocatable,save :: tmpvarbarp1(:) |
---|
201 | real :: zz1,zz2 |
---|
202 | |
---|
203 | c----------------------------------------------------------------------- |
---|
204 | |
---|
205 | c 1. Initialisations : |
---|
206 | c -------------------- |
---|
207 | |
---|
208 | |
---|
209 | IF ( firstcal ) THEN |
---|
210 | debut = .TRUE. |
---|
211 | IF (ngridmx.NE.2+(jjm-1)*iim) THEN |
---|
212 | write(lunout,*) 'STOP dans calfis' |
---|
213 | write(lunout,*) |
---|
214 | & 'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim' |
---|
215 | write(lunout,*) ' ngridmx jjm iim ' |
---|
216 | write(lunout,*) ngridmx,jjm,iim |
---|
217 | STOP |
---|
218 | ENDIF |
---|
219 | |
---|
220 | unskap = 1./ kappa |
---|
221 | |
---|
222 | flag_moyzon = .false. |
---|
223 | if(moyzon_ch.or.moyzon_mu) then |
---|
224 | flag_moyzon = .true. |
---|
225 | allocate(tmpvar(iip1,llm)) |
---|
226 | allocate(tmpvarp1(iip1,llmp1)) |
---|
227 | allocate(tmpvarbar(llm)) |
---|
228 | allocate(tmpvarbarp1(llmp1)) |
---|
229 | endif |
---|
230 | |
---|
231 | if (flag_moyzon) call moyzon_init |
---|
232 | |
---|
233 | c---------------------------------------------- |
---|
234 | c moyennes globales pour le profil de pression |
---|
235 | if(planet_type.eq."titan".or.planet_type.eq."venus") then |
---|
236 | ALLOCATE(plevmoy(llm+1)) |
---|
237 | ALLOCATE(playmoy(llm)) |
---|
238 | ALLOCATE(tmoy(llm)) |
---|
239 | ALLOCATE(tetamoy(llm)) |
---|
240 | ALLOCATE(pkmoy(llm)) |
---|
241 | ALLOCATE(phimoy(0:llm)) |
---|
242 | ALLOCATE(zlevmoy(llm+1)) |
---|
243 | ALLOCATE(zlaymoy(llm)) |
---|
244 | plevmoy=0. |
---|
245 | do l=1,llmp1 |
---|
246 | do i=1,iip1 |
---|
247 | do j=1,jjp1 |
---|
248 | plevmoy(l)=plevmoy(l)+pp(i,j,l)/(iip1*jjp1) |
---|
249 | enddo |
---|
250 | enddo |
---|
251 | enddo |
---|
252 | tetamoy=0. |
---|
253 | pkmoy=0. |
---|
254 | phimoy=0. |
---|
255 | do i=1,iip1 |
---|
256 | do j=1,jjp1 |
---|
257 | phimoy(0)=phimoy(0)+pphis(i,j)/(iip1*jjp1) |
---|
258 | enddo |
---|
259 | enddo |
---|
260 | do l=1,llm |
---|
261 | do i=1,iip1 |
---|
262 | do j=1,jjp1 |
---|
263 | tetamoy(l)=tetamoy(l)+pteta(i,j,l)/(iip1*jjp1) |
---|
264 | pkmoy(l)=pkmoy(l)+ppk(i,j,l)/(iip1*jjp1) |
---|
265 | phimoy(l)=phimoy(l)+pphi(i,j,l)/(iip1*jjp1) |
---|
266 | enddo |
---|
267 | enddo |
---|
268 | enddo |
---|
269 | playmoy(:) = preff * (pkmoy(:)/cpp) ** unskap |
---|
270 | call tpot2t(llm,tetamoy,tmoy,pkmoy) |
---|
271 | c SI ON TIENT COMPTE DE LA VARIATION DE G AVEC L'ALTITUDE: |
---|
272 | zlaymoy(:) = g*rad*rad/(g*rad-phimoy(:))-rad |
---|
273 | zlevmoy(1) = phimoy(0)/g |
---|
274 | DO l=2,llm |
---|
275 | zz1=(playmoy(l-1)+plevmoy(l))/(playmoy(l-1)-plevmoy(l)) |
---|
276 | zz2=(plevmoy(l) +playmoy(l))/(plevmoy(l) -playmoy(l)) |
---|
277 | zlevmoy(l)=(zz1*zlaymoy(l-1)+zz2*zlaymoy(l))/(zz1+zz2) |
---|
278 | ENDDO |
---|
279 | zlevmoy(llmp1)=zlaymoy(llm)+(zlaymoy(llm)-zlevmoy(llm)) |
---|
280 | c------------------- |
---|
281 | c + lat index |
---|
282 | allocate(klat(ngridmx)) |
---|
283 | klat=0 |
---|
284 | klat(1) = 1 |
---|
285 | ig0 = 2 |
---|
286 | DO j = 2,jjm |
---|
287 | do i=0,iim-1 |
---|
288 | klat(ig0+i) = j |
---|
289 | enddo |
---|
290 | ig0 = ig0+iim |
---|
291 | ENDDO |
---|
292 | klat(ngridmx) = jjp1 |
---|
293 | endif ! planet_type=titan |
---|
294 | c---------------------------------------------- |
---|
295 | ELSE |
---|
296 | debut = .FALSE. |
---|
297 | ENDIF ! of IF (firstcal) |
---|
298 | |
---|
299 | |
---|
300 | c----------------------------------------------------------------------- |
---|
301 | c 40. transformation des variables dynamiques en variables physiques: |
---|
302 | c --------------------------------------------------------------- |
---|
303 | |
---|
304 | c 41. pressions au sol (en Pascals) |
---|
305 | c ---------------------------------- |
---|
306 | |
---|
307 | zpsrf(1) = pps(1,1) |
---|
308 | |
---|
309 | ig0 = 2 |
---|
310 | DO j = 2,jjm |
---|
311 | CALL SCOPY( iim,pps(1,j),1,zpsrf(ig0), 1 ) |
---|
312 | ig0 = ig0+iim |
---|
313 | ENDDO |
---|
314 | |
---|
315 | zpsrf(ngridmx) = pps(1,jjp1) |
---|
316 | |
---|
317 | c 42. pression intercouches et fonction d'Exner: |
---|
318 | |
---|
319 | c ----------------------------------------------------------------- |
---|
320 | c .... zplev definis aux (llm +1) interfaces des couches .... |
---|
321 | c .... zplay definis aux ( llm ) milieux des couches .... |
---|
322 | c ----------------------------------------------------------------- |
---|
323 | |
---|
324 | c ... Exner = cp * ( p(l) / preff ) ** kappa .... |
---|
325 | |
---|
326 | ! ADAPTATION GCM POUR CP(T) |
---|
327 | DO l = 1, llm |
---|
328 | zpk( 1,l ) = ppk(1,1,l) |
---|
329 | zteta( 1,l ) = pteta(1,1,l) |
---|
330 | zplev( 1,l ) = pp(1,1,l) |
---|
331 | ig0 = 2 |
---|
332 | DO j = 2, jjm |
---|
333 | DO i =1, iim |
---|
334 | zpk( ig0,l ) = ppk(i,j,l) |
---|
335 | zteta( ig0,l ) = pteta(i,j,l) |
---|
336 | zplev( ig0,l ) = pp(i,j,l) |
---|
337 | ig0 = ig0 +1 |
---|
338 | ENDDO |
---|
339 | ENDDO |
---|
340 | zpk( ngridmx,l ) = ppk(1,jjp1,l) |
---|
341 | zteta( ngridmx,l ) = pteta(1,jjp1,l) |
---|
342 | zplev( ngridmx,l ) = pp(1,jjp1,l) |
---|
343 | ENDDO |
---|
344 | zplev( 1,llmp1 ) = pp(1,1,llmp1) |
---|
345 | ig0 = 2 |
---|
346 | DO j = 2, jjm |
---|
347 | DO i =1, iim |
---|
348 | zplev( ig0,llmp1 ) = pp(i,j,llmp1) |
---|
349 | ig0 = ig0 +1 |
---|
350 | ENDDO |
---|
351 | ENDDO |
---|
352 | zplev( ngridmx,llmp1 ) = pp(1,jjp1,llmp1) |
---|
353 | |
---|
354 | if (flag_moyzon) then |
---|
355 | tmpvarp1(:,:) = pp(:,1,:) |
---|
356 | call moyzon(llmp1,tmpvarp1,tmpvarbarp1) |
---|
357 | zplevbar(1,:) = tmpvarbarp1 |
---|
358 | tmpvar(:,:) = ppk(:,1,:) |
---|
359 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
360 | zpkbar(1,:) = tmpvarbar |
---|
361 | tmpvar(:,:) = pteta(:,1,:) |
---|
362 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
363 | ztetabar(1,:) = tmpvarbar |
---|
364 | call tpot2t(llm,ztetabar(1,:),ztfibar(1,:),zpkbar(1,:)) |
---|
365 | ig0 = 2 |
---|
366 | do j = 2, jjm |
---|
367 | tmpvarp1(:,:) = pp(:,j,:) |
---|
368 | call moyzon(llmp1,tmpvarp1,tmpvarbarp1) |
---|
369 | zplevbar(ig0,:) = tmpvarbarp1 |
---|
370 | tmpvar(:,:) = ppk(:,j,:) |
---|
371 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
372 | zpkbar(ig0,:) = tmpvarbar |
---|
373 | tmpvar(:,:) = pteta(:,j,:) |
---|
374 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
375 | ztetabar(ig0,:) = tmpvarbar |
---|
376 | call tpot2t(llm,ztetabar(ig0,:),ztfibar(ig0,:),zpkbar(ig0,:)) |
---|
377 | ig0 = ig0+1 |
---|
378 | do i=2,iim |
---|
379 | zplevbar(ig0,:) = zplevbar(ig0-1,:) |
---|
380 | zpkbar(ig0,:) = zpkbar(ig0-1,:) |
---|
381 | ztetabar(ig0,:) = ztetabar(ig0-1,:) |
---|
382 | ztfibar(ig0,:) = ztfibar(ig0-1,:) |
---|
383 | ig0 = ig0+1 |
---|
384 | enddo |
---|
385 | enddo |
---|
386 | tmpvarp1(:,:) = pp(:,jjp1,:) |
---|
387 | call moyzon(llmp1,tmpvarp1,tmpvarbarp1) |
---|
388 | zplevbar(ngridmx,:) = tmpvarbarp1 |
---|
389 | tmpvar(:,:) = ppk(:,jjp1,:) |
---|
390 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
391 | zpkbar(ngridmx,:) = tmpvarbar |
---|
392 | tmpvar(:,:) = pteta(:,jjp1,:) |
---|
393 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
394 | ztetabar(ngridmx,:) = tmpvarbar |
---|
395 | call tpot2t(llm,ztetabar(ngridmx,:), |
---|
396 | . ztfibar(ngridmx,:),zpkbar(ngridmx,:)) |
---|
397 | endif |
---|
398 | |
---|
399 | c 43. temperature naturelle (en K) et pressions milieux couches . |
---|
400 | c --------------------------------------------------------------- |
---|
401 | |
---|
402 | ! ADAPTATION GCM POUR CP(T) |
---|
403 | call tpot2t(ngridmx*llm,zteta,ztfi,zpk) |
---|
404 | |
---|
405 | DO l=1,llm |
---|
406 | |
---|
407 | pksurcp = ppk(1,1,l) / cpp |
---|
408 | zplay(1,l) = preff * pksurcp ** unskap |
---|
409 | ! pcvgt(1,l) = pdteta(1,1,l) * pksurcp / pmasse(1,1,l) |
---|
410 | ig0 = 2 |
---|
411 | |
---|
412 | DO j = 2, jjm |
---|
413 | DO i = 1, iim |
---|
414 | pksurcp = ppk(i,j,l) / cpp |
---|
415 | zplay(ig0,l) = preff * pksurcp ** unskap |
---|
416 | ! pcvgt(ig0,l) = pdteta(i,j,l) * pksurcp / pmasse(i,j,l) |
---|
417 | ig0 = ig0 + 1 |
---|
418 | ENDDO |
---|
419 | ENDDO |
---|
420 | |
---|
421 | pksurcp = ppk(1,jjp1,l) / cpp |
---|
422 | zplay(ig0,l) = preff * pksurcp ** unskap |
---|
423 | ! pcvgt(ig0,l) = pdteta(1,jjp1,l) * pksurcp/ pmasse(1,jjp1,l) |
---|
424 | |
---|
425 | ENDDO |
---|
426 | |
---|
427 | if (flag_moyzon) then |
---|
428 | zplaybar(:,:) = preff * (zpkbar(:,:)/cpp)**unskap |
---|
429 | endif |
---|
430 | |
---|
431 | c 43.bis traceurs (tous intensifs) |
---|
432 | c --------------- |
---|
433 | |
---|
434 | DO iq=1,nqtot |
---|
435 | DO l=1,llm |
---|
436 | zqfi(1,l,iq) = pq(1,1,l,iq) |
---|
437 | ig0 = 2 |
---|
438 | DO j=2,jjm |
---|
439 | DO i = 1, iim |
---|
440 | zqfi(ig0,l,iq) = pq(i,j,l,iq) |
---|
441 | ig0 = ig0 + 1 |
---|
442 | ENDDO |
---|
443 | ENDDO |
---|
444 | zqfi(ig0,l,iq) = pq(1,jjp1,l,iq) |
---|
445 | ENDDO |
---|
446 | ENDDO ! boucle sur traceurs |
---|
447 | |
---|
448 | if (flag_moyzon) then |
---|
449 | DO iq=1,nqtot |
---|
450 | ! RQ: REVOIR A QUOI CA SERT... ET VERIFIER... |
---|
451 | ! iiq=niadv(iq) |
---|
452 | ! en fait, iiq=iq... |
---|
453 | ! FIN RQ |
---|
454 | tmpvar(:,:) = pq(:,1,:,iq) |
---|
455 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
456 | zqfibar(1,:,iq) = tmpvarbar |
---|
457 | ig0 = 2 |
---|
458 | do j = 2, jjm |
---|
459 | tmpvar(:,:) = pq(:,j,:,iq) |
---|
460 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
461 | zqfibar(ig0,:,iq) = tmpvarbar |
---|
462 | ig0 = ig0+1 |
---|
463 | do i=2,iim |
---|
464 | zqfibar(ig0,:,iq) = zqfibar(ig0-1,:,iq) |
---|
465 | ig0 = ig0+1 |
---|
466 | enddo |
---|
467 | enddo |
---|
468 | tmpvar(:,:) = pq(:,jjp1,:,iq) |
---|
469 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
470 | zqfibar(ngridmx,:,iq) = tmpvarbar |
---|
471 | ENDDO ! of DO iq=1,nqtot |
---|
472 | endif |
---|
473 | |
---|
474 | ! DEBUG |
---|
475 | ! do ig0=1,ngridmx |
---|
476 | ! write(*,'(6(e13.5,1x))') zqfibar(ig0,1,10),zqfi(ig0,1,10), |
---|
477 | ! . zqfibar(ig0,llm/2,10),zqfi(ig0,llm/2,10), |
---|
478 | ! . zqfibar(ig0,llm,10),zqfi(ig0,llm,10) |
---|
479 | ! enddo |
---|
480 | ! stop |
---|
481 | |
---|
482 | !----------------- |
---|
483 | ! RQ SL 13/10/10: |
---|
484 | ! Ces calculs ne servent pas. |
---|
485 | ! Si necessaire, decommenter ces variables et les calculs... |
---|
486 | ! |
---|
487 | ! convergence dynamique pour les traceurs "EAU" |
---|
488 | ! Earth-specific treatment of first 2 tracers (water) |
---|
489 | ! if (planet_type=="earth") then |
---|
490 | ! DO iq=1,2 |
---|
491 | ! DO l=1,llm |
---|
492 | ! pcvgq(1,l,iq)= pdq(1,1,l,iq) / pmasse(1,1,l) |
---|
493 | ! ig0 = 2 |
---|
494 | ! DO j=2,jjm |
---|
495 | ! DO i = 1, iim |
---|
496 | ! pcvgq(ig0,l,iq) = pdq(i,j,l,iq) / pmasse(i,j,l) |
---|
497 | ! ig0 = ig0 + 1 |
---|
498 | ! ENDDO |
---|
499 | ! ENDDO |
---|
500 | ! pcvgq(ig0,l,iq)= pdq(1,jjp1,l,iq) / pmasse(1,jjp1,l) |
---|
501 | ! ENDDO |
---|
502 | ! ENDDO |
---|
503 | ! endif ! of if (planet_type=="earth") |
---|
504 | !---------------- |
---|
505 | |
---|
506 | c Geopotentiel calcule par rapport a la surface locale: |
---|
507 | c ----------------------------------------------------- |
---|
508 | |
---|
509 | CALL gr_dyn_fi(llm,iip1,jjp1,ngridmx,pphi,zphi) |
---|
510 | CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,pphis,zphis) |
---|
511 | DO l=1,llm |
---|
512 | DO ig=1,ngridmx |
---|
513 | zphi(ig,l)=zphi(ig,l)-zphis(ig) |
---|
514 | ENDDO |
---|
515 | ENDDO |
---|
516 | |
---|
517 | if (flag_moyzon) then |
---|
518 | tmpvar(:,1) = pphis(:,1) |
---|
519 | call moyzon(1,tmpvar(:,1),tmpvarbar(1)) |
---|
520 | zphisbar(1) = tmpvarbar(1) |
---|
521 | tmpvar(:,:) = pphi(:,1,:) |
---|
522 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
523 | zphibar(1,:) = tmpvarbar |
---|
524 | ig0 = 2 |
---|
525 | do j = 2, jjm |
---|
526 | tmpvar(:,1) = pphis(:,j) |
---|
527 | call moyzon(1,tmpvar(:,1),tmpvarbar(1)) |
---|
528 | zphisbar(ig0) = tmpvarbar(1) |
---|
529 | tmpvar(:,:) = pphi(:,j,:) |
---|
530 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
531 | zphibar(ig0,:) = tmpvarbar |
---|
532 | ig0 = ig0+1 |
---|
533 | do i=2,iim |
---|
534 | zphisbar(ig0) = zphisbar(ig0-1) |
---|
535 | zphibar(ig0,:) = zphibar(ig0-1,:) |
---|
536 | ig0 = ig0+1 |
---|
537 | enddo |
---|
538 | enddo |
---|
539 | tmpvar(:,1) = pphis(:,jjp1) |
---|
540 | call moyzon(1,tmpvar(:,1),tmpvarbar(1)) |
---|
541 | zphisbar(ngridmx) = tmpvarbar(1) |
---|
542 | tmpvar(:,:) = pphi(:,jjp1,:) |
---|
543 | call moyzon(llm,tmpvar,tmpvarbar) |
---|
544 | zphibar(ngridmx,:) = tmpvarbar |
---|
545 | endif |
---|
546 | |
---|
547 | c .... Calcul de la vitesse verticale ( en Pa*m*s ou Kg/s ) .... |
---|
548 | c JG : ancien calcule de omega utilise dans physiq.F. Maintenant le flux |
---|
549 | c de masse est calclue dans advtrac.F |
---|
550 | c DO l=1,llm |
---|
551 | c pvervel(1,l)=pw(1,1,l) * g /apoln |
---|
552 | c ig0=2 |
---|
553 | c DO j=2,jjm |
---|
554 | c DO i = 1, iim |
---|
555 | c pvervel(ig0,l) = pw(i,j,l) * g * unsaire(i,j) |
---|
556 | c ig0 = ig0 + 1 |
---|
557 | c ENDDO |
---|
558 | c ENDDO |
---|
559 | c pvervel(ig0,l)=pw(1,jjp1,l) * g /apols |
---|
560 | c ENDDO |
---|
561 | |
---|
562 | c |
---|
563 | c 45. champ u: |
---|
564 | c ------------ |
---|
565 | |
---|
566 | DO 50 l=1,llm |
---|
567 | |
---|
568 | DO 25 j=2,jjm |
---|
569 | ig0 = 1+(j-2)*iim |
---|
570 | zufi(ig0+1,l)= 0.5 * |
---|
571 | $ ( pucov(iim,j,l)/cu(iim,j) + pucov(1,j,l)/cu(1,j) ) |
---|
572 | ! pcvgu(ig0+1,l)= 0.5 * |
---|
573 | ! $ ( pducov(iim,j,l)/cu(iim,j) + pducov(1,j,l)/cu(1,j) ) |
---|
574 | DO 10 i=2,iim |
---|
575 | zufi(ig0+i,l)= 0.5 * |
---|
576 | $ ( pucov(i-1,j,l)/cu(i-1,j) + pucov(i,j,l)/cu(i,j) ) |
---|
577 | ! pcvgu(ig0+i,l)= 0.5 * |
---|
578 | ! $ ( pducov(i-1,j,l)/cu(i-1,j) + pducov(i,j,l)/cu(i,j) ) |
---|
579 | 10 CONTINUE |
---|
580 | 25 CONTINUE |
---|
581 | |
---|
582 | 50 CONTINUE |
---|
583 | |
---|
584 | |
---|
585 | c 46.champ v: |
---|
586 | c ----------- |
---|
587 | |
---|
588 | DO l=1,llm |
---|
589 | DO j=2,jjm |
---|
590 | ig0=1+(j-2)*iim |
---|
591 | DO i=1,iim |
---|
592 | zvfi(ig0+i,l)= 0.5 * |
---|
593 | $ ( pvcov(i,j-1,l)/cv(i,j-1) + pvcov(i,j,l)/cv(i,j) ) |
---|
594 | c pcvgv(ig0+i,l)= 0.5 * |
---|
595 | c $ ( pdvcov(i,j-1,l)/cv(i,j-1) + pdvcov(i,j,l)/cv(i,j) ) |
---|
596 | ENDDO |
---|
597 | ENDDO |
---|
598 | ENDDO |
---|
599 | |
---|
600 | |
---|
601 | c 47. champs de vents aux pole nord |
---|
602 | c ------------------------------ |
---|
603 | c U = 1 / pi * integrale [ v * cos(long) * d long ] |
---|
604 | c V = 1 / pi * integrale [ v * sin(long) * d long ] |
---|
605 | |
---|
606 | DO l=1,llm |
---|
607 | |
---|
608 | z1(1) =(rlonu(1)-rlonu(iim)+2.*pi)*pvcov(1,1,l)/cv(1,1) |
---|
609 | z1bis(1)=(rlonu(1)-rlonu(iim)+2.*pi)*pdvcov(1,1,l)/cv(1,1) |
---|
610 | DO i=2,iim |
---|
611 | z1(i) =(rlonu(i)-rlonu(i-1))*pvcov(i,1,l)/cv(i,1) |
---|
612 | z1bis(i)=(rlonu(i)-rlonu(i-1))*pdvcov(i,1,l)/cv(i,1) |
---|
613 | ENDDO |
---|
614 | |
---|
615 | DO i=1,iim |
---|
616 | zcos(i) = COS(rlonv(i))*z1(i) |
---|
617 | zcosbis(i)= COS(rlonv(i))*z1bis(i) |
---|
618 | zsin(i) = SIN(rlonv(i))*z1(i) |
---|
619 | zsinbis(i)= SIN(rlonv(i))*z1bis(i) |
---|
620 | ENDDO |
---|
621 | |
---|
622 | zufi(1,l) = SSUM(iim,zcos,1)/pi |
---|
623 | ! pcvgu(1,l) = SSUM(iim,zcosbis,1)/pi |
---|
624 | zvfi(1,l) = SSUM(iim,zsin,1)/pi |
---|
625 | ! pcvgv(1,l) = SSUM(iim,zsinbis,1)/pi |
---|
626 | |
---|
627 | ENDDO |
---|
628 | |
---|
629 | |
---|
630 | c 48. champs de vents aux pole sud: |
---|
631 | c --------------------------------- |
---|
632 | c U = 1 / pi * integrale [ v * cos(long) * d long ] |
---|
633 | c V = 1 / pi * integrale [ v * sin(long) * d long ] |
---|
634 | |
---|
635 | DO l=1,llm |
---|
636 | |
---|
637 | z1(1) =(rlonu(1)-rlonu(iim)+2.*pi)*pvcov(1,jjm,l)/cv(1,jjm) |
---|
638 | z1bis(1)=(rlonu(1)-rlonu(iim)+2.*pi)*pdvcov(1,jjm,l)/cv(1,jjm) |
---|
639 | DO i=2,iim |
---|
640 | z1(i) =(rlonu(i)-rlonu(i-1))*pvcov(i,jjm,l)/cv(i,jjm) |
---|
641 | z1bis(i)=(rlonu(i)-rlonu(i-1))*pdvcov(i,jjm,l)/cv(i,jjm) |
---|
642 | ENDDO |
---|
643 | |
---|
644 | DO i=1,iim |
---|
645 | zcos(i) = COS(rlonv(i))*z1(i) |
---|
646 | zcosbis(i) = COS(rlonv(i))*z1bis(i) |
---|
647 | zsin(i) = SIN(rlonv(i))*z1(i) |
---|
648 | zsinbis(i) = SIN(rlonv(i))*z1bis(i) |
---|
649 | ENDDO |
---|
650 | |
---|
651 | zufi(ngridmx,l) = SSUM(iim,zcos,1)/pi |
---|
652 | ! pcvgu(ngridmx,l) = SSUM(iim,zcosbis,1)/pi |
---|
653 | zvfi(ngridmx,l) = SSUM(iim,zsin,1)/pi |
---|
654 | ! pcvgv(ngridmx,l) = SSUM(iim,zsinbis,1)/pi |
---|
655 | |
---|
656 | ENDDO |
---|
657 | c |
---|
658 | if (planet_type=="earth") then |
---|
659 | #ifdef CPP_EARTH |
---|
660 | ! PVtheta calls tetalevel, which is in the (Earth) physics |
---|
661 | cIM calcul PV a teta=350, 380, 405K |
---|
662 | CALL PVtheta(ngridmx,llm,pucov,pvcov,pteta, |
---|
663 | $ ztfi,zplay,zplev, |
---|
664 | $ ntetaSTD,rtetaSTD,PVteta) |
---|
665 | #endif |
---|
666 | endif |
---|
667 | c |
---|
668 | c On change de grille, dynamique vers physiq, pour le flux de masse verticale |
---|
669 | CALL gr_dyn_fi(llm,iip1,jjp1,ngridmx,flxw,flxwfi) |
---|
670 | |
---|
671 | c----------------------------------------------------------------------- |
---|
672 | c Appel de la physique: |
---|
673 | c --------------------- |
---|
674 | |
---|
675 | ! Appel de la physique: pose probleme quand on tourne |
---|
676 | ! SANS physique, car physiq.F est dans le repertoire phy[]... |
---|
677 | ! Il faut une cle CPP_PHYS |
---|
678 | |
---|
679 | ! Le fait que les arguments de physiq soient differents selon les planetes |
---|
680 | ! ne pose pas de probleme a priori. |
---|
681 | |
---|
682 | ! write(lunout,*) 'PHYSIQUE AVEC NSPLIT_PHYS=',nsplit_phys |
---|
683 | zdt_split=dtphys/nsplit_phys |
---|
684 | zdufic(:,:)=0. |
---|
685 | zdvfic(:,:)=0. |
---|
686 | zdtfic(:,:)=0. |
---|
687 | zdqfic(:,:,:)=0. |
---|
688 | |
---|
689 | #ifdef CPP_PHYS |
---|
690 | |
---|
691 | do isplit=1,nsplit_phys |
---|
692 | |
---|
693 | jH_cur_split=jH_cur+(isplit-1) * dtvr / (daysec *nsplit_phys) |
---|
694 | debut_split=debut.and.isplit==1 |
---|
695 | lafin_split=lafin.and.isplit==nsplit_phys |
---|
696 | |
---|
697 | if (planet_type.eq."earth") then |
---|
698 | CALL physiq (ngridmx, |
---|
699 | . llm, |
---|
700 | . debut_split, |
---|
701 | . lafin_split, |
---|
702 | . jD_cur, |
---|
703 | . jH_cur_split, |
---|
704 | . zdt_split, |
---|
705 | . zplev, |
---|
706 | . zplay, |
---|
707 | . zphi, |
---|
708 | . zphis, |
---|
709 | . presnivs, |
---|
710 | . zufi, |
---|
711 | . zvfi, |
---|
712 | . ztfi, |
---|
713 | . zqfi, |
---|
714 | . flxwfi, |
---|
715 | . zdufi, |
---|
716 | . zdvfi, |
---|
717 | . zdtfi, |
---|
718 | . zdqfi, |
---|
719 | . zdpsrf, |
---|
720 | cIM diagnostique PVteta, Amip2 |
---|
721 | . pducov, |
---|
722 | . PVteta) |
---|
723 | |
---|
724 | else if ( planet_type=="generic" ) then |
---|
725 | |
---|
726 | CALL physiq (ngridmx, !! ngrid |
---|
727 | . llm, !! nlayer |
---|
728 | . nqtot, !! nq |
---|
729 | . tname, !! tracer names from dynamical core (given in infotrac) |
---|
730 | . debut_split, !! firstcall |
---|
731 | . lafin_split, !! lastcall |
---|
732 | . jD_cur, !! pday. see leapfrog |
---|
733 | . jH_cur_split, !! ptime "fraction of day" |
---|
734 | . zdt_split, !! ptimestep |
---|
735 | . zplev, !! pplev |
---|
736 | . zplay, !! pplay |
---|
737 | . zphi, !! pphi |
---|
738 | . zufi, !! pu |
---|
739 | . zvfi, !! pv |
---|
740 | . ztfi, !! pt |
---|
741 | . zqfi, !! pq |
---|
742 | . flxwfi, !! pw !! or 0. anyway this is for diagnostic. not used in physiq. |
---|
743 | . zdufi, !! pdu |
---|
744 | . zdvfi, !! pdv |
---|
745 | . zdtfi, !! pdt |
---|
746 | . zdqfi, !! pdq |
---|
747 | . zdpsrf, !! pdpsrf |
---|
748 | . tracerdyn) !! tracerdyn <-- utilite ??? |
---|
749 | |
---|
750 | else if ( planet_type=="mars" ) then |
---|
751 | |
---|
752 | CALL physiq (ngridmx, ! ngrid |
---|
753 | . llm, ! nlayer |
---|
754 | . nqtot, ! nq |
---|
755 | . debut_split, ! firstcall |
---|
756 | . lafin_split, ! lastcall |
---|
757 | . jD_cur, ! pday |
---|
758 | . jH_cur_split, ! ptime |
---|
759 | . zdt_split, ! ptimestep |
---|
760 | . zplev, ! pplev |
---|
761 | . zplay, ! pplay |
---|
762 | . zphi, ! pphi |
---|
763 | . zufi, ! pu |
---|
764 | . zvfi, ! pv |
---|
765 | . ztfi, ! pt |
---|
766 | . zqfi, ! pq |
---|
767 | . flxwfi, ! pw |
---|
768 | . zdufi, ! pdu |
---|
769 | . zdvfi, ! pdv |
---|
770 | . zdtfi, ! pdt |
---|
771 | . zdqfi, ! pdq |
---|
772 | . zdpsrf, ! pdpsrf |
---|
773 | . tracerdyn) ! tracerdyn (somewhat obsolete) |
---|
774 | |
---|
775 | else ! unknown "planet_type" |
---|
776 | |
---|
777 | write(lunout,*) "calfis_p: error, unknown planet_type: ", |
---|
778 | & trim(planet_type) |
---|
779 | stop |
---|
780 | |
---|
781 | endif ! planet_type |
---|
782 | |
---|
783 | zufi(:,:)=zufi(:,:)+zdufi(:,:)*zdt_split |
---|
784 | zvfi(:,:)=zvfi(:,:)+zdvfi(:,:)*zdt_split |
---|
785 | ztfi(:,:)=ztfi(:,:)+zdtfi(:,:)*zdt_split |
---|
786 | zqfi(:,:,:)=zqfi(:,:,:)+zdqfi(:,:,:)*zdt_split |
---|
787 | |
---|
788 | zdufic(:,:)=zdufic(:,:)+zdufi(:,:) |
---|
789 | zdvfic(:,:)=zdvfic(:,:)+zdvfi(:,:) |
---|
790 | zdtfic(:,:)=zdtfic(:,:)+zdtfi(:,:) |
---|
791 | zdqfic(:,:,:)=zdqfic(:,:,:)+zdqfi(:,:,:) |
---|
792 | |
---|
793 | enddo ! of do isplit=1,nsplit_phys |
---|
794 | |
---|
795 | ! ATTENTION... |
---|
796 | if (flag_moyzon.and.(nsplit_phys.ne.1)) then |
---|
797 | print*,"WARNING ! flag_moyzon + nsplit_phys" |
---|
798 | print*,"zqfibar n'est pas implemente au cours des iterations" |
---|
799 | print*,"Donc a revoir..." |
---|
800 | stop |
---|
801 | endif |
---|
802 | |
---|
803 | #endif |
---|
804 | ! #endif of #ifdef CPP_PHYS |
---|
805 | |
---|
806 | zdufi(:,:)=zdufic(:,:)/nsplit_phys |
---|
807 | zdvfi(:,:)=zdvfic(:,:)/nsplit_phys |
---|
808 | zdtfi(:,:)=zdtfic(:,:)/nsplit_phys |
---|
809 | zdqfi(:,:,:)=zdqfic(:,:,:)/nsplit_phys |
---|
810 | |
---|
811 | |
---|
812 | 500 CONTINUE |
---|
813 | |
---|
814 | c----------------------------------------------------------------------- |
---|
815 | c transformation des tendances physiques en tendances dynamiques: |
---|
816 | c --------------------------------------------------------------- |
---|
817 | |
---|
818 | c tendance sur la pression : |
---|
819 | c ----------------------------------- |
---|
820 | |
---|
821 | CALL gr_fi_dyn(1,ngridmx,iip1,jjp1,zdpsrf,pdpsfi) |
---|
822 | c |
---|
823 | c 62. enthalpie potentielle |
---|
824 | c --------------------- |
---|
825 | |
---|
826 | ! ADAPTATION GCM POUR CP(T) |
---|
827 | call t2tpot(ngridmx*llm,ztfi,zteta,zpk) |
---|
828 | |
---|
829 | DO i=1,iip1 |
---|
830 | pdhfi(i,1,:) = (zteta(1,:) - pteta(i,1,:))/dtphys |
---|
831 | pdhfi(i,jjp1,:) = (zteta(ngridmx,:) - pteta(i,jjp1,:))/dtphys |
---|
832 | ENDDO |
---|
833 | |
---|
834 | DO j=2,jjm |
---|
835 | ig0=1+(j-2)*iim |
---|
836 | DO i=1,iim |
---|
837 | pdhfi(i,j,:) = (zteta(ig0+i,:) - pteta(i,j,:))/dtphys |
---|
838 | ENDDO |
---|
839 | pdhfi(iip1,j,:) = pdhfi(1,j,:) |
---|
840 | ENDDO |
---|
841 | |
---|
842 | |
---|
843 | c 62. humidite specifique |
---|
844 | c --------------------- |
---|
845 | ! Ehouarn: removed this useless bit: was overwritten at step 63 anyways |
---|
846 | ! DO iq=1,nqtot |
---|
847 | ! DO l=1,llm |
---|
848 | ! DO i=1,iip1 |
---|
849 | ! pdqfi(i,1,l,iq) = zdqfi(1,l,iq) |
---|
850 | ! pdqfi(i,jjp1,l,iq) = zdqfi(ngridmx,l,iq) |
---|
851 | ! ENDDO |
---|
852 | ! DO j=2,jjm |
---|
853 | ! ig0=1+(j-2)*iim |
---|
854 | ! DO i=1,iim |
---|
855 | ! pdqfi(i,j,l,iq) = zdqfi(ig0+i,l,iq) |
---|
856 | ! ENDDO |
---|
857 | ! pdqfi(iip1,j,l,iq) = pdqfi(1,j,l,iq) |
---|
858 | ! ENDDO |
---|
859 | ! ENDDO |
---|
860 | ! ENDDO |
---|
861 | |
---|
862 | c 63. traceurs (tous en intensifs) |
---|
863 | c ------------ |
---|
864 | C initialisation des tendances |
---|
865 | pdqfi(:,:,:,:)=0. |
---|
866 | C |
---|
867 | DO iq=1,nqtot |
---|
868 | iiq=niadv(iq) |
---|
869 | DO l=1,llm |
---|
870 | DO i=1,iip1 |
---|
871 | pdqfi(i,1,l,iiq) = zdqfi(1,l,iq) |
---|
872 | pdqfi(i,jjp1,l,iiq) = zdqfi(ngridmx,l,iq) |
---|
873 | ENDDO |
---|
874 | DO j=2,jjm |
---|
875 | ig0=1+(j-2)*iim |
---|
876 | DO i=1,iim |
---|
877 | pdqfi(i,j,l,iiq) = zdqfi(ig0+i,l,iq) |
---|
878 | ENDDO |
---|
879 | pdqfi(iip1,j,l,iiq) = pdqfi(1,j,l,iq) |
---|
880 | ENDDO |
---|
881 | ENDDO |
---|
882 | ENDDO |
---|
883 | |
---|
884 | c 65. champ u: |
---|
885 | c ------------ |
---|
886 | |
---|
887 | DO l=1,llm |
---|
888 | |
---|
889 | DO i=1,iip1 |
---|
890 | pdufi(i,1,l) = 0. |
---|
891 | pdufi(i,jjp1,l) = 0. |
---|
892 | ENDDO |
---|
893 | |
---|
894 | DO j=2,jjm |
---|
895 | ig0=1+(j-2)*iim |
---|
896 | DO i=1,iim-1 |
---|
897 | pdufi(i,j,l)= |
---|
898 | $ 0.5*(zdufi(ig0+i,l)+zdufi(ig0+i+1,l))*cu(i,j) |
---|
899 | ENDDO |
---|
900 | pdufi(iim,j,l)= |
---|
901 | $ 0.5*(zdufi(ig0+1,l)+zdufi(ig0+iim,l))*cu(iim,j) |
---|
902 | pdufi(iip1,j,l)=pdufi(1,j,l) |
---|
903 | ENDDO |
---|
904 | |
---|
905 | ENDDO |
---|
906 | |
---|
907 | |
---|
908 | c 67. champ v: |
---|
909 | c ------------ |
---|
910 | |
---|
911 | DO l=1,llm |
---|
912 | |
---|
913 | DO j=2,jjm-1 |
---|
914 | ig0=1+(j-2)*iim |
---|
915 | DO i=1,iim |
---|
916 | pdvfi(i,j,l)= |
---|
917 | $ 0.5*(zdvfi(ig0+i,l)+zdvfi(ig0+i+iim,l))*cv(i,j) |
---|
918 | ENDDO |
---|
919 | pdvfi(iip1,j,l) = pdvfi(1,j,l) |
---|
920 | ENDDO |
---|
921 | ENDDO |
---|
922 | |
---|
923 | |
---|
924 | c 68. champ v pres des poles: |
---|
925 | c --------------------------- |
---|
926 | c v = U * cos(long) + V * SIN(long) |
---|
927 | |
---|
928 | DO l=1,llm |
---|
929 | |
---|
930 | DO i=1,iim |
---|
931 | pdvfi(i,1,l)= |
---|
932 | $ zdufi(1,l)*COS(rlonv(i))+zdvfi(1,l)*SIN(rlonv(i)) |
---|
933 | pdvfi(i,jjm,l)=zdufi(ngridmx,l)*COS(rlonv(i)) |
---|
934 | $ +zdvfi(ngridmx,l)*SIN(rlonv(i)) |
---|
935 | pdvfi(i,1,l)= |
---|
936 | $ 0.5*(pdvfi(i,1,l)+zdvfi(i+1,l))*cv(i,1) |
---|
937 | pdvfi(i,jjm,l)= |
---|
938 | $ 0.5*(pdvfi(i,jjm,l)+zdvfi(ngridmx-iip1+i,l))*cv(i,jjm) |
---|
939 | ENDDO |
---|
940 | |
---|
941 | pdvfi(iip1,1,l) = pdvfi(1,1,l) |
---|
942 | pdvfi(iip1,jjm,l)= pdvfi(1,jjm,l) |
---|
943 | |
---|
944 | ENDDO |
---|
945 | |
---|
946 | c----------------------------------------------------------------------- |
---|
947 | |
---|
948 | 700 CONTINUE |
---|
949 | |
---|
950 | firstcal = .FALSE. |
---|
951 | |
---|
952 | RETURN |
---|
953 | END |
---|