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