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