1 |
SUBROUTINE inigeom |
SUBROUTINE inigeom |
2 |
c |
|
3 |
c Auteur : P. Le Van |
! Auteur : P. Le Van |
4 |
c |
|
5 |
c ............ Version du 01/04/2001 ................... |
! ............ Version du 01/04/2001 ................... |
6 |
c |
|
7 |
c Calcul des elongations cuij1,.cuij4 , cvij1,..cvij4 aux memes en- |
! Calcul des elongations cuij1,.cuij4 , cvij1,..cvij4 aux memes en- |
8 |
c endroits que les aires aireij1_2d,..aireij4_2d . |
! endroits que les aires aireij1_2d,..aireij4_2d . |
9 |
|
|
10 |
c Choix entre f(y) a derivee sinusoid. ou a derivee tangente hyperbol. |
! Choix entre f(y) a derivee sinusoid. ou a derivee tangente hyperbol. |
11 |
C Possibilité d'appeler une fonction "f(y)" à |
! Possibilité d'appeler une fonction "f(y)" à |
12 |
C dérivée tangente hyperbolique à la place de la fonction à dérivée |
! dérivée tangente hyperbolique à la place de la fonction à dérivée |
13 |
C sinusoïdale. |
! sinusoïdale. |
14 |
c |
|
15 |
c |
|
16 |
use dimens_m |
USE dimens_m |
17 |
use paramet_m |
USE paramet_m |
18 |
use comconst |
USE comconst |
19 |
use comdissnew |
USE comdissnew |
20 |
use logic |
USE logic |
21 |
use comgeom |
USE comgeom |
22 |
use serre |
USE serre |
23 |
IMPLICIT NONE |
IMPLICIT NONE |
24 |
c |
|
25 |
|
|
26 |
c------------------------------------------------------------------ |
!------------------------------------------------------------------ |
27 |
c .... Variables locales .... |
! .... Variables locales .... |
28 |
c |
|
29 |
INTEGER i,j,itmax,itmay,iter |
INTEGER i, j, itmax, itmay, iter |
30 |
REAL cvu(iip1,jjp1),cuv(iip1,jjm) |
REAL cvu(iip1,jjp1), cuv(iip1,jjm) |
31 |
REAL ai14,ai23,airez,rlatp,rlatm,xprm,xprp,un4rad2,yprp,yprm |
REAL ai14, ai23, airez, rlatp, rlatm, xprm, xprp, un4rad2, yprp, yprm |
32 |
REAL eps,x1,xo1,f,df,xdm,y1,yo1,ydm |
REAL eps, x1, xo1, f, df, xdm, y1, yo1, ydm |
33 |
REAL coslatm,coslatp,radclatm,radclatp |
REAL coslatm, coslatp, radclatm, radclatp |
34 |
REAL cuij1(iip1,jjp1),cuij2(iip1,jjp1),cuij3(iip1,jjp1), |
REAL cuij1(iip1,jjp1), cuij2(iip1,jjp1), cuij3(iip1,jjp1), & |
35 |
* cuij4(iip1,jjp1) |
cuij4(iip1,jjp1) |
36 |
REAL cvij1(iip1,jjp1),cvij2(iip1,jjp1),cvij3(iip1,jjp1), |
REAL cvij1(iip1,jjp1), cvij2(iip1,jjp1), cvij3(iip1,jjp1), & |
37 |
* cvij4(iip1,jjp1) |
cvij4(iip1,jjp1) |
38 |
REAL rlonvv(iip1),rlatuu(jjp1) |
REAL rlonvv(iip1), rlatuu(jjp1) |
39 |
REAL rlatu1(jjm),yprimu1(jjm),rlatu2(jjm),yprimu2(jjm) , |
REAL rlatu1(jjm), yprimu1(jjm), rlatu2(jjm), yprimu2(jjm), yprimv(jjm), & |
40 |
* yprimv(jjm),yprimu(jjp1) |
yprimu(jjp1) |
41 |
REAL gamdi_gdiv, gamdi_grot, gamdi_h |
REAL gamdi_gdiv, gamdi_grot, gamdi_h |
42 |
|
|
43 |
REAL rlonm025(iip1),xprimm025(iip1), rlonp025(iip1), |
REAL rlonm025(iip1), xprimm025(iip1), rlonp025(iip1), xprimp025(iip1) |
44 |
, xprimp025(iip1) |
SAVE rlatu1, yprimu1, rlatu2, yprimu2, yprimv, yprimu |
45 |
SAVE rlatu1,yprimu1,rlatu2,yprimu2,yprimv,yprimu |
SAVE rlonm025, xprimm025, rlonp025, xprimp025 |
46 |
SAVE rlonm025,xprimm025,rlonp025,xprimp025 |
|
47 |
|
! calcul des coeff. ( cu_2d, cv_2d , 1./cu_2d**2, 1./cv_2d**2 ) |
48 |
REAL SSUM |
! - - |
49 |
c |
! ------------------------------------------------------------------ |
50 |
c |
|
51 |
c ------------------------------------------------------------------ |
! les coef. ( cu_2d, cv_2d ) permettent de passer des vitesses naturelles |
52 |
c - - |
! aux vitesses covariantes et contravariantes , ou vice-versa ... |
53 |
c calcul des coeff. ( cu_2d, cv_2d , 1./cu_2d**2, 1./cv_2d**2 ) |
|
54 |
c - - |
|
55 |
c ------------------------------------------------------------------ |
! on a : u (covariant) = cu_2d * u (naturel) , u(contrav)= u(nat)/cu_2d |
56 |
c |
! v (covariant) = cv_2d * v (naturel) , v(contrav)= v(nat)/cv_2d |
57 |
c les coef. ( cu_2d, cv_2d ) permettent de passer des vitesses naturelles |
|
58 |
c aux vitesses covariantes et contravariantes , ou vice-versa ... |
! on en tire : u(covariant) = cu_2d * cu_2d * u(contravariant) |
59 |
c |
! v(covariant) = cv_2d * cv_2d * v(contravariant) |
60 |
c |
|
61 |
c on a : u (covariant) = cu_2d * u (naturel) , u(contrav)= u(nat)/cu_2d |
|
62 |
c v (covariant) = cv_2d * v (naturel) , v(contrav)= v(nat)/cv_2d |
! on a l'application ( x(X) , y(Y) ) avec - im/2 +1 < X < im/2 |
63 |
c |
! = = |
64 |
c on en tire : u(covariant) = cu_2d * cu_2d * u(contravariant) |
! et - jm/2 < Y < jm/2 |
65 |
c v(covariant) = cv_2d * cv_2d * v(contravariant) |
! = = |
66 |
c |
|
67 |
c |
! ................................................... |
68 |
c on a l'application ( x(X) , y(Y) ) avec - im/2 +1 < X < im/2 |
! ................................................... |
69 |
c = = |
! . x est la longitude du point en radians . |
70 |
c et - jm/2 < Y < jm/2 |
! . y est la latitude du point en radians . |
71 |
c = = |
! . . |
72 |
c |
! . on a : cu_2d(i,j) = rad * COS(y) * dx/dX . |
73 |
c ................................................... |
! . cv( j ) = rad * dy/dY . |
74 |
c ................................................... |
! . aire_2d(i,j) = cu_2d(i,j) * cv(j) . |
75 |
c . x est la longitude du point en radians . |
! . . |
76 |
c . y est la latitude du point en radians . |
! . y, dx/dX, dy/dY calcules aux points concernes . |
77 |
c . . |
! . . |
78 |
c . on a : cu_2d(i,j) = rad * COS(y) * dx/dX . |
! ................................................... |
79 |
c . cv( j ) = rad * dy/dY . |
! ................................................... |
80 |
c . aire_2d(i,j) = cu_2d(i,j) * cv(j) . |
|
81 |
c . . |
|
82 |
c . y, dx/dX, dy/dY calcules aux points concernes . |
|
83 |
c . . |
! , |
84 |
c ................................................... |
! cv , bien que dependant de j uniquement,sera ici indice aussi en i |
85 |
c ................................................... |
! pour un adressage plus facile en ij . |
86 |
c |
|
87 |
c |
|
88 |
c |
|
89 |
c , |
! ************** aux points u et v , ***************** |
90 |
c cv , bien que dependant de j uniquement,sera ici indice aussi en i |
! xprimu et xprimv sont respectivement les valeurs de dx/dX |
91 |
c pour un adressage plus facile en ij . |
! yprimu et yprimv . . . . . . . . . . . dy/dY |
92 |
c |
! rlatu et rlatv . . . . . . . . . . .la latitude |
93 |
c |
! cvu et cv_2d . . . . . . . . . . . cv_2d |
94 |
c |
|
95 |
c ************** aux points u et v , ***************** |
! ************** aux points u, v, scalaires, et z **************** |
96 |
c xprimu et xprimv sont respectivement les valeurs de dx/dX |
! cu_2d, cuv, cuscal, cuz sont respectiv. les valeurs de cu_2d |
97 |
c yprimu et yprimv . . . . . . . . . . . dy/dY |
|
98 |
c rlatu et rlatv . . . . . . . . . . .la latitude |
|
99 |
c cvu et cv_2d . . . . . . . . . . . cv_2d |
|
100 |
c |
! Exemple de distribution de variables sur la grille dans le |
101 |
c ************** aux points u, v, scalaires, et z **************** |
! domaine de travail ( X,Y ) . |
102 |
c cu_2d, cuv, cuscal, cuz sont respectiv. les valeurs de cu_2d |
! ................................................................ |
103 |
c |
! DX=DY= 1 |
104 |
c |
|
105 |
c |
|
106 |
c Exemple de distribution de variables sur la grille dans le |
! + represente un point scalaire ( p.exp la pression ) |
107 |
c domaine de travail ( X,Y ) . |
! > represente la composante zonale du vent |
108 |
c ................................................................ |
! V represente la composante meridienne du vent |
109 |
c DX=DY= 1 |
! o represente la vorticite |
110 |
c |
|
111 |
c |
! ---- , car aux poles , les comp.zonales covariantes sont nulles |
112 |
c + represente un point scalaire ( p.exp la pression ) |
|
113 |
c > represente la composante zonale du vent |
|
114 |
c V represente la composante meridienne du vent |
|
115 |
c o represente la vorticite |
! i -> |
116 |
c |
|
117 |
c ---- , car aux poles , les comp.zonales covariantes sont nulles |
! 1 2 3 4 5 6 7 8 |
118 |
c |
! j |
119 |
c |
! v 1 + ---- + ---- + ---- + ---- + ---- + ---- + ---- + -- |
120 |
c |
|
121 |
c i -> |
! V o V o V o V o V o V o V o V o |
122 |
c |
|
123 |
c 1 2 3 4 5 6 7 8 |
! 2 + > + > + > + > + > + > + > + > |
124 |
c j |
|
125 |
c v 1 + ---- + ---- + ---- + ---- + ---- + ---- + ---- + -- |
! V o V o V o V o V o V o V o V o |
126 |
c |
|
127 |
c V o V o V o V o V o V o V o V o |
! 3 + > + > + > + > + > + > + > + > |
128 |
c |
|
129 |
c 2 + > + > + > + > + > + > + > + > |
! V o V o V o V o V o V o V o V o |
130 |
c |
|
131 |
c V o V o V o V o V o V o V o V o |
! 4 + > + > + > + > + > + > + > + > |
132 |
c |
|
133 |
c 3 + > + > + > + > + > + > + > + > |
! V o V o V o V o V o V o V o V o |
134 |
c |
|
135 |
c V o V o V o V o V o V o V o V o |
! 5 + ---- + ---- + ---- + ---- + ---- + ---- + ---- + -- |
136 |
c |
|
137 |
c 4 + > + > + > + > + > + > + > + > |
|
138 |
c |
! Ci-dessus, on voit que le nombre de pts.en longitude est egal |
139 |
c V o V o V o V o V o V o V o V o |
! a IM = 8 |
140 |
c |
! De meme , le nombre d'intervalles entre les 2 poles est egal |
141 |
c 5 + ---- + ---- + ---- + ---- + ---- + ---- + ---- + -- |
! a JM = 4 |
142 |
c |
|
143 |
c |
! Les points scalaires ( + ) correspondent donc a des valeurs |
144 |
c Ci-dessus, on voit que le nombre de pts.en longitude est egal |
! entieres de i ( 1 a IM ) et de j ( 1 a JM +1 ) . |
145 |
c a IM = 8 |
|
146 |
c De meme , le nombre d'intervalles entre les 2 poles est egal |
! Les vents U ( > ) correspondent a des valeurs semi- |
147 |
c a JM = 4 |
! entieres de i ( 1+ 0.5 a IM+ 0.5) et entieres de j ( 1 a JM+1) |
148 |
c |
|
149 |
c Les points scalaires ( + ) correspondent donc a des valeurs |
! Les vents V ( V ) correspondent a des valeurs entieres |
150 |
c entieres de i ( 1 a IM ) et de j ( 1 a JM +1 ) . |
! de i ( 1 a IM ) et semi-entieres de j ( 1 +0.5 a JM +0.5) |
151 |
c |
|
152 |
c Les vents U ( > ) correspondent a des valeurs semi- |
|
153 |
c entieres de i ( 1+ 0.5 a IM+ 0.5) et entieres de j ( 1 a JM+1) |
|
154 |
c |
PRINT *, 'Call sequence information: inigeom' |
155 |
c Les vents V ( V ) correspondent a des valeurs entieres |
PRINT 3 |
156 |
c de i ( 1 a IM ) et semi-entieres de j ( 1 +0.5 a JM +0.5) |
3 FORMAT ('Calcul des elongations cu_2d et cv_2d comme sommes ', & |
157 |
c |
'des 4 '/5X, & |
158 |
c |
' elong. cuij1, .. 4 , cvij1,.. 4 qui les entourent , aux '/5X, & |
159 |
c |
' memes endroits que les aires aireij1_2d,...j4 . '/) |
160 |
print *, "Call sequence information: inigeom" |
|
161 |
print 3 |
|
162 |
3 FORMAT('Calcul des elongations cu_2d et cv_2d comme sommes ', |
IF (nitergdiv/=2) THEN |
163 |
$ 'des 4 ' |
gamdi_gdiv = coefdis/(float(nitergdiv)-2.) |
164 |
* / 5x, |
ELSE |
165 |
$ ' elong. cuij1, .. 4 , cvij1,.. 4 qui les entourent , aux ' |
gamdi_gdiv = 0. |
166 |
* / 5x,' memes endroits que les aires aireij1_2d,...j4 . ' / ) |
END IF |
167 |
c |
IF (nitergrot/=2) THEN |
168 |
c |
gamdi_grot = coefdis/(float(nitergrot)-2.) |
169 |
IF( nitergdiv.NE.2 ) THEN |
ELSE |
170 |
gamdi_gdiv = coefdis/ ( float(nitergdiv) -2. ) |
gamdi_grot = 0. |
171 |
ELSE |
END IF |
172 |
gamdi_gdiv = 0. |
IF (niterh/=2) THEN |
173 |
ENDIF |
gamdi_h = coefdis/(float(niterh)-2.) |
174 |
IF( nitergrot.NE.2 ) THEN |
ELSE |
175 |
gamdi_grot = coefdis/ ( float(nitergrot) -2. ) |
gamdi_h = 0. |
176 |
ELSE |
END IF |
177 |
gamdi_grot = 0. |
|
178 |
ENDIF |
WRITE (6,*) ' gamdi_gd ', gamdi_gdiv, gamdi_grot, gamdi_h, coefdis, & |
179 |
IF( niterh.NE.2 ) THEN |
nitergdiv, nitergrot, niterh |
180 |
gamdi_h = coefdis/ ( float(niterh) -2. ) |
|
181 |
ELSE |
pi = 2.*asin(1.) |
182 |
gamdi_h = 0. |
|
183 |
ENDIF |
WRITE (6,990) |
184 |
|
|
185 |
WRITE(6,*) ' gamdi_gd ',gamdi_gdiv,gamdi_grot,gamdi_h,coefdis, |
! ---------------------------------------------------------------- |
186 |
* nitergdiv,nitergrot,niterh |
|
187 |
c |
IF ( .NOT. fxyhypb) THEN |
188 |
pi = 2.* ASIN(1.) |
|
189 |
c |
|
190 |
WRITE(6,990) |
IF (ysinus) THEN |
191 |
|
|
192 |
c ---------------------------------------------------------------- |
WRITE (6,*) ' *** Inigeom , Y = Sinus ( Latitude ) *** ' |
193 |
c |
|
194 |
IF( .NOT.fxyhypb ) THEN |
! .... utilisation de f(x,y ) avec y = sinus de la latitude ... |
195 |
c |
|
196 |
c |
CALL fxysinus(rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1,rlatu2, & |
197 |
IF( ysinus ) THEN |
yprimu2,rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025, & |
198 |
c |
xprimp025) |
199 |
WRITE(6,*) ' *** Inigeom , Y = Sinus ( Latitude ) *** ' |
|
200 |
c |
ELSE |
201 |
c .... utilisation de f(x,y ) avec y = sinus de la latitude ... |
|
202 |
|
WRITE (6,*) '*** Inigeom , Y = Latitude , der. sinusoid . ***' |
203 |
CALL fxysinus (rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1, |
|
204 |
, rlatu2,yprimu2, |
! utilisation de f(x,y) a tangente sinusoidale , y etant la latit. .. |
205 |
, rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025 |
|
206 |
$ ,xprimp025) |
|
207 |
|
pxo = clon*pi/180. |
208 |
ELSE |
pyo = 2.*clat*pi/180. |
209 |
c |
|
210 |
WRITE(6,*) '*** Inigeom , Y = Latitude , der. sinusoid . ***' |
! .... determination de transx ( pour le zoom ) par Newton-Raphson . |
211 |
|
|
|
c utilisation de f(x,y) a tangente sinusoidale , y etant la latit. .. |
|
|
c |
|
|
|
|
|
pxo = clon *pi /180. |
|
|
pyo = 2.* clat* pi /180. |
|
|
c |
|
|
c .... determination de transx ( pour le zoom ) par Newton-Raphson . |
|
|
c |
|
212 |
itmax = 10 |
itmax = 10 |
213 |
eps = .1e-7 |
eps = .1E-7 |
214 |
c |
|
215 |
xo1 = 0. |
xo1 = 0. |
216 |
DO 10 iter = 1, itmax |
DO iter = 1, itmax |
217 |
x1 = xo1 |
x1 = xo1 |
218 |
f = x1+ alphax *SIN(x1-pxo) |
f = x1 + alphax*sin(x1-pxo) |
219 |
df = 1.+ alphax *COS(x1-pxo) |
df = 1. + alphax*cos(x1-pxo) |
220 |
x1 = x1 - f/df |
x1 = x1 - f/df |
221 |
xdm = ABS( x1- xo1 ) |
xdm = abs(x1-xo1) |
222 |
IF( xdm.LE.eps )GO TO 11 |
IF (xdm<=eps) exit |
223 |
xo1 = x1 |
xo1 = x1 |
224 |
10 CONTINUE |
end DO |
225 |
11 CONTINUE |
|
|
c |
|
226 |
transx = xo1 |
transx = xo1 |
227 |
|
|
228 |
itmay = 10 |
itmay = 10 |
229 |
eps = .1e-7 |
eps = .1E-7 |
230 |
C |
|
231 |
yo1 = 0. |
yo1 = 0. |
232 |
DO 15 iter = 1,itmay |
DO iter = 1, itmay |
233 |
y1 = yo1 |
y1 = yo1 |
234 |
f = y1 + alphay* SIN(y1-pyo) |
f = y1 + alphay*sin(y1-pyo) |
235 |
df = 1. + alphay* COS(y1-pyo) |
df = 1. + alphay*cos(y1-pyo) |
236 |
y1 = y1 -f/df |
y1 = y1 - f/df |
237 |
ydm = ABS(y1-yo1) |
ydm = abs(y1-yo1) |
238 |
IF(ydm.LE.eps) GO TO 17 |
IF (ydm<=eps) exit |
239 |
yo1 = y1 |
yo1 = y1 |
240 |
15 CONTINUE |
end DO |
241 |
c |
|
|
17 CONTINUE |
|
242 |
transy = yo1 |
transy = yo1 |
243 |
|
|
244 |
CALL fxy ( rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1, |
CALL fxy(rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1,rlatu2,yprimu2, & |
245 |
, rlatu2,yprimu2, |
rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025,xprimp025) |
246 |
, rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025 |
|
247 |
$ ,xprimp025) |
END IF |
248 |
|
|
249 |
ENDIF |
ELSE |
250 |
c |
|
251 |
ELSE |
! .... Utilisation de fxyhyper , f(x,y) a derivee tangente hyperbol. |
252 |
c |
! .................................................................. |
253 |
c .... Utilisation de fxyhyper , f(x,y) a derivee tangente hyperbol. |
|
254 |
c .................................................................. |
WRITE (6,*) '*** Inigeom , Y = Latitude , der.tg. hyperbolique ***' |
255 |
|
|
256 |
WRITE(6,*) |
CALL fxyhyper(clat,grossismy,dzoomy,tauy,clon,grossismx,dzoomx,taux, & |
257 |
$ '*** Inigeom , Y = Latitude , der.tg. hyperbolique ***' |
rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1,rlatu2,yprimu2,rlonu, & |
258 |
|
xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025,xprimp025) |
259 |
CALL fxyhyper( clat, grossismy, dzoomy, tauy , |
|
260 |
, clon, grossismx, dzoomx, taux , |
|
261 |
, rlatu,yprimu,rlatv, yprimv,rlatu1, yprimu1,rlatu2,yprimu2 , |
END IF |
262 |
, rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025 |
|
263 |
$ ,xprimp025 ) |
! ------------------------------------------------------------------- |
264 |
|
|
265 |
|
|
266 |
ENDIF |
rlatu(1) = asin(1.) |
267 |
c |
rlatu(jjp1) = -rlatu(1) |
268 |
c ------------------------------------------------------------------- |
|
269 |
|
|
270 |
c |
! .... calcul aux poles .... |
271 |
rlatu(1) = ASIN(1.) |
|
272 |
rlatu(jjp1) = - rlatu(1) |
yprimu(1) = 0. |
273 |
c |
yprimu(jjp1) = 0. |
274 |
c |
|
275 |
c .... calcul aux poles .... |
|
276 |
c |
un4rad2 = 0.25*rad*rad |
277 |
yprimu(1) = 0. |
|
278 |
yprimu(jjp1) = 0. |
! ------------------------------------------------------------- |
279 |
c |
! ------------------------------------------------------------- |
280 |
c |
! - |
281 |
un4rad2 = 0.25 * rad * rad |
! calcul des aires ( aire_2d,aireu_2d,airev_2d, 1./aire_2d, 1./airez ) |
282 |
c |
! - et de fext_2d , force de coriolis extensive . |
283 |
c ------------------------------------------------------------- |
! - |
284 |
c ------------------------------------------------------------- |
! ------------------------------------------------------------- |
285 |
c - |
! ------------------------------------------------------------- |
286 |
c calcul des aires ( aire_2d,aireu_2d,airev_2d, 1./aire_2d, 1./airez ) |
|
287 |
c - et de fext_2d , force de coriolis extensive . |
|
288 |
c - |
|
289 |
c ------------------------------------------------------------- |
! A 1 point scalaire P (i,j) de la grille, reguliere en (X,Y) , sont |
290 |
c ------------------------------------------------------------- |
! affectees 4 aires entourant P , calculees respectivement aux points |
291 |
c |
! ( i + 1/4, j - 1/4 ) : aireij1_2d (i,j) |
292 |
c |
! ( i + 1/4, j + 1/4 ) : aireij2_2d (i,j) |
293 |
c |
! ( i - 1/4, j + 1/4 ) : aireij3_2d (i,j) |
294 |
c A 1 point scalaire P (i,j) de la grille, reguliere en (X,Y) , sont |
! ( i - 1/4, j - 1/4 ) : aireij4_2d (i,j) |
295 |
c affectees 4 aires entourant P , calculees respectivement aux points |
|
296 |
c ( i + 1/4, j - 1/4 ) : aireij1_2d (i,j) |
! , |
297 |
c ( i + 1/4, j + 1/4 ) : aireij2_2d (i,j) |
! Les cotes de chacun de ces 4 carres etant egaux a 1/2 suivant (X,Y). |
298 |
c ( i - 1/4, j + 1/4 ) : aireij3_2d (i,j) |
! Chaque aire centree en 1 point scalaire P(i,j) est egale a la somme |
299 |
c ( i - 1/4, j - 1/4 ) : aireij4_2d (i,j) |
! des 4 aires aireij1_2d,aireij2_2d,aireij3_2d,aireij4_2d qui sont affectees au |
300 |
c |
! point (i,j) . |
301 |
c , |
! On definit en outre les coefficients alpha comme etant egaux a |
302 |
c Les cotes de chacun de ces 4 carres etant egaux a 1/2 suivant (X,Y). |
! (aireij / aire_2d), c.a.d par exp. alpha1_2d(i,j)=aireij1_2d(i,j)/aire_2d(i,j) |
303 |
c Chaque aire centree en 1 point scalaire P(i,j) est egale a la somme |
|
304 |
c des 4 aires aireij1_2d,aireij2_2d,aireij3_2d,aireij4_2d qui sont affectees au |
! De meme, toute aire centree en 1 point U est egale a la somme des |
305 |
c point (i,j) . |
! 4 aires aireij1_2d,aireij2_2d,aireij3_2d,aireij4_2d entourant le point U. |
306 |
c On definit en outre les coefficients alpha comme etant egaux a |
! Idem pour airev_2d, airez . |
307 |
c (aireij / aire_2d), c.a.d par exp. alpha1_2d(i,j)=aireij1_2d(i,j)/aire_2d(i,j) |
|
308 |
c |
! On a ,pour chaque maille : dX = dY = 1 |
309 |
c De meme, toute aire centree en 1 point U est egale a la somme des |
|
310 |
c 4 aires aireij1_2d,aireij2_2d,aireij3_2d,aireij4_2d entourant le point U . |
|
311 |
c Idem pour airev_2d, airez . |
! . V |
312 |
c |
|
313 |
c On a ,pour chaque maille : dX = dY = 1 |
! aireij4_2d . . aireij1_2d |
314 |
c |
|
315 |
c |
! U . . P . U |
316 |
c . V |
|
317 |
c |
! aireij3_2d . . aireij2_2d |
318 |
c aireij4_2d . . aireij1_2d |
|
319 |
c |
! . V |
320 |
c U . . P . U |
|
321 |
c |
|
322 |
c aireij3_2d . . aireij2_2d |
|
323 |
c |
|
324 |
c . V |
|
325 |
c |
! .................................................................... |
326 |
c |
|
327 |
c |
! Calcul des 4 aires elementaires aireij1_2d,aireij2_2d,aireij3_2d,aireij4_2d |
328 |
c |
! qui entourent chaque aire_2d(i,j) , ainsi que les 4 elongations elementaires |
329 |
c |
! cuij et les 4 elongat. cvij qui sont calculees aux memes |
330 |
c .................................................................... |
! endroits que les aireij . |
331 |
c |
|
332 |
c Calcul des 4 aires elementaires aireij1_2d,aireij2_2d,aireij3_2d,aireij4_2d |
! .................................................................... |
333 |
c qui entourent chaque aire_2d(i,j) , ainsi que les 4 elongations elemen |
|
334 |
c taires cuij et les 4 elongat. cvij qui sont calculees aux memes |
! ....... do 35 : boucle sur les jjm + 1 latitudes ..... |
335 |
c endroits que les aireij . |
|
336 |
c |
|
337 |
c .................................................................... |
DO j = 1, jjp1 |
338 |
c |
|
339 |
c ....... do 35 : boucle sur les jjm + 1 latitudes ..... |
IF (j==1) THEN |
340 |
c |
|
341 |
c |
yprm = yprimu1(j) |
342 |
DO 35 j = 1, jjp1 |
rlatm = rlatu1(j) |
343 |
c |
|
344 |
IF ( j. eq. 1 ) THEN |
coslatm = cos(rlatm) |
345 |
c |
radclatm = 0.5*rad*coslatm |
346 |
yprm = yprimu1(j) |
|
347 |
rlatm = rlatu1(j) |
DO i = 1, iim |
348 |
c |
xprp = xprimp025(i) |
349 |
coslatm = COS( rlatm ) |
xprm = xprimm025(i) |
350 |
radclatm = 0.5* rad * coslatm |
aireij2_2d(i,1) = un4rad2*coslatm*xprp*yprm |
351 |
c |
aireij3_2d(i,1) = un4rad2*coslatm*xprm*yprm |
352 |
DO 30 i = 1, iim |
cuij2(i,1) = radclatm*xprp |
353 |
xprp = xprimp025( i ) |
cuij3(i,1) = radclatm*xprm |
354 |
xprm = xprimm025( i ) |
cvij2(i,1) = 0.5*rad*yprm |
355 |
aireij2_2d( i,1 ) = un4rad2 * coslatm * xprp * yprm |
cvij3(i,1) = cvij2(i,1) |
356 |
aireij3_2d( i,1 ) = un4rad2 * coslatm * xprm * yprm |
end DO |
357 |
cuij2 ( i,1 ) = radclatm * xprp |
|
358 |
cuij3 ( i,1 ) = radclatm * xprm |
DO i = 1, iim |
359 |
cvij2 ( i,1 ) = 0.5* rad * yprm |
aireij1_2d(i,1) = 0. |
360 |
cvij3 ( i,1 ) = cvij2(i,1) |
aireij4_2d(i,1) = 0. |
361 |
30 CONTINUE |
cuij1(i,1) = 0. |
362 |
c |
cuij4(i,1) = 0. |
363 |
DO i = 1, iim |
cvij1(i,1) = 0. |
364 |
aireij1_2d( i,1 ) = 0. |
cvij4(i,1) = 0. |
365 |
aireij4_2d( i,1 ) = 0. |
END DO |
366 |
cuij1 ( i,1 ) = 0. |
|
367 |
cuij4 ( i,1 ) = 0. |
END IF |
368 |
cvij1 ( i,1 ) = 0. |
|
369 |
cvij4 ( i,1 ) = 0. |
IF (j==jjp1) THEN |
370 |
ENDDO |
yprp = yprimu2(j-1) |
371 |
c |
rlatp = rlatu2(j-1) |
372 |
END IF |
!cc yprp = fyprim( FLOAT(j) - 0.25 ) |
373 |
c |
!cc rlatp = fy ( FLOAT(j) - 0.25 ) |
374 |
IF ( j. eq. jjp1 ) THEN |
|
375 |
yprp = yprimu2(j-1) |
coslatp = cos(rlatp) |
376 |
rlatp = rlatu2 (j-1) |
radclatp = 0.5*rad*coslatp |
377 |
ccc yprp = fyprim( FLOAT(j) - 0.25 ) |
|
378 |
ccc rlatp = fy ( FLOAT(j) - 0.25 ) |
DO i = 1, iim |
379 |
c |
xprp = xprimp025(i) |
380 |
coslatp = COS( rlatp ) |
xprm = xprimm025(i) |
381 |
radclatp = 0.5* rad * coslatp |
aireij1_2d(i,jjp1) = un4rad2*coslatp*xprp*yprp |
382 |
c |
aireij4_2d(i,jjp1) = un4rad2*coslatp*xprm*yprp |
383 |
DO 31 i = 1,iim |
cuij1(i,jjp1) = radclatp*xprp |
384 |
xprp = xprimp025( i ) |
cuij4(i,jjp1) = radclatp*xprm |
385 |
xprm = xprimm025( i ) |
cvij1(i,jjp1) = 0.5*rad*yprp |
386 |
aireij1_2d( i,jjp1 ) = un4rad2 * coslatp * xprp * yprp |
cvij4(i,jjp1) = cvij1(i,jjp1) |
387 |
aireij4_2d( i,jjp1 ) = un4rad2 * coslatp * xprm * yprp |
end DO |
388 |
cuij1(i,jjp1) = radclatp * xprp |
|
389 |
cuij4(i,jjp1) = radclatp * xprm |
DO i = 1, iim |
390 |
cvij1(i,jjp1) = 0.5 * rad* yprp |
aireij2_2d(i,jjp1) = 0. |
391 |
cvij4(i,jjp1) = cvij1(i,jjp1) |
aireij3_2d(i,jjp1) = 0. |
392 |
31 CONTINUE |
cvij2(i,jjp1) = 0. |
393 |
c |
cvij3(i,jjp1) = 0. |
394 |
DO i = 1, iim |
cuij2(i,jjp1) = 0. |
395 |
aireij2_2d( i,jjp1 ) = 0. |
cuij3(i,jjp1) = 0. |
396 |
aireij3_2d( i,jjp1 ) = 0. |
END DO |
397 |
cvij2 ( i,jjp1 ) = 0. |
|
398 |
cvij3 ( i,jjp1 ) = 0. |
END IF |
399 |
cuij2 ( i,jjp1 ) = 0. |
|
400 |
cuij3 ( i,jjp1 ) = 0. |
|
401 |
ENDDO |
IF (j>1 .AND. j<jjp1) THEN |
402 |
c |
|
403 |
END IF |
rlatp = rlatu2(j-1) |
404 |
c |
yprp = yprimu2(j-1) |
405 |
|
rlatm = rlatu1(j) |
406 |
IF ( j .gt. 1 .AND. j .lt. jjp1 ) THEN |
yprm = yprimu1(j) |
407 |
c |
!c rlatp = fy ( FLOAT(j) - 0.25 ) |
408 |
rlatp = rlatu2 ( j-1 ) |
!c yprp = fyprim( FLOAT(j) - 0.25 ) |
409 |
yprp = yprimu2( j-1 ) |
!c rlatm = fy ( FLOAT(j) + 0.25 ) |
410 |
rlatm = rlatu1 ( j ) |
!c yprm = fyprim( FLOAT(j) + 0.25 ) |
411 |
yprm = yprimu1( j ) |
|
412 |
cc rlatp = fy ( FLOAT(j) - 0.25 ) |
coslatm = cos(rlatm) |
413 |
cc yprp = fyprim( FLOAT(j) - 0.25 ) |
coslatp = cos(rlatp) |
414 |
cc rlatm = fy ( FLOAT(j) + 0.25 ) |
radclatp = 0.5*rad*coslatp |
415 |
cc yprm = fyprim( FLOAT(j) + 0.25 ) |
radclatm = 0.5*rad*coslatm |
416 |
|
|
417 |
coslatm = COS( rlatm ) |
DO i = 1, iim |
418 |
coslatp = COS( rlatp ) |
xprp = xprimp025(i) |
419 |
radclatp = 0.5* rad * coslatp |
xprm = xprimm025(i) |
420 |
radclatm = 0.5* rad * coslatm |
|
421 |
c |
ai14 = un4rad2*coslatp*yprp |
422 |
DO 32 i = 1,iim |
ai23 = un4rad2*coslatm*yprm |
423 |
xprp = xprimp025( i ) |
aireij1_2d(i,j) = ai14*xprp |
424 |
xprm = xprimm025( i ) |
aireij2_2d(i,j) = ai23*xprp |
425 |
|
aireij3_2d(i,j) = ai23*xprm |
426 |
ai14 = un4rad2 * coslatp * yprp |
aireij4_2d(i,j) = ai14*xprm |
427 |
ai23 = un4rad2 * coslatm * yprm |
cuij1(i,j) = radclatp*xprp |
428 |
aireij1_2d ( i,j ) = ai14 * xprp |
cuij2(i,j) = radclatm*xprp |
429 |
aireij2_2d ( i,j ) = ai23 * xprp |
cuij3(i,j) = radclatm*xprm |
430 |
aireij3_2d ( i,j ) = ai23 * xprm |
cuij4(i,j) = radclatp*xprm |
431 |
aireij4_2d ( i,j ) = ai14 * xprm |
cvij1(i,j) = 0.5*rad*yprp |
432 |
cuij1 ( i,j ) = radclatp * xprp |
cvij2(i,j) = 0.5*rad*yprm |
433 |
cuij2 ( i,j ) = radclatm * xprp |
cvij3(i,j) = cvij2(i,j) |
434 |
cuij3 ( i,j ) = radclatm * xprm |
cvij4(i,j) = cvij1(i,j) |
435 |
cuij4 ( i,j ) = radclatp * xprm |
end DO |
436 |
cvij1 ( i,j ) = 0.5* rad * yprp |
|
437 |
cvij2 ( i,j ) = 0.5* rad * yprm |
END IF |
438 |
cvij3 ( i,j ) = cvij2(i,j) |
|
439 |
cvij4 ( i,j ) = cvij1(i,j) |
! ........ periodicite ............ |
440 |
32 CONTINUE |
|
441 |
c |
cvij1(iip1,j) = cvij1(1,j) |
442 |
END IF |
cvij2(iip1,j) = cvij2(1,j) |
443 |
c |
cvij3(iip1,j) = cvij3(1,j) |
444 |
c ........ periodicite ............ |
cvij4(iip1,j) = cvij4(1,j) |
445 |
c |
cuij1(iip1,j) = cuij1(1,j) |
446 |
cvij1 (iip1,j) = cvij1 (1,j) |
cuij2(iip1,j) = cuij2(1,j) |
447 |
cvij2 (iip1,j) = cvij2 (1,j) |
cuij3(iip1,j) = cuij3(1,j) |
448 |
cvij3 (iip1,j) = cvij3 (1,j) |
cuij4(iip1,j) = cuij4(1,j) |
449 |
cvij4 (iip1,j) = cvij4 (1,j) |
aireij1_2d(iip1,j) = aireij1_2d(1,j) |
450 |
cuij1 (iip1,j) = cuij1 (1,j) |
aireij2_2d(iip1,j) = aireij2_2d(1,j) |
451 |
cuij2 (iip1,j) = cuij2 (1,j) |
aireij3_2d(iip1,j) = aireij3_2d(1,j) |
452 |
cuij3 (iip1,j) = cuij3 (1,j) |
aireij4_2d(iip1,j) = aireij4_2d(1,j) |
453 |
cuij4 (iip1,j) = cuij4 (1,j) |
|
454 |
aireij1_2d (iip1,j) = aireij1_2d (1,j ) |
end DO |
455 |
aireij2_2d (iip1,j) = aireij2_2d (1,j ) |
|
456 |
aireij3_2d (iip1,j) = aireij3_2d (1,j ) |
! .............................................................. |
457 |
aireij4_2d (iip1,j) = aireij4_2d (1,j ) |
|
458 |
|
DO j = 1, jjp1 |
459 |
35 CONTINUE |
DO i = 1, iim |
460 |
c |
aire_2d(i,j) = aireij1_2d(i,j) + aireij2_2d(i,j) + aireij3_2d(i,j) + & |
461 |
c .............................................................. |
aireij4_2d(i,j) |
462 |
c |
alpha1_2d(i,j) = aireij1_2d(i,j)/aire_2d(i,j) |
463 |
DO 37 j = 1, jjp1 |
alpha2_2d(i,j) = aireij2_2d(i,j)/aire_2d(i,j) |
464 |
DO 36 i = 1, iim |
alpha3_2d(i,j) = aireij3_2d(i,j)/aire_2d(i,j) |
465 |
aire_2d ( i,j ) = aireij1_2d(i,j) + aireij2_2d(i,j) |
alpha4_2d(i,j) = aireij4_2d(i,j)/aire_2d(i,j) |
466 |
* + aireij3_2d(i,j) + aireij4_2d(i,j) |
alpha1p2_2d(i,j) = alpha1_2d(i,j) + alpha2_2d(i,j) |
467 |
alpha1_2d ( i,j ) = aireij1_2d(i,j) / aire_2d(i,j) |
alpha1p4_2d(i,j) = alpha1_2d(i,j) + alpha4_2d(i,j) |
468 |
alpha2_2d ( i,j ) = aireij2_2d(i,j) / aire_2d(i,j) |
alpha2p3_2d(i,j) = alpha2_2d(i,j) + alpha3_2d(i,j) |
469 |
alpha3_2d ( i,j ) = aireij3_2d(i,j) / aire_2d(i,j) |
alpha3p4_2d(i,j) = alpha3_2d(i,j) + alpha4_2d(i,j) |
470 |
alpha4_2d ( i,j ) = aireij4_2d(i,j) / aire_2d(i,j) |
end DO |
471 |
alpha1p2_2d( i,j ) = alpha1_2d (i,j) + alpha2_2d (i,j) |
|
472 |
alpha1p4_2d( i,j ) = alpha1_2d (i,j) + alpha4_2d (i,j) |
|
473 |
alpha2p3_2d( i,j ) = alpha2_2d (i,j) + alpha3_2d (i,j) |
aire_2d(iip1,j) = aire_2d(1,j) |
474 |
alpha3p4_2d( i,j ) = alpha3_2d (i,j) + alpha4_2d (i,j) |
alpha1_2d(iip1,j) = alpha1_2d(1,j) |
475 |
36 CONTINUE |
alpha2_2d(iip1,j) = alpha2_2d(1,j) |
476 |
c |
alpha3_2d(iip1,j) = alpha3_2d(1,j) |
477 |
c |
alpha4_2d(iip1,j) = alpha4_2d(1,j) |
478 |
aire_2d (iip1,j) = aire_2d (1,j) |
alpha1p2_2d(iip1,j) = alpha1p2_2d(1,j) |
479 |
alpha1_2d (iip1,j) = alpha1_2d (1,j) |
alpha1p4_2d(iip1,j) = alpha1p4_2d(1,j) |
480 |
alpha2_2d (iip1,j) = alpha2_2d (1,j) |
alpha2p3_2d(iip1,j) = alpha2p3_2d(1,j) |
481 |
alpha3_2d (iip1,j) = alpha3_2d (1,j) |
alpha3p4_2d(iip1,j) = alpha3p4_2d(1,j) |
482 |
alpha4_2d (iip1,j) = alpha4_2d (1,j) |
end DO |
483 |
alpha1p2_2d(iip1,j) = alpha1p2_2d(1,j) |
|
484 |
alpha1p4_2d(iip1,j) = alpha1p4_2d(1,j) |
|
485 |
alpha2p3_2d(iip1,j) = alpha2p3_2d(1,j) |
DO j = 1, jjp1 |
486 |
alpha3p4_2d(iip1,j) = alpha3p4_2d(1,j) |
DO i = 1, iim |
487 |
37 CONTINUE |
aireu_2d(i,j) = aireij1_2d(i,j) + aireij2_2d(i,j) + & |
488 |
c |
aireij4_2d(i+1,j) + aireij3_2d(i+1,j) |
489 |
|
unsaire_2d(i,j) = 1./aire_2d(i,j) |
490 |
DO 42 j = 1,jjp1 |
unsair_gam1_2d(i,j) = unsaire_2d(i,j)**(-gamdi_gdiv) |
491 |
DO 41 i = 1,iim |
unsair_gam2_2d(i,j) = unsaire_2d(i,j)**(-gamdi_h) |
492 |
aireu_2d (i,j)= aireij1_2d(i,j) + aireij2_2d(i,j) |
airesurg_2d(i,j) = aire_2d(i,j)/g |
493 |
* + aireij4_2d(i+1,j) +aireij3_2d(i+1,j) |
end DO |
494 |
unsaire_2d ( i,j)= 1./ aire_2d(i,j) |
aireu_2d(iip1,j) = aireu_2d(1,j) |
495 |
unsair_gam1_2d( i,j)= unsaire_2d(i,j)** ( - gamdi_gdiv ) |
unsaire_2d(iip1,j) = unsaire_2d(1,j) |
496 |
unsair_gam2_2d( i,j)= unsaire_2d(i,j)** ( - gamdi_h ) |
unsair_gam1_2d(iip1,j) = unsair_gam1_2d(1,j) |
497 |
airesurg_2d ( i,j)= aire_2d(i,j)/ g |
unsair_gam2_2d(iip1,j) = unsair_gam2_2d(1,j) |
498 |
41 CONTINUE |
airesurg_2d(iip1,j) = airesurg_2d(1,j) |
499 |
aireu_2d (iip1,j) = aireu_2d (1,j) |
end DO |
500 |
unsaire_2d (iip1,j) = unsaire_2d(1,j) |
|
501 |
unsair_gam1_2d(iip1,j) = unsair_gam1_2d(1,j) |
|
502 |
unsair_gam2_2d(iip1,j) = unsair_gam2_2d(1,j) |
DO j = 1, jjm |
503 |
airesurg_2d (iip1,j) = airesurg_2d(1,j) |
|
504 |
42 CONTINUE |
DO i = 1, iim |
505 |
c |
airev_2d(i,j) = aireij2_2d(i,j) + aireij3_2d(i,j) + & |
506 |
c |
aireij1_2d(i,j+1) + aireij4_2d(i,j+1) |
507 |
DO 48 j = 1,jjm |
END DO |
508 |
c |
DO i = 1, iim |
509 |
DO i=1,iim |
airez = aireij2_2d(i,j) + aireij1_2d(i,j+1) + aireij3_2d(i+1,j) + & |
510 |
airev_2d (i,j) = aireij2_2d(i,j)+ aireij3_2d(i,j) |
aireij4_2d(i+1,j+1) |
511 |
* + aireij1_2d(i,j+1) +aireij4_2d(i,j+1) |
unsairez_2d(i,j) = 1./airez |
512 |
ENDDO |
unsairz_gam_2d(i,j) = unsairez_2d(i,j)**(-gamdi_grot) |
513 |
DO i=1,iim |
fext_2d(i,j) = airez*sin(rlatv(j))*2.*omeg |
514 |
airez = aireij2_2d(i,j)+aireij1_2d(i,j+1) |
END DO |
515 |
* +aireij3_2d(i+1,j) +aireij4_2d(i+1,j+1) |
airev_2d(iip1,j) = airev_2d(1,j) |
516 |
unsairez_2d(i,j) = 1./ airez |
unsairez_2d(iip1,j) = unsairez_2d(1,j) |
517 |
unsairz_gam_2d(i,j)= unsairez_2d(i,j)** ( - gamdi_grot ) |
fext_2d(iip1,j) = fext_2d(1,j) |
518 |
fext_2d (i,j) = airez * SIN(rlatv(j))* 2.* omeg |
unsairz_gam_2d(iip1,j) = unsairz_gam_2d(1,j) |
519 |
ENDDO |
|
520 |
airev_2d (iip1,j) = airev_2d(1,j) |
end DO |
521 |
unsairez_2d (iip1,j) = unsairez_2d(1,j) |
|
522 |
fext_2d (iip1,j) = fext_2d(1,j) |
|
523 |
unsairz_gam_2d(iip1,j) = unsairz_gam_2d(1,j) |
! ..... Calcul des elongations cu_2d,cv_2d, cvu ......... |
524 |
c |
|
525 |
48 CONTINUE |
DO j = 1, jjm |
526 |
c |
DO i = 1, iim |
527 |
c |
cv_2d(i,j) = 0.5*(cvij2(i,j)+cvij3(i,j)+cvij1(i,j+1)+cvij4(i,j+1)) |
528 |
c ..... Calcul des elongations cu_2d,cv_2d, cvu ......... |
cvu(i,j) = 0.5*(cvij1(i,j)+cvij4(i,j)+cvij2(i,j)+cvij3(i,j)) |
529 |
c |
cuv(i,j) = 0.5*(cuij2(i,j)+cuij3(i,j)+cuij1(i,j+1)+cuij4(i,j+1)) |
530 |
DO j = 1, jjm |
unscv2_2d(i,j) = 1./(cv_2d(i,j)*cv_2d(i,j)) |
531 |
DO i = 1, iim |
END DO |
532 |
cv_2d(i,j) = 0.5 |
DO i = 1, iim |
533 |
$ *( cvij2(i,j)+cvij3(i,j)+cvij1(i,j+1)+cvij4(i,j+1)) |
cuvsurcv_2d(i,j) = airev_2d(i,j)*unscv2_2d(i,j) |
534 |
cvu(i,j)= 0.5 *( cvij1(i,j)+cvij4(i,j)+cvij2(i,j) +cvij3(i,j) ) |
cvsurcuv_2d(i,j) = 1./cuvsurcv_2d(i,j) |
535 |
cuv(i,j)= 0.5 |
cuvscvgam1_2d(i,j) = cuvsurcv_2d(i,j)**(-gamdi_gdiv) |
536 |
$ *( cuij2(i,j)+cuij3(i,j)+cuij1(i,j+1)+cuij4(i,j+1)) |
cuvscvgam2_2d(i,j) = cuvsurcv_2d(i,j)**(-gamdi_h) |
537 |
unscv2_2d(i,j) = 1./ ( cv_2d(i,j)*cv_2d(i,j) ) |
cvscuvgam_2d(i,j) = cvsurcuv_2d(i,j)**(-gamdi_grot) |
538 |
ENDDO |
END DO |
539 |
DO i = 1, iim |
cv_2d(iip1,j) = cv_2d(1,j) |
540 |
cuvsurcv_2d (i,j) = airev_2d(i,j) * unscv2_2d(i,j) |
cvu(iip1,j) = cvu(1,j) |
541 |
cvsurcuv_2d (i,j) = 1./cuvsurcv_2d(i,j) |
unscv2_2d(iip1,j) = unscv2_2d(1,j) |
542 |
cuvscvgam1_2d(i,j) = cuvsurcv_2d (i,j) ** ( - gamdi_gdiv ) |
cuv(iip1,j) = cuv(1,j) |
543 |
cuvscvgam2_2d(i,j) = cuvsurcv_2d (i,j) ** ( - gamdi_h ) |
cuvsurcv_2d(iip1,j) = cuvsurcv_2d(1,j) |
544 |
cvscuvgam_2d(i,j) = cvsurcuv_2d (i,j) ** ( - gamdi_grot ) |
cvsurcuv_2d(iip1,j) = cvsurcuv_2d(1,j) |
545 |
ENDDO |
cuvscvgam1_2d(iip1,j) = cuvscvgam1_2d(1,j) |
546 |
cv_2d (iip1,j) = cv_2d (1,j) |
cuvscvgam2_2d(iip1,j) = cuvscvgam2_2d(1,j) |
547 |
cvu (iip1,j) = cvu (1,j) |
cvscuvgam_2d(iip1,j) = cvscuvgam_2d(1,j) |
548 |
unscv2_2d (iip1,j) = unscv2_2d (1,j) |
END DO |
549 |
cuv (iip1,j) = cuv (1,j) |
|
550 |
cuvsurcv_2d (iip1,j) = cuvsurcv_2d (1,j) |
DO j = 2, jjm |
551 |
cvsurcuv_2d (iip1,j) = cvsurcuv_2d (1,j) |
DO i = 1, iim |
552 |
cuvscvgam1_2d(iip1,j) = cuvscvgam1_2d(1,j) |
cu_2d(i,j) = 0.5*(cuij1(i,j)+cuij4(i+1,j)+cuij2(i,j)+cuij3(i+1,j)) |
553 |
cuvscvgam2_2d(iip1,j) = cuvscvgam2_2d(1,j) |
unscu2_2d(i,j) = 1./(cu_2d(i,j)*cu_2d(i,j)) |
554 |
cvscuvgam_2d(iip1,j) = cvscuvgam_2d(1,j) |
cvusurcu_2d(i,j) = aireu_2d(i,j)*unscu2_2d(i,j) |
555 |
ENDDO |
cusurcvu_2d(i,j) = 1./cvusurcu_2d(i,j) |
556 |
|
cvuscugam1_2d(i,j) = cvusurcu_2d(i,j)**(-gamdi_gdiv) |
557 |
DO j = 2, jjm |
cvuscugam2_2d(i,j) = cvusurcu_2d(i,j)**(-gamdi_h) |
558 |
DO i = 1, iim |
cuscvugam_2d(i,j) = cusurcvu_2d(i,j)**(-gamdi_grot) |
559 |
cu_2d(i,j) = 0.5 |
END DO |
560 |
$ *(cuij1(i,j)+cuij4(i+1,j)+cuij2(i,j)+cuij3(i+1,j)) |
cu_2d(iip1,j) = cu_2d(1,j) |
561 |
unscu2_2d (i,j) = 1./ ( cu_2d(i,j) * cu_2d(i,j) ) |
unscu2_2d(iip1,j) = unscu2_2d(1,j) |
562 |
cvusurcu_2d (i,j) = aireu_2d(i,j) * unscu2_2d(i,j) |
cvusurcu_2d(iip1,j) = cvusurcu_2d(1,j) |
563 |
cusurcvu_2d (i,j) = 1./ cvusurcu_2d(i,j) |
cusurcvu_2d(iip1,j) = cusurcvu_2d(1,j) |
564 |
cvuscugam1_2d (i,j) = cvusurcu_2d(i,j) ** ( - gamdi_gdiv ) |
cvuscugam1_2d(iip1,j) = cvuscugam1_2d(1,j) |
565 |
cvuscugam2_2d (i,j) = cvusurcu_2d(i,j) ** ( - gamdi_h ) |
cvuscugam2_2d(iip1,j) = cvuscugam2_2d(1,j) |
566 |
cuscvugam_2d (i,j) = cusurcvu_2d(i,j) ** ( - gamdi_grot ) |
cuscvugam_2d(iip1,j) = cuscvugam_2d(1,j) |
567 |
ENDDO |
END DO |
568 |
cu_2d (iip1,j) = cu_2d(1,j) |
|
569 |
unscu2_2d (iip1,j) = unscu2_2d(1,j) |
|
570 |
cvusurcu_2d (iip1,j) = cvusurcu_2d(1,j) |
! .... calcul aux poles .... |
571 |
cusurcvu_2d (iip1,j) = cusurcvu_2d(1,j) |
|
572 |
cvuscugam1_2d(iip1,j) = cvuscugam1_2d(1,j) |
DO i = 1, iip1 |
573 |
cvuscugam2_2d(iip1,j) = cvuscugam2_2d(1,j) |
cu_2d(i,1) = 0. |
574 |
cuscvugam_2d (iip1,j) = cuscvugam_2d(1,j) |
unscu2_2d(i,1) = 0. |
575 |
ENDDO |
cvu(i,1) = 0. |
576 |
|
|
577 |
c |
cu_2d(i,jjp1) = 0. |
578 |
c .... calcul aux poles .... |
unscu2_2d(i,jjp1) = 0. |
579 |
c |
cvu(i,jjp1) = 0. |
580 |
DO i = 1, iip1 |
END DO |
581 |
cu_2d ( i, 1 ) = 0. |
|
582 |
unscu2_2d( i, 1 ) = 0. |
! .............................................................. |
583 |
cvu ( i, 1 ) = 0. |
|
584 |
c |
DO j = 1, jjm |
585 |
cu_2d (i, jjp1) = 0. |
DO i = 1, iim |
586 |
unscu2_2d(i, jjp1) = 0. |
airvscu2_2d(i,j) = airev_2d(i,j)/(cuv(i,j)*cuv(i,j)) |
587 |
cvu (i, jjp1) = 0. |
aivscu2gam_2d(i,j) = airvscu2_2d(i,j)**(-gamdi_grot) |
588 |
ENDDO |
END DO |
589 |
c |
airvscu2_2d(iip1,j) = airvscu2_2d(1,j) |
590 |
c .............................................................. |
aivscu2gam_2d(iip1,j) = aivscu2gam_2d(1,j) |
591 |
c |
END DO |
592 |
DO j = 1, jjm |
|
593 |
DO i= 1, iim |
DO j = 2, jjm |
594 |
airvscu2_2d (i,j) = airev_2d(i,j)/ ( cuv(i,j) * cuv(i,j) ) |
DO i = 1, iim |
595 |
aivscu2gam_2d(i,j) = airvscu2_2d(i,j)** ( - gamdi_grot ) |
airuscv2_2d(i,j) = aireu_2d(i,j)/(cvu(i,j)*cvu(i,j)) |
596 |
ENDDO |
aiuscv2gam_2d(i,j) = airuscv2_2d(i,j)**(-gamdi_grot) |
597 |
airvscu2_2d (iip1,j) = airvscu2_2d(1,j) |
END DO |
598 |
aivscu2gam_2d(iip1,j) = aivscu2gam_2d(1,j) |
airuscv2_2d(iip1,j) = airuscv2_2d(1,j) |
599 |
ENDDO |
aiuscv2gam_2d(iip1,j) = aiuscv2gam_2d(1,j) |
600 |
|
END DO |
601 |
DO j=2,jjm |
|
602 |
DO i=1,iim |
|
603 |
airuscv2_2d (i,j) = aireu_2d(i,j)/ ( cvu(i,j) * cvu(i,j) ) |
! calcul des aires aux poles : |
604 |
aiuscv2gam_2d (i,j) = airuscv2_2d(i,j)** ( - gamdi_grot ) |
! ----------------------------- |
605 |
ENDDO |
|
606 |
airuscv2_2d (iip1,j) = airuscv2_2d (1,j) |
apoln = sum(aire_2d(:iim, 1)) |
607 |
aiuscv2gam_2d(iip1,j) = aiuscv2gam_2d(1,j) |
apols = sum(aire_2d(:iim, jjp1)) |
608 |
ENDDO |
unsapolnga1 = 1./(apoln**(-gamdi_gdiv)) |
609 |
|
unsapolsga1 = 1./(apols**(-gamdi_gdiv)) |
610 |
c |
unsapolnga2 = 1./(apoln**(-gamdi_h)) |
611 |
c calcul des aires aux poles : |
unsapolsga2 = 1./(apols**(-gamdi_h)) |
612 |
c ----------------------------- |
|
613 |
c |
!---------------------------------------------------------------- |
614 |
apoln = SSUM(iim,aire_2d(1,1),1) |
! gtitre='Coriolis version ancienne' |
615 |
apols = SSUM(iim,aire_2d(1,jjp1),1) |
! gfichier='fext1' |
616 |
unsapolnga1 = 1./ ( apoln ** ( - gamdi_gdiv ) ) |
! CALL writestd(fext_2d,iip1*jjm) |
617 |
unsapolsga1 = 1./ ( apols ** ( - gamdi_gdiv ) ) |
|
618 |
unsapolnga2 = 1./ ( apoln ** ( - gamdi_h ) ) |
! changement F. Hourdin calcul conservatif pour fext_2d |
619 |
unsapolsga2 = 1./ ( apols ** ( - gamdi_h ) ) |
! constang_2d contient le produit a * cos ( latitude ) * omega |
620 |
c |
|
621 |
c---------------------------------------------------------------- |
DO i = 1, iim |
622 |
c gtitre='Coriolis version ancienne' |
constang_2d(i,1) = 0. |
623 |
c gfichier='fext1' |
END DO |
624 |
c CALL writestd(fext_2d,iip1*jjm) |
DO j = 1, jjm - 1 |
625 |
c |
DO i = 1, iim |
626 |
c changement F. Hourdin calcul conservatif pour fext_2d |
constang_2d(i,j+1) = rad*omeg*cu_2d(i,j+1)*cos(rlatu(j+1)) |
627 |
c constang_2d contient le produit a * cos ( latitude ) * omega |
END DO |
628 |
c |
END DO |
629 |
DO i=1,iim |
DO i = 1, iim |
630 |
constang_2d(i,1) = 0. |
constang_2d(i,jjp1) = 0. |
631 |
ENDDO |
END DO |
632 |
DO j=1,jjm-1 |
|
633 |
DO i=1,iim |
! periodicite en longitude |
634 |
constang_2d(i,j+1) = rad*omeg*cu_2d(i,j+1)*COS(rlatu(j+1)) |
|
635 |
ENDDO |
DO j = 1, jjm |
636 |
ENDDO |
fext_2d(iip1,j) = fext_2d(1,j) |
637 |
DO i=1,iim |
END DO |
638 |
constang_2d(i,jjp1) = 0. |
DO j = 1, jjp1 |
639 |
ENDDO |
constang_2d(iip1,j) = constang_2d(1,j) |
640 |
c |
END DO |
641 |
c periodicite en longitude |
|
642 |
c |
! fin du changement |
643 |
DO j=1,jjm |
|
644 |
fext_2d(iip1,j) = fext_2d(1,j) |
|
645 |
ENDDO |
!---------------------------------------------------------------- |
646 |
DO j=1,jjp1 |
|
647 |
constang_2d(iip1,j) = constang_2d(1,j) |
WRITE (6,*) ' *** Coordonnees de la grille *** ' |
648 |
ENDDO |
WRITE (6,995) |
649 |
|
|
650 |
c fin du changement |
WRITE (6,*) ' LONGITUDES aux pts. V ( degres ) ' |
651 |
|
WRITE (6,995) |
652 |
c |
DO i = 1, iip1 |
653 |
c---------------------------------------------------------------- |
rlonvv(i) = rlonv(i)*180./pi |
654 |
c |
END DO |
655 |
WRITE(6,*) ' *** Coordonnees de la grille *** ' |
WRITE (6,400) rlonvv |
656 |
WRITE(6,995) |
|
657 |
c |
WRITE (6,995) |
658 |
WRITE(6,*) ' LONGITUDES aux pts. V ( degres ) ' |
WRITE (6,*) ' LATITUDES aux pts. V ( degres ) ' |
659 |
WRITE(6,995) |
WRITE (6,995) |
660 |
DO i=1,iip1 |
DO i = 1, jjm |
661 |
rlonvv(i) = rlonv(i)*180./pi |
rlatuu(i) = rlatv(i)*180./pi |
662 |
ENDDO |
END DO |
663 |
WRITE(6,400) rlonvv |
WRITE (6,400) (rlatuu(i),i=1,jjm) |
664 |
c |
|
665 |
WRITE(6,995) |
DO i = 1, iip1 |
666 |
WRITE(6,*) ' LATITUDES aux pts. V ( degres ) ' |
rlonvv(i) = rlonu(i)*180./pi |
667 |
WRITE(6,995) |
END DO |
668 |
DO i=1,jjm |
WRITE (6,995) |
669 |
rlatuu(i)=rlatv(i)*180./pi |
WRITE (6,*) ' LONGITUDES aux pts. U ( degres ) ' |
670 |
ENDDO |
WRITE (6,995) |
671 |
WRITE(6,400) (rlatuu(i),i=1,jjm) |
WRITE (6,400) rlonvv |
672 |
c |
WRITE (6,995) |
673 |
DO i=1,iip1 |
|
674 |
rlonvv(i)=rlonu(i)*180./pi |
WRITE (6,*) ' LATITUDES aux pts. U ( degres ) ' |
675 |
ENDDO |
WRITE (6,995) |
676 |
WRITE(6,995) |
DO i = 1, jjp1 |
677 |
WRITE(6,*) ' LONGITUDES aux pts. U ( degres ) ' |
rlatuu(i) = rlatu(i)*180./pi |
678 |
WRITE(6,995) |
END DO |
679 |
WRITE(6,400) rlonvv |
WRITE (6,400) (rlatuu(i),i=1,jjp1) |
680 |
WRITE(6,995) |
WRITE (6,995) |
681 |
|
|
682 |
WRITE(6,*) ' LATITUDES aux pts. U ( degres ) ' |
400 FORMAT (1X,8F8.2) |
683 |
WRITE(6,995) |
990 FORMAT (//) |
684 |
DO i=1,jjp1 |
995 FORMAT (/) |
685 |
rlatuu(i)=rlatu(i)*180./pi |
|
686 |
ENDDO |
END SUBROUTINE inigeom |
|
WRITE(6,400) (rlatuu(i),i=1,jjp1) |
|
|
WRITE(6,995) |
|
|
c |
|
|
444 format(f10.3,f6.0) |
|
|
400 FORMAT(1x,8f8.2) |
|
|
990 FORMAT(//) |
|
|
995 FORMAT(/) |
|
|
c |
|
|
RETURN |
|
|
END |
|