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