Changeset 5158 for LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Timestamp:
- Aug 2, 2024, 2:12:03 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/adaptdt.f90
r5136 r5158 29 29 30 30 CFLmax=0. 31 dol=1,llm32 doj=2,jjm33 doi=1,iim31 DO l=1,llm 32 DO j=2,jjm 33 DO i=1,iim 34 34 aaa=pbaru(i,j,l)*dtvr/masse(i,j,l) 35 35 CFLmax=max(CFLmax,aaa) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.f90
r5136 r5158 75 75 ENDDO 76 76 77 dol = 1, llm77 DO l = 1, llm 78 78 qpn = 0. 79 79 qps = 0. 80 doij = 1, iim80 DO ij = 1, iim 81 81 qpn = qpn + q(ij, l) * masse(ij, l) 82 82 qps = qps + q(ip1jm + ij, l) * masse(ip1jm + ij, l) … … 84 84 qpn = qpn / ssum(iim, masse(1, l), 1) 85 85 qps = qps / ssum(iim, masse(ip1jm + 1, l), 1) 86 doij = 1, iip186 DO ij = 1, iip1 87 87 q(ij, l) = qpn 88 88 q(ip1jm + ij, l) = qps … … 90 90 enddo 91 91 92 doij = 1, ip1jmp192 DO ij = 1, ip1jmp1 93 93 mw(ij, llm + 1) = 0. 94 94 enddo 95 dol = 1, llm96 doij = 1, ip1jmp195 DO l = 1, llm 96 DO ij = 1, ip1jmp1 97 97 zq(ij, l) = q(ij, l) 98 98 zm(ij, l) = masse(ij, l) … … 114 114 ! CALL minmaxq(zq,qmin,qmax,'apres vlx ') 115 115 116 dol = 1, llm117 doij = 1, ip1jmp1116 DO l = 1, llm 117 DO ij = 1, ip1jmp1 118 118 q(ij, l) = zq(ij, l) 119 119 enddo 120 doij = 1, ip1jm + 1, iip1120 DO ij = 1, ip1jm + 1, iip1 121 121 q(ij + iim, l) = q(ij, l) 122 122 enddo … … 158 158 ! ----------------------- 159 159 IF (mode==0) THEN 160 dol = 1, llm161 doij = 1, ip1jm160 DO l = 1, llm 161 DO ij = 1, ip1jm 162 162 qd(ij, l) = q(ij, l) 163 163 qg(ij, l) = q(ij, l) … … 165 165 enddo 166 166 else 167 dol = 1, llm168 doij = iip2, ip1jm - 1167 DO l = 1, llm 168 DO ij = iip2, ip1jm - 1 169 169 dxqu(ij) = q(ij + 1, l) - q(ij, l) 170 170 zqu(ij) = 0.5 * (q(ij + 1, l) + q(ij, l)) 171 171 enddo 172 doij = iip1 + iip1, ip1jm, iip1172 DO ij = iip1 + iip1, ip1jm, iip1 173 173 dxqu(ij) = dxqu(ij - iim) 174 174 zqu(ij) = zqu(ij - iim) 175 175 enddo 176 doij = iip2, ip1jm - 1176 DO ij = iip2, ip1jm - 1 177 177 zqu(ij) = zqu(ij) - dxqu(ij + 1) / 12. 178 178 enddo 179 doij = iip1 + iip1, ip1jm, iip1179 DO ij = iip1 + iip1, ip1jm, iip1 180 180 zqu(ij) = zqu(ij - iim) 181 181 enddo 182 doij = iip2 + 1, ip1jm182 DO ij = iip2 + 1, ip1jm 183 183 zqu(ij) = zqu(ij) + dxqu(ij - 1) / 12. 184 184 enddo 185 doij = iip1 + iip1, ip1jm, iip1185 DO ij = iip1 + iip1, ip1jm, iip1 186 186 zqu(ij - iim) = zqu(ij) 187 187 enddo … … 189 189 ! calcul des valeurs max et min acceptees aux interfaces 190 190 191 doij = iip2, ip1jm - 1191 DO ij = iip2, ip1jm - 1 192 192 zqmax(ij) = max(q(ij + 1, l), q(ij, l)) 193 193 zqmin(ij) = min(q(ij + 1, l), q(ij, l)) 194 194 enddo 195 doij = iip1 + iip1, ip1jm, iip1195 DO ij = iip1 + iip1, ip1jm, iip1 196 196 zqmax(ij) = zqmax(ij - iim) 197 197 zqmin(ij) = zqmin(ij - iim) 198 198 enddo 199 doij = iip2 + 1, ip1jm199 DO ij = iip2 + 1, ip1jm 200 200 extremum(ij) = dxqu(ij) * dxqu(ij - 1)<=0. 201 201 enddo 202 doij = iip1 + iip1, ip1jm, iip1202 DO ij = iip1 + iip1, ip1jm, iip1 203 203 extremum(ij - iim) = extremum(ij) 204 204 enddo 205 doij = iip2, ip1jm205 DO ij = iip2, ip1jm 206 206 zqu(ij) = min(max(zqmin(ij), zqu(ij)), zqmax(ij)) 207 207 enddo 208 doij = iip2 + 1, ip1jm208 DO ij = iip2 + 1, ip1jm 209 209 IF(extremum(ij)) THEN 210 210 qg(ij, l) = q(ij, l) … … 215 215 endif 216 216 enddo 217 doij = iip1 + iip1, ip1jm, iip1217 DO ij = iip1 + iip1, ip1jm, iip1 218 218 qd(ij - iim, l) = qd(ij, l) 219 219 qg(ij - iim, l) = qg(ij, l) … … 222 222 goto 8888 223 223 224 doij = iip2 + 1, ip1jm224 DO ij = iip2 + 1, ip1jm 225 225 IF(extremum(ij).and..not.extremum(ij - 1)) & 226 226 qd(ij - 1, l) = q(ij, l) 227 227 enddo 228 228 229 doij = iip1 + iip1, ip1jm, iip1229 DO ij = iip1 + iip1, ip1jm, iip1 230 230 qd(ij - iim, l) = qd(ij, l) 231 231 enddo 232 doij = iip2, ip1jm - 1232 DO ij = iip2, ip1jm - 1 233 233 IF (extremum(ij).and..not.extremum(ij + 1)) & 234 234 qg(ij + 1, l) = q(ij, l) 235 235 enddo 236 236 237 doij = iip1 + iip1, ip1jm, iip1237 DO ij = iip1 + iip1, ip1jm, iip1 238 238 qg(ij, l) = qg(ij - iim, l) 239 239 enddo … … 273 273 274 274 IF (mode==0) THEN 275 dol = 1, llm276 doij = 1, ip1jmp1275 DO l = 1, llm 276 DO ij = 1, ip1jmp1 277 277 qn(ij, l) = q(ij, l) 278 278 qs(ij, l) = q(ij, l) … … 283 283 ! calcul des pentes en u: 284 284 ! ----------------------- 285 dol = 1, llm286 doij = 1, ip1jm285 DO l = 1, llm 286 DO ij = 1, ip1jm 287 287 dyqv(ij) = q(ij, l) - q(ij + iip1, l) 288 288 enddo 289 289 290 doij = iip2, ip1jm - iip1290 DO ij = iip2, ip1jm - iip1 291 291 zqv(ij, l) = 0.5 * (q(ij + iip1, l) + q(ij, l)) 292 292 zqv(ij, l) = zqv(ij, l) + (dyqv(ij + iip1) - dyqv(ij - iip1)) / 12. 293 293 enddo 294 294 295 doij = iip2, ip1jm295 DO ij = iip2, ip1jm 296 296 extremum(ij) = dyqv(ij) * dyqv(ij - iip1)<=0. 297 297 enddo 298 298 299 299 ! Pas de pentes aux poles 300 doij = 1, iip1300 DO ij = 1, iip1 301 301 zqv(ij, l) = q(ij, l) 302 302 zqv(ip1jm - iip1 + ij, l) = q(ip1jm + ij, l) … … 306 306 307 307 ! calcul des valeurs max et min acceptees aux interfaces 308 doij = 1, ip1jm308 DO ij = 1, ip1jm 309 309 zqmax(ij) = max(q(ij + iip1, l), q(ij, l)) 310 310 zqmin(ij) = min(q(ij + iip1, l), q(ij, l)) 311 311 enddo 312 312 313 doij = 1, ip1jm313 DO ij = 1, ip1jm 314 314 zqv(ij, l) = min(max(zqmin(ij), zqv(ij, l)), zqmax(ij)) 315 315 enddo 316 316 317 doij = iip2, ip1jm317 DO ij = iip2, ip1jm 318 318 IF(extremum(ij)) THEN 319 319 qs(ij, l) = q(ij, l) … … 327 327 enddo 328 328 329 doij = 1, iip1329 DO ij = 1, iip1 330 330 qs(ij, l) = q(ij, l) 331 331 qn(ij, l) = q(ij, l) … … 373 373 374 374 IF (mode==0) THEN 375 dol = 1, llm376 doij = 1, ip1jmp1375 DO l = 1, llm 376 DO ij = 1, ip1jmp1 377 377 qb(ij, l) = q(ij, l) 378 378 qh(ij, l) = q(ij, l) … … 380 380 enddo 381 381 else 382 dol = 2, llm383 doij = 1, ip1jmp1382 DO l = 2, llm 383 DO ij = 1, ip1jmp1 384 384 dzqw(ij, l) = q(ij, l - 1) - q(ij, l) 385 385 zqw(ij, l) = 0.5 * (q(ij, l - 1) + q(ij, l)) 386 386 enddo 387 387 enddo 388 doij = 1, ip1jmp1388 DO ij = 1, ip1jmp1 389 389 dzqw(ij, 1) = 0. 390 390 dzqw(ij, llm + 1) = 0. 391 391 enddo 392 dol = 2, llm393 doij = 1, ip1jmp1392 DO l = 2, llm 393 DO ij = 1, ip1jmp1 394 394 zqw(ij, l) = zqw(ij, l) + (dzqw(ij, l + 1) - dzqw(ij, l - 1)) / 12. 395 395 enddo 396 396 enddo 397 dol = 2, llm - 1398 doij = 1, ip1jmp1397 DO l = 2, llm - 1 398 DO ij = 1, ip1jmp1 399 399 extremum(ij, l) = dzqw(ij, l) * dzqw(ij, l + 1)<=0. 400 400 enddo … … 402 402 403 403 ! Pas de pentes en bas et en haut 404 doij = 1, ip1jmp1404 DO ij = 1, ip1jmp1 405 405 zqw(ij, 2) = q(ij, 1) 406 406 zqw(ij, llm) = q(ij, llm) … … 410 410 411 411 ! calcul des valeurs max et min acceptees aux interfaces 412 dol = 2, llm413 doij = 1, ip1jmp1412 DO l = 2, llm 413 DO ij = 1, ip1jmp1 414 414 zqmax(ij, l) = max(q(ij, l - 1), q(ij, l)) 415 415 zqmin(ij, l) = min(q(ij, l - 1), q(ij, l)) … … 417 417 enddo 418 418 419 dol = 2, llm420 doij = 1, ip1jmp1419 DO l = 2, llm 420 DO ij = 1, ip1jmp1 421 421 zqw(ij, l) = min(max(zqmin(ij, l), zqw(ij, l)), zqmax(ij, l)) 422 422 enddo 423 423 enddo 424 424 425 dol = 2, llm - 1426 doij = 1, ip1jmp1425 DO l = 2, llm - 1 426 DO ij = 1, ip1jmp1 427 427 IF(extremum(ij, l)) THEN 428 428 qh(ij, l) = q(ij, l) … … 443 443 ! enddo 444 444 445 doij = 1, ip1jmp1445 DO ij = 1, ip1jmp1 446 446 qb(ij, 1) = q(ij, 1) 447 447 qh(ij, 1) = q(ij, 1) … … 499 499 data prec/1.e-15/ 500 500 501 dol = 1, llm502 doij = iip2, ip1jm501 DO l = 1, llm 502 DO ij = iip2, ip1jm 503 503 zdq = qd(ij, l) - qg(ij, l) 504 504 ! if((qd(ij,l)-q(ij,l))*(q(ij,l)-qg(ij,l)).lt.0.) THEN … … 529 529 ! calcul de la pente maximum dans la maille en valeur absolue 530 530 531 dol = 1, llm532 doij = iip2, ip1jm - 1531 DO l = 1, llm 532 DO ij = iip2, ip1jm - 1 533 533 IF (u_m(ij, l)>=0.) THEN 534 534 zsigp = zsigd(ij, l) … … 573 573 enddo 574 574 575 dol = 1, llm576 doij = iip1 + iip1, ip1jm, iip1575 DO l = 1, llm 576 DO ij = iip1 + iip1, ip1jm, iip1 577 577 u_mq(ij, l) = u_mq(ij - iim, l) 578 578 ladvplus(ij, l) = ladvplus(ij - iim, l) … … 585 585 ! tris des regions a traiter 586 586 n0 = 0 587 dol = 1, llm587 DO l = 1, llm 588 588 nl(l) = 0 589 doij = iip2, ip1jm589 DO ij = iip2, ip1jm 590 590 IF(ladvplus(ij, l)) THEN 591 591 nl(l) = nl(l) + 1 … … 601 601 , 'contenu de la maille : ', n0 602 602 603 dol = 1, llm603 DO l = 1, llm 604 604 IF(nl(l)>0) THEN 605 605 iju = 0 606 606 ! indicage des mailles concernees par le traitement special 607 doij = iip2, ip1jm607 DO ij = iip2, ip1jm 608 608 IF(ladvplus(ij, l).AND.mod(ij, iip1)/=0) THEN 609 609 iju = iju + 1 … … 615 615 616 616 ! traitement des mailles 617 doiju = 1, niju617 DO iju = 1, niju 618 618 ij = indu(iju) 619 619 j = (ij - 1) / iip1 + 1 … … 624 624 i = ijq - (j - 1) * iip1 625 625 ! accumulation pour les mailles completements advectees 626 dowhile(zu_m>masse(ijq, l))626 DO while(zu_m>masse(ijq, l)) 627 627 u_mq(ij, l) = u_mq(ij, l) + q(ijq, l) * masse(ijq, l) 628 628 zu_m = zu_m - masse(ijq, l) … … 654 654 i = ijq - (j - 1) * iip1 655 655 ! accumulation pour les mailles completements advectees 656 dowhile(-zu_m>masse(ijq, l))656 DO while(-zu_m>masse(ijq, l)) 657 657 u_mq(ij, l) = u_mq(ij, l) - q(ijq, l) * masse(ijq, l) 658 658 zu_m = zu_m + masse(ijq, l) … … 689 689 690 690 ! bouclage en latitude 691 dol = 1, llm692 doij = iip1 + iip1, ip1jm, iip1691 DO l = 1, llm 692 DO ij = iip1 + iip1, ip1jm, iip1 693 693 u_mq(ij, l) = u_mq(ij - iim, l) 694 694 enddo … … 699 699 !================================================================= 700 700 701 dol = 1, llm702 doij = iip2 + 1, ip1jm701 DO l = 1, llm 702 DO ij = iip2 + 1, ip1jm 703 703 new_m = masse(ij, l) + u_m(ij - 1, l) - u_m(ij, l) 704 704 q(ij, l) = (q(ij, l) * masse(ij, l) + & … … 708 708 enddo 709 709 ! Modif Fred 22 03 96 correction d'un bug (les scopy ci-dessous) 710 doij = iip1 + iip1, ip1jm, iip1710 DO ij = iip1 + iip1, ip1jm, iip1 711 711 q(ij - iim, l) = q(ij, l) 712 712 masse(ij - iim, l) = masse(ij, l) … … 757 757 758 758 data prec/1.e-15/ 759 dol = 1, llm760 doij = 1, ip1jmp1759 DO l = 1, llm 760 DO ij = 1, ip1jmp1 761 761 zdq = qn(ij, l) - qs(ij, l) 762 762 ! if((qn(ij,l)-q(ij,l))*(q(ij,l)-qs(ij,l)).lt.0.) THEN … … 783 783 ! calcul de la pente maximum dans la maille en valeur absolue 784 784 785 doij = 1, ip1jm785 DO ij = 1, ip1jm 786 786 IF (v_m(ij, l)>=0.) THEN 787 787 zsigp = zsign(ij + iip1) … … 811 811 enddo 812 812 813 dol = 1, llm814 doij = iip2, ip1jm813 DO l = 1, llm 814 DO ij = iip2, ip1jm 815 815 new_m = masse(ij, l) & 816 816 + v_m(ij, l) - v_m(ij - iip1, l) … … 825 825 new_m = massen + convmpn 826 826 q(1, l) = (q(1, l) * massen + convpn) / new_m 827 doij = 1, iip1827 DO ij = 1, iip1 828 828 q(ij, l) = q(1, l) 829 829 masse(ij, l) = new_m * aire(ij) / apoln … … 835 835 new_m = masses + convmps 836 836 q(ip1jm + 1, l) = (q(ip1jm + 1, l) * masses + convps) / new_m 837 doij = ip1jm + 1, ip1jmp1837 DO ij = ip1jm + 1, ip1jmp1 838 838 q(ij, l) = q(ip1jm + 1, l) 839 839 masse(ij, l) = new_m * aire(ij) / apols … … 885 885 data prec/1.e-13/ 886 886 887 dol = 1, llm888 doij = 1, ip1jmp1887 DO l = 1, llm 888 DO ij = 1, ip1jmp1 889 889 zdq = qb(ij, l) - qh(ij, l) 890 890 ! if((qh(ij,l)-q(ij,l))*(q(ij,l)-qb(ij,l)).lt.0.) THEN … … 908 908 ! PRINT*,'ok1' 909 909 ! calcul de la pente maximum dans la maille en valeur absolue 910 dol = 2, llm911 doij = 1, ip1jmp1910 DO l = 2, llm 911 DO ij = 1, ip1jmp1 912 912 IF (w_m(ij, l)>=0.) THEN 913 913 zsigp = zsigb(ij, l) … … 937 937 enddo 938 938 939 doij = 1, ip1jmp1939 DO ij = 1, ip1jmp1 940 940 w_mq(ij, llm + 1) = 0. 941 941 w_mq(ij, 1) = 0. 942 942 enddo 943 943 944 dol = 1, llm945 doij = 1, ip1jmp1944 DO l = 1, llm 945 DO ij = 1, ip1jmp1 946 946 new_m = masse(ij, l) + w_m(ij, l + 1) - w_m(ij, l) 947 947 q(ij, l) = (q(ij, l) * masse(ij, l) + w_mq(ij, l + 1) - w_mq(ij, l)) & -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advy.f90
r5136 r5158 113 113 enddo 114 114 enddo 115 doi = 1, iip1115 DO i = 1, iip1 116 116 vgri(i, 0, l) = 0. 117 117 vgri(i, jjp1, l) = 0. -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advzp.f90
r5136 r5158 141 141 END DO 142 142 END DO 143 doj = 1, jjp1144 doi = 1, iip1143 DO j = 1, jjp1 144 DO i = 1, iip1 145 145 wgri(i, j, 0) = 0. 146 146 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.f90
r5136 r5158 244 244 airetot=0. 245 245 ! 246 doi=1,imjmp1246 DO i=1,imjmp1 247 247 qw_tot = qw_tot + zqw_col(i) 248 248 ql_tot = ql_tot + zql_col(i) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert.F90
r5134 r5158 89 89 zkm1=0. 90 90 sig(1)=1. 91 dol=1, llm91 DO l=1, llm 92 92 sig(l+1)=(cosh(l/k0))**(-alpha*k0/scaleheight) & 93 93 *exp(-alpha/scaleheight*tanh((llm-k1)/k0) & … … 315 315 position="rewind") 316 316 read(unit, fmt=*) ! skip title line 317 dol = 1, llm + 1317 DO l = 1, llm + 1 318 318 read(unit, fmt=*) ap(l), bp(l) 319 319 END DO -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/disvert_noterre.f90
r5134 r5158 91 91 esig=1. 92 92 93 dol=1,2093 DO l=1,20 94 94 esig=-log((1./sig1-1.)*exp(-dz0)/esig)/(llm-1.) 95 95 enddo … … 129 129 130 130 READ(99,*) scaleheight 131 dol=1,llm131 DO l=1,llm 132 132 read(99,*) zsig(l) 133 133 END DO … … 135 135 136 136 sig(1) =1 137 dol=2,llm137 DO l=2,llm 138 138 sig(l) = 0.5 * ( exp(-zsig(l)/scaleheight) + & 139 139 exp(-zsig(l-1)/scaleheight) ) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ener_mod.F90
r5134 r5158 9 9 INCLUDE "paramet.h" 10 10 11 REAL ang0,etot0,ptot0,ztot0,stot0, 12 11 REAL ang0,etot0,ptot0,ztot0,stot0, & 12 ang,etot,ptot,ztot,stot,rmsdpdt,rmsv,gtot(llmm1) 13 13 14 14 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fxhyp_m.F90
r5134 r5158 189 189 is2 = 1 190 190 191 dowhile (rlonm025(is2) < - pi .AND. is2 < iim)191 DO while (rlonm025(is2) < - pi .AND. is2 < iim) 192 192 is2 = is2 + 1 193 193 END DO … … 200 200 is2 = iim 201 201 202 dowhile (rlonm025(is2) > pi .AND. is2 > 1)202 DO while (rlonm025(is2) > pi .AND. is2 > 1) 203 203 is2 = is2 - 1 204 204 END DO -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_ecrit_fi.f90
r5134 r5158 18 18 19 19 jjm = jjmp1 - 1 20 don = 1, nfield20 DO n = 1, nfield 21 21 fi(1,n) = ecrit(1,1,n) 22 22 fi(nlon,n) = ecrit(1,jjm+1,n) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_int_dyn.f90
r5117 r5158 26 26 polenord = 0. 27 27 polesud = 0. 28 doi = 1, iim28 DO i = 1, iim 29 29 polenord = polenord + champin (i, 1) 30 30 polesud = polesud + champin (i, jp1) … … 32 32 polenord = polenord / iim 33 33 polesud = polesud / iim 34 doj = 1, jp135 doi = 1, iim34 DO j = 1, jp1 35 DO i = 1, iim 36 36 IF (j == 1) THEN 37 37 champdyn(i, j) = polenord -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90
r5136 r5158 1 2 1 ! $Id: $ 3 2 … … 10 9 ! The SUBROUTINE is called in dynphy_lonlat/phylmd/ce0l.F90. 11 10 12 SUBROUTINE grilles_gcm_netcdf_sub(masque, phis)11 SUBROUTINE grilles_gcm_netcdf_sub(masque, phis) 13 12 14 13 USE comconst_mod, ONLY: cpp, kappa, g, omeg, daysec, rad, pi 15 14 USE comvert_mod, ONLY: presnivs, preff, pa 16 15 USE netcdf, ONLY: nf90_def_var, nf90_int, nf90_float, nf90_put_var, nf90_enddef, & 17 nf90_put_att,nf90_def_dim,nf90_64bit_offset,nf90_clobber,nf90_create16 nf90_put_att, nf90_def_dim, nf90_64bit_offset, nf90_clobber, nf90_create 18 17 USE lmdz_comgeom 19 18 20 19 IMPLICIT NONE 21 20 … … 23 22 INCLUDE "paramet.h" 24 23 25 !======================== 26 REAL, DIMENSION(iip1,jjp1),INTENT(IN):: masque ! masque terre/mer27 REAL, DIMENSION(iip1,jjp1),INTENT(IN):: phis ! geopotentiel au sol28 29 INTEGER status, i,j30 24 !======================== 25 REAL, DIMENSION(iip1, jjp1), INTENT(IN) :: masque ! masque terre/mer 26 REAL, DIMENSION(iip1, jjp1), INTENT(IN) :: phis ! geopotentiel au sol 27 28 INTEGER status, i, j 29 31 30 ! Attributs netcdf output 32 INTEGER ncid_out, rcode_out33 34 INTEGER out_lonuid, out_lonvid,out_latuid,out_latvid35 INTEGER out_uid, out_vid,out_tempid36 INTEGER out_lonudim, out_lonvdim37 INTEGER out_latudim, out_latvdim,out_dim(2)31 INTEGER ncid_out, rcode_out 32 33 INTEGER out_lonuid, out_lonvid, out_latuid, out_latvid 34 INTEGER out_uid, out_vid, out_tempid 35 INTEGER out_lonudim, out_lonvdim 36 INTEGER out_latudim, out_latvdim, out_dim(2) 38 37 INTEGER out_levdim 39 38 40 39 INTEGER :: presnivs_id 41 INTEGER :: mask_id, area_id,phis_id42 43 INTEGER start(2), COUNT(2)40 INTEGER :: mask_id, area_id, phis_id 41 42 INTEGER start(2), COUNT(2) 44 43 45 44 ! Variables 46 REAL rlatudeg(jjp1), rlatvdeg(jjm),rlev(llm)47 REAL rlonudeg(iip1), rlonvdeg(iip1)48 REAL uwnd(iip1, jjp1),vwnd(iip1,jjm),temp(iip1,jjp1)49 50 INTEGER masque_int(iip1, jjp1)51 REAL :: phis_loc(iip1, jjp1)52 45 REAL rlatudeg(jjp1), rlatvdeg(jjm), rlev(llm) 46 REAL rlonudeg(iip1), rlonvdeg(iip1) 47 REAL uwnd(iip1, jjp1), vwnd(iip1, jjm), temp(iip1, jjp1) 48 49 INTEGER masque_int(iip1, jjp1) 50 REAL :: phis_loc(iip1, jjp1) 51 53 52 !======================== 54 53 ! CALCULATION of latu, latv, lonu, lonv in deg. … … 62 61 63 62 preff = 101325. 64 pa = 50000.65 66 CALL conf_gcm( 99, .TRUE.)63 pa = 50000. 64 65 CALL conf_gcm(99, .TRUE.) 67 66 CALL iniconst 68 67 CALL inigeom 69 68 70 DO j =1,jjp171 rlatudeg(j)=rlatu(j)*180./pi72 ENDDO 73 74 DO j =1,jjm75 rlatvdeg(j)=rlatv(j)*180./pi76 ENDDO 77 78 DO i =1,iip179 rlonudeg(i)=rlonu(i)*180./pi + 360.80 rlonvdeg(i)=rlonv(i)*180./pi + 360.81 ENDDO 82 69 DO j = 1, jjp1 70 rlatudeg(j) = rlatu(j) * 180. / pi 71 ENDDO 72 73 DO j = 1, jjm 74 rlatvdeg(j) = rlatv(j) * 180. / pi 75 ENDDO 76 77 DO i = 1, iip1 78 rlonudeg(i) = rlonu(i) * 180. / pi + 360. 79 rlonvdeg(i) = rlonv(i) * 180. / pi + 360. 80 ENDDO 81 83 82 ! CALCULATION of "false" variables on u, v, s grids 84 83 ! --------------------------------------------------- 85 DO i=1,iip186 DO j=1,jjp187 uwnd(i,j)=MOD(i,2)+MOD(j,2)88 temp(i,j)=MOD(i,2)+MOD(j,2)89 90 DO j=1,jjm91 vwnd(i,j)=MOD(i,2)+MOD(j,2)92 93 ENDDO 84 DO i = 1, iip1 85 DO j = 1, jjp1 86 uwnd(i, j) = MOD(i, 2) + MOD(j, 2) 87 temp(i, j) = MOD(i, 2) + MOD(j, 2) 88 ENDDO 89 DO j = 1, jjm 90 vwnd(i, j) = MOD(i, 2) + MOD(j, 2) 91 END DO 92 ENDDO 94 93 95 94 ! CALCULATION of local vars for presnivs, mask, sfc. geopot. height 96 95 ! --------------------------------------------------- 97 96 rlev(:) = presnivs(:) 98 phis_loc(:, :) = phis(:,:)/g99 masque_int(:, :) = nINT(masque(:,:))97 phis_loc(:, :) = phis(:, :) / g 98 masque_int(:, :) = nINT(masque(:, :)) 100 99 101 100 102 101 ! OPEN output netcdf file 103 102 !------------------------- 104 status =nf90_create('grilles_gcm.nc',IOR(nf90_clobber,nf90_64bit_offset),ncid_out)105 CALL handle_err(status) 106 103 status = nf90_create('grilles_gcm.nc', IOR(nf90_clobber, nf90_64bit_offset), ncid_out) 104 CALL handle_err(status) 105 107 106 ! DEFINE output dimensions 108 107 !------------------------- 109 status =nf90_def_dim(ncid_out,'lonu',iim+1,out_lonudim)110 CALL handle_err(status) 111 status =nf90_def_dim(ncid_out,'lonv',iim+1,out_lonvdim)112 CALL handle_err(status) 113 status =nf90_def_dim(ncid_out,'latu',jjm+1,out_latudim)114 CALL handle_err(status) 115 status =nf90_def_dim(ncid_out,'latv',jjm,out_latvdim)116 CALL handle_err(status) 117 118 status =nf90_def_dim(ncid_out,'lev',llm,out_levdim)119 CALL handle_err(status) 120 108 status = nf90_def_dim(ncid_out, 'lonu', iim + 1, out_lonudim) 109 CALL handle_err(status) 110 status = nf90_def_dim(ncid_out, 'lonv', iim + 1, out_lonvdim) 111 CALL handle_err(status) 112 status = nf90_def_dim(ncid_out, 'latu', jjm + 1, out_latudim) 113 CALL handle_err(status) 114 status = nf90_def_dim(ncid_out, 'latv', jjm, out_latvdim) 115 CALL handle_err(status) 116 117 status = nf90_def_dim(ncid_out, 'lev', llm, out_levdim) 118 CALL handle_err(status) 119 121 120 ! DEFINE output variables 122 121 !------------------------- 123 122 ! Longitudes on "u" dynamical grid 124 status =nf90_def_var(ncid_out,'lonu',nf90_float,out_lonudim, out_lonuid)125 CALL handle_err(status) 126 status =nf90_put_att(ncid_out,out_lonuid,'units','degrees_east')127 status =nf90_put_att(ncid_out,out_lonuid,'long_name','Longitude on u grid')123 status = nf90_def_var(ncid_out, 'lonu', nf90_float, out_lonudim, out_lonuid) 124 CALL handle_err(status) 125 status = nf90_put_att(ncid_out, out_lonuid, 'units', 'degrees_east') 126 status = nf90_put_att(ncid_out, out_lonuid, 'long_name', 'Longitude on u grid') 128 127 ! Longitudes on "v" dynamical grid 129 status =nf90_def_var(ncid_out,'lonv',nf90_float,out_lonvdim, out_lonvid)130 CALL handle_err(status) 131 status =nf90_put_att(ncid_out,out_lonvid,'units','degrees_east')132 status =nf90_put_att(ncid_out,out_lonvid,'long_name','Longitude on v grid')128 status = nf90_def_var(ncid_out, 'lonv', nf90_float, out_lonvdim, out_lonvid) 129 CALL handle_err(status) 130 status = nf90_put_att(ncid_out, out_lonvid, 'units', 'degrees_east') 131 status = nf90_put_att(ncid_out, out_lonvid, 'long_name', 'Longitude on v grid') 133 132 ! Latitudes on "u" dynamical grid 134 status =nf90_def_var(ncid_out,'latu',nf90_float,out_latudim, out_latuid)135 CALL handle_err(status) 136 status =nf90_put_att(ncid_out,out_latuid,'units','degrees_north')137 status =nf90_put_att(ncid_out,out_latuid,'long_name','Latitude on u grid')133 status = nf90_def_var(ncid_out, 'latu', nf90_float, out_latudim, out_latuid) 134 CALL handle_err(status) 135 status = nf90_put_att(ncid_out, out_latuid, 'units', 'degrees_north') 136 status = nf90_put_att(ncid_out, out_latuid, 'long_name', 'Latitude on u grid') 138 137 ! Latitudes on "v" dynamical grid 139 status =nf90_def_var(ncid_out,'latv',nf90_float,out_latvdim, out_latvid)140 CALL handle_err(status) 141 status =nf90_put_att(ncid_out,out_latvid,'units','degrees_north')142 status =nf90_put_att(ncid_out,out_latvid,'long_name','Latitude on v grid')138 status = nf90_def_var(ncid_out, 'latv', nf90_float, out_latvdim, out_latvid) 139 CALL handle_err(status) 140 status = nf90_put_att(ncid_out, out_latvid, 'units', 'degrees_north') 141 status = nf90_put_att(ncid_out, out_latvid, 'long_name', 'Latitude on v grid') 143 142 ! "u" lat/lon dynamical grid 144 out_dim(1) =out_lonudim145 out_dim(2) =out_latudim146 status =nf90_def_var(ncid_out,'grille_u',nf90_float,out_dim, out_uid)147 CALL handle_err(status) 148 status =nf90_put_att(ncid_out,out_uid,'units','m/s')149 status =nf90_put_att(ncid_out,out_uid,'long_name','u-wind dynamical grid')143 out_dim(1) = out_lonudim 144 out_dim(2) = out_latudim 145 status = nf90_def_var(ncid_out, 'grille_u', nf90_float, out_dim, out_uid) 146 CALL handle_err(status) 147 status = nf90_put_att(ncid_out, out_uid, 'units', 'm/s') 148 status = nf90_put_att(ncid_out, out_uid, 'long_name', 'u-wind dynamical grid') 150 149 ! "v" lat/lon dynamical grid 151 out_dim(1) =out_lonvdim152 out_dim(2) =out_latvdim153 status =nf90_def_var(ncid_out,'grille_v',nf90_float,out_dim, out_vid)154 CALL handle_err(status) 155 status =nf90_put_att(ncid_out,out_vid,'units','m/s')156 status =nf90_put_att(ncid_out,out_vid,'long_name','v-wind dynamical grid')150 out_dim(1) = out_lonvdim 151 out_dim(2) = out_latvdim 152 status = nf90_def_var(ncid_out, 'grille_v', nf90_float, out_dim, out_vid) 153 CALL handle_err(status) 154 status = nf90_put_att(ncid_out, out_vid, 'units', 'm/s') 155 status = nf90_put_att(ncid_out, out_vid, 'long_name', 'v-wind dynamical grid') 157 156 ! "s" (scalar) lat/lon dynamical grid 158 out_dim(1) =out_lonvdim159 out_dim(2) =out_latudim160 status =nf90_def_var(ncid_out,'grille_s',nf90_float,out_dim, out_tempid)161 CALL handle_err(status) 162 status =nf90_put_att(ncid_out,out_tempid,'units','Kelvin')163 status =nf90_put_att(ncid_out,out_tempid,'long_name','scalar dynamical grid')157 out_dim(1) = out_lonvdim 158 out_dim(2) = out_latudim 159 status = nf90_def_var(ncid_out, 'grille_s', nf90_float, out_dim, out_tempid) 160 CALL handle_err(status) 161 status = nf90_put_att(ncid_out, out_tempid, 'units', 'Kelvin') 162 status = nf90_put_att(ncid_out, out_tempid, 'long_name', 'scalar dynamical grid') 164 163 165 164 ! for INCA : 166 165 ! vertical levels "presnivs" 167 status =nf90_def_var(ncid_out,'presnivs',nf90_float,out_levdim, presnivs_id)168 CALL handle_err(status) 169 status =nf90_put_att(ncid_out,presnivs_id,'units','Pa')170 status =nf90_put_att(ncid_out,presnivs_id,'long_name','Vertical levels')166 status = nf90_def_var(ncid_out, 'presnivs', nf90_float, out_levdim, presnivs_id) 167 CALL handle_err(status) 168 status = nf90_put_att(ncid_out, presnivs_id, 'units', 'Pa') 169 status = nf90_put_att(ncid_out, presnivs_id, 'long_name', 'Vertical levels') 171 170 ! surface geopotential height: named "phis" as the sfc geopotential, is actually phis/g 172 out_dim(1) =out_lonvdim173 out_dim(2) =out_latudim174 status = nf90_def_var(ncid_out, 'phis',nf90_float,out_dim,phis_id)175 CALL handle_err(status) 176 status =nf90_put_att(ncid_out,phis_id,'units','m')177 status =nf90_put_att(ncid_out,phis_id,'long_name','surface geopotential height')171 out_dim(1) = out_lonvdim 172 out_dim(2) = out_latudim 173 status = nf90_def_var(ncid_out, 'phis', nf90_float, out_dim, phis_id) 174 CALL handle_err(status) 175 status = nf90_put_att(ncid_out, phis_id, 'units', 'm') 176 status = nf90_put_att(ncid_out, phis_id, 'long_name', 'surface geopotential height') 178 177 ! gridcell area 179 status = nf90_def_var(ncid_out, 'aire',nf90_float,out_dim,area_id)180 CALL handle_err(status) 181 status =nf90_put_att(ncid_out,area_id,'units','m2')182 status =nf90_put_att(ncid_out,area_id,'long_name','gridcell area')178 status = nf90_def_var(ncid_out, 'aire', nf90_float, out_dim, area_id) 179 CALL handle_err(status) 180 status = nf90_put_att(ncid_out, area_id, 'units', 'm2') 181 status = nf90_put_att(ncid_out, area_id, 'long_name', 'gridcell area') 183 182 ! land-sea mask (nearest integer approx) 184 status = nf90_def_var(ncid_out, 'mask',nf90_int,out_dim,mask_id)185 CALL handle_err(status) 186 status =nf90_put_att(ncid_out,mask_id,'long_name','land-sea mask (nINT approx)')187 183 status = nf90_def_var(ncid_out, 'mask', nf90_int, out_dim, mask_id) 184 CALL handle_err(status) 185 status = nf90_put_att(ncid_out, mask_id, 'long_name', 'land-sea mask (nINT approx)') 186 188 187 ! END the 'define' mode in netCDF file 189 status =nf90_enddef(ncid_out)190 CALL handle_err(status) 191 188 status = nf90_enddef(ncid_out) 189 CALL handle_err(status) 190 192 191 ! WRITE the variables 193 192 !------------------------- 194 193 ! 1D : lonu, lonv,latu,latv ; INCA : presnivs 195 status =nf90_put_var(ncid_out,out_lonuid,rlonudeg,[1],[iip1])196 CALL handle_err(status) 197 status =nf90_put_var(ncid_out,out_lonvid,rlonvdeg,[1],[iip1])198 CALL handle_err(status) 199 status =nf90_put_var(ncid_out,out_latuid,rlatudeg,[1],[jjp1])200 CALL handle_err(status) 201 status =nf90_put_var(ncid_out,out_latvid,rlatvdeg,[1],[jjm])202 CALL handle_err(status) 203 status =nf90_put_var(ncid_out,presnivs_id,rlev,[1],[llm])194 status = nf90_put_var(ncid_out, out_lonuid, rlonudeg, [1], [iip1]) 195 CALL handle_err(status) 196 status = nf90_put_var(ncid_out, out_lonvid, rlonvdeg, [1], [iip1]) 197 CALL handle_err(status) 198 status = nf90_put_var(ncid_out, out_latuid, rlatudeg, [1], [jjp1]) 199 CALL handle_err(status) 200 status = nf90_put_var(ncid_out, out_latvid, rlatvdeg, [1], [jjm]) 201 CALL handle_err(status) 202 status = nf90_put_var(ncid_out, presnivs_id, rlev, [1], [llm]) 204 203 CALL handle_err(status) 205 204 206 205 ! 2D : grille_u,grille_v,grille_s ; INCA: phis,aire,mask 207 start(:) =1208 COUNT(1) =iip1209 210 COUNT(2) =jjp1 ! for "u" and "s" grids211 status =nf90_put_var(ncid_out,out_uid,uwnd,start, count)212 CALL handle_err(status) 213 COUNT(2) =jjm ! for "v" grid214 status =nf90_put_var(ncid_out,out_vid,vwnd,start, count)215 CALL handle_err(status) 216 COUNT(2) =jjp1 ! as "s" grid, for all the following vars217 status =nf90_put_var(ncid_out,out_tempid,temp,start, count)218 CALL handle_err(status) 219 status = nf90_put_var(ncid_out, phis_id, phis_loc, start,count)220 CALL handle_err(status) 221 status = nf90_put_var(ncid_out, area_id, aire, start,count)222 CALL handle_err(status) 223 status = nf90_put_var(ncid_out, mask_id, masque_int,start,count)224 CALL handle_err(status) 225 206 start(:) = 1 207 COUNT(1) = iip1 208 209 COUNT(2) = jjp1 ! for "u" and "s" grids 210 status = nf90_put_var(ncid_out, out_uid, uwnd, start, count) 211 CALL handle_err(status) 212 COUNT(2) = jjm ! for "v" grid 213 status = nf90_put_var(ncid_out, out_vid, vwnd, start, count) 214 CALL handle_err(status) 215 COUNT(2) = jjp1 ! as "s" grid, for all the following vars 216 status = nf90_put_var(ncid_out, out_tempid, temp, start, count) 217 CALL handle_err(status) 218 status = nf90_put_var(ncid_out, phis_id, phis_loc, start, count) 219 CALL handle_err(status) 220 status = nf90_put_var(ncid_out, area_id, aire, start, count) 221 CALL handle_err(status) 222 status = nf90_put_var(ncid_out, mask_id, masque_int, start, count) 223 CALL handle_err(status) 224 226 225 ! CLOSE netcdf file 227 CALL ncclos(ncid_out, rcode_out)228 WRITE(*, *) "END grilles_gcm_netcdf_sub OK"226 CALL ncclos(ncid_out, rcode_out) 227 WRITE(*, *) "END grilles_gcm_netcdf_sub OK" 229 228 230 229 END SUBROUTINE grilles_gcm_netcdf_sub … … 232 231 233 232 SUBROUTINE handle_err(status) 234 USE netcdf, ONLY: nf90_strerror 235 233 USE netcdf, ONLY: nf90_strerror, nf90_noerr 236 234 237 235 INTEGER status 238 236 IF (status/=nf90_noerr) THEN 239 PRINT *,nf90_strerror(status)240 CALL abort_gcm('grilles_gcm_netcdf','netcdf error',1)237 PRINT *, nf90_strerror(status) 238 CALL abort_gcm('grilles_gcm_netcdf', 'netcdf error', 1) 241 239 ENDIF 242 240 END SUBROUTINE handle_err -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inidissip.F90
r5134 r5158 173 173 174 174 IF (vert_prof_dissip == 1) THEN 175 dol = 1, llm175 DO l = 1, llm 176 176 pseudoz = 8. * log(preff / presnivs(l)) 177 177 zvert(l) = 1 + & -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigrads.f90
r5137 r5158 46 46 ifd(if) = im 47 47 imd(if) = im 48 doi = 1, im48 DO i = 1, im 49 49 xd(i, if) = x(i) * fx 50 50 IF(xd(i, if)<xmin) iid(if) = i + 1 … … 56 56 jfd(if) = jm 57 57 jmd(if) = jm 58 doj = 1, jm58 DO j = 1, jm 59 59 yd(j, if) = y(j) * fy 60 60 IF(yd(j, if)>ymax) jid(if) = j + 1 … … 78 78 79 79 lmd(if) = lm 80 dol = 1, lm80 DO l = 1, lm 81 81 zd(l, if) = z(l) * fz 82 82 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90
r5136 r5158 69 69 tau0 = itau_dyn 70 70 71 dojj = 1, jjp172 doii = 1, iip171 DO jj = 1, jjp1 72 DO ii = 1, iip1 73 73 rlong(ii, jj) = rlonv(ii) * 180. / pi 74 74 rlat(ii, jj) = rlatu(jj) * 180. / pi … … 87 87 ! de point differents dans un meme fichier) 88 88 ! Grille V 89 dojj = 1, jjm90 doii = 1, iip189 DO jj = 1, jjm 90 DO ii = 1, iip1 91 91 rlong(ii, jj) = rlonv(ii) * 180. / pi 92 92 rlat(ii, jj) = rlatv(jj) * 180. / pi … … 98 98 tau0, zjulian, tstep, vhoriid, histvaveid) 99 99 ! Grille U 100 dojj = 1, jjp1101 doii = 1, iip1100 DO jj = 1, jjp1 101 DO ii = 1, iip1 102 102 rlong(ii, jj) = rlonu(ii) * 180. / pi 103 103 rlat(ii, jj) = rlatu(jj) * 180. / pi -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.f90
r5136 r5158 81 81 tau0 = itau_dyn 82 82 83 dojj = 1, jjp184 doii = 1, iip183 DO jj = 1, jjp1 84 DO ii = 1, iip1 85 85 rlong(ii, jj) = rlonu(ii) * 180. / pi 86 86 rlat(ii, jj) = rlatu(jj) * 180. / pi … … 96 96 ! un meme fichier) 97 97 98 dojj = 1, jjm99 doii = 1, iip198 DO jj = 1, jjm 99 DO ii = 1, iip1 100 100 rlong(ii, jj) = rlonv(ii) * 180. / pi 101 101 rlat(ii, jj) = rlatv(jj) * 180. / pi … … 115 115 ! Appel a histhori pour rajouter les autres grilles horizontales 116 116 ! 117 dojj = 1, jjp1118 doii = 1, iip1117 DO jj = 1, jjp1 118 DO ii = 1, iip1 119 119 rlong(ii, jj) = rlonv(ii) * 180. / pi 120 120 rlat(ii, jj) = rlatu(jj) * 180. / pi -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90
r5136 r5158 76 76 ! ------------------------------------------------------------- 77 77 !Grille U 78 dojj = 1, jjp179 doii = 1, iip178 DO jj = 1, jjp1 79 DO ii = 1, iip1 80 80 rlong(ii, jj) = rlonu(ii) * 180. / pi 81 81 rlat(ii, jj) = rlatu(jj) * 180. / pi … … 88 88 89 89 ! Grille V 90 dojj = 1, jjm91 doii = 1, iip190 DO jj = 1, jjm 91 DO ii = 1, iip1 92 92 rlong(ii, jj) = rlonv(ii) * 180. / pi 93 93 rlat(ii, jj) = rlatv(jj) * 180. / pi … … 100 100 101 101 !Grille Scalaire 102 dojj = 1, jjp1103 doii = 1, iip1102 DO jj = 1, jjp1 103 DO ii = 1, iip1 104 104 rlong(ii, jj) = rlonv(ii) * 180. / pi 105 105 rlat(ii, jj) = rlatu(jj) * 180. / pi -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inter_barxy_m.F90
r5136 r5158 261 261 idat = 1 262 262 263 dowhile (imod <= imodmax)264 dowhile (xxim(imod)>xxid(idat))263 DO while (imod <= imodmax) 264 DO while (xxim(imod)>xxid(idat)) 265 265 dx = xxid(idat) - x0 266 266 dxm = dxm + dx … … 330 330 jdat = 1 331 331 332 dowhile (jmod <= size(yjmod))333 dowhile (yjmod(jmod) > yjdat(jdat))332 DO while (jmod <= size(yjmod)) 333 DO while (yjmod(jmod) > yjdat(jdat)) 334 334 dy = yjdat(jdat) - y0 335 335 dym = dym + dy -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpost.f90
r5136 r5158 20 20 ! On passe donc des niveaux de Lin à ceux du LMDZ 21 21 22 dol = 1, llm23 doj = 1, jjp124 doi = 1, iim22 DO l = 1, llm 23 DO j = 1, jjp1 24 DO i = 1, iim 25 25 q(i, j, l) = qppm(i, j, llm - l + 1) 26 26 enddo … … 30 30 ! BOUCLAGE EN LONGITUDE PAS EFFECTUE DANS PPM3D 31 31 32 dol = 1, llm33 doj = 1, jjp132 DO l = 1, llm 33 DO j = 1, jjp1 34 34 q(iip1, j, l) = q(1, j, l) 35 35 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpre.f90
r5140 r5158 43 43 ! la vectorialisation 44 44 45 doj = 1, jjp146 doi = 1, iip145 DO j = 1, jjp1 46 DO i = 1, iip1 47 47 smass(i, j) = 0. 48 48 enddo 49 49 enddo 50 50 51 dol = 1, llm52 doj = 1, jjp153 doi = 1, iip151 DO l = 1, llm 52 DO j = 1, jjp1 53 DO i = 1, iip1 54 54 smass(i, j) = smass(i, j) + masse(i, j, l) 55 55 enddo … … 57 57 enddo 58 58 59 doj = 1, jjp160 doi = 1, iim59 DO j = 1, jjp1 60 DO i = 1, iim 61 61 psppm(i, j) = smass(i, j) / aire(i, j) * g * 0.01 62 62 END DO … … 67 67 ! de vitesse et pas les flux, on doit donc passer de l'un à l'autre 68 68 ! Dans le même temps, on fait le changement d'orientation du vent en v 69 dol = 1, llm70 doj = 1, jjm71 doi = 1, iip169 DO l = 1, llm 70 DO j = 1, jjm 71 DO i = 1, iip1 72 72 vnat(i, j, l) = -pbarv(i, j, l) / masseby(i, j, l) * cv(i, j) 73 73 enddo 74 74 enddo 75 doi = 1, iim75 DO i = 1, iim 76 76 vnat(i, jjp1, l) = 0. 77 77 enddo 78 doj = 1, jjp179 doi = 1, iip178 DO j = 1, jjp1 79 DO i = 1, iip1 80 80 unat(i, j, l) = pbaru(i, j, l) / massebx(i, j, l) * cu(i, j) 81 81 enddo … … 86 86 ! Flux en l=1 (sol) nul 87 87 fluxw = 0. 88 dol = 1, llm89 doj = 1, jjp190 doi = 1, iip188 DO l = 1, llm 89 DO j = 1, jjp1 90 DO i = 1, iip1 91 91 fluxw(i, j, l) = w(i, j, l) * g * 0.01 / aire(i, j) 92 92 ! PRINT*,i,j,l,'fluxw(i,j,l)=',fluxw(i,j,l), … … 101 101 ! On passe donc des niveaux du LMDZ à ceux de Lin 102 102 103 dol = 1, llm + 1103 DO l = 1, llm + 1 104 104 apppm(l) = ap(llm + 2 - l) 105 105 bpppm(l) = bp(llm + 2 - l) 106 106 enddo 107 107 108 dol = 1, llm109 doj = 1, jjp1110 doi = 1, iim108 DO l = 1, llm 109 DO j = 1, jjp1 110 DO i = 1, iim 111 111 unatppm(i, j, l) = unat(i, j, llm - l + 1) 112 112 vnatppm(i, j, l) = vnat(i, j, llm - l + 1) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/invert_lat.F90
r3104 r5158 14 14 DO j=1,ysize 15 15 f_aux(:,j,l)=field(:,ysize+1-j,l) 16 16 END DO 17 17 END DO 18 18 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/invert_zoom_x_m.F90
r5134 r5158 37 37 38 38 it = 2 * nmax 39 dowhile (xfi < xf(it) .AND. it >= 1)39 DO while (xfi < xf(it) .AND. it >= 1) 40 40 it = it - 1 41 41 END DO -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limx.f90
r5136 r5158 55 55 ! calcul de la pente a droite et a gauche de la maille 56 56 57 dol = 1, llm58 doij=iip2,ip1jm-157 DO l = 1, llm 58 DO ij=iip2,ip1jm-1 59 59 dxqu(ij)=q(ij+1,l)-q(ij,l) 60 60 enddo 61 doij=iip1+iip1,ip1jm,iip161 DO ij=iip1+iip1,ip1jm,iip1 62 62 dxqu(ij)=dxqu(ij-iim) 63 63 enddo 64 64 65 doij=iip2,ip1jm65 DO ij=iip2,ip1jm 66 66 adxqu(ij)=abs(dxqu(ij)) 67 67 enddo … … 69 69 ! calcul de la pente maximum dans la maille en valeur absolue 70 70 71 doij=iip2+1,ip1jm71 DO ij=iip2+1,ip1jm 72 72 dxqmax(ij)=pente_max*min(adxqu(ij-1),adxqu(ij)) 73 73 enddo 74 74 75 doij=iip1+iip1,ip1jm,iip175 DO ij=iip1+iip1,ip1jm,iip1 76 76 dxqmax(ij-iim)=dxqmax(ij) 77 77 enddo … … 79 79 ! calcul de la pente avec limitation 80 80 81 doij=iip2+1,ip1jm81 DO ij=iip2+1,ip1jm 82 82 IF( dxqu(ij-1)*dxqu(ij)>0. & 83 83 .AND. dxq(ij,l)*dxqu(ij)>0.) THEN … … 89 89 endif 90 90 enddo 91 doij=iip1+iip1,ip1jm,iip191 DO ij=iip1+iip1,ip1jm,iip1 92 92 dxq(ij-iim,l)=dxq(ij,l) 93 93 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limy.f90
r5136 r5158 10 10 ! ******************************************************************** 11 11 ! q,w sont des arguments d'entree pour le s-pg .... 12 ! dq 12 ! dq sont des arguments de sortie pour le s-pg .... 13 13 ! 14 14 ! … … 55 55 PRINT*,'SCHEMA AMONT NOUVEAU' 56 56 first=.FALSE. 57 doi=2,iip157 DO i=2,iip1 58 58 coslon(i)=cos(rlonv(i)) 59 59 sinlon(i)=sin(rlonv(i)) … … 69 69 ! 70 70 71 dol = 1, llm71 DO l = 1, llm 72 72 ! 73 73 DO ij=1,ip1jmp1 … … 95 95 ! calcul des pentes aux points v 96 96 97 doij=1,ip1jm97 DO ij=1,ip1jm 98 98 dyqv(ij)=q(ij,l)-q(ij+iip1,l) 99 99 adyqv(ij)=abs(dyqv(ij)) … … 102 102 ! calcul des pentes aux points scalaires 103 103 104 doij=iip2,ip1jm104 DO ij=iip2,ip1jm 105 105 dyqmax(ij)=min(adyqv(ij-iip1),adyqv(ij)) 106 106 dyqmax(ij)=pente_max*dyqmax(ij) … … 149 149 IF(dyqv(ismin(iim,dyqv,1))*dyqv(ismax(iim,dyqv,1))<=0.) & 150 150 THEN 151 doij=1,iip1151 DO ij=1,iip1 152 152 dyqmax(ij)=0. 153 153 enddo 154 154 else 155 doij=1,iip1155 DO ij=1,iip1 156 156 dyqmax(ij)=pente_max*abs(dyqv(ij)) 157 157 enddo … … 161 161 dyqv(ismin(iim,dyqv(ip1jm-iip1+1),1)+ip1jm-iip1+1)<=0.) & 162 162 THEN 163 doij=ip1jm+1,ip1jmp1163 DO ij=ip1jm+1,ip1jmp1 164 164 dyqmax(ij)=0. 165 165 enddo 166 166 else 167 doij=ip1jm+1,ip1jmp1167 DO ij=ip1jm+1,ip1jmp1 168 168 dyqmax(ij)=pente_max*abs(dyqv(ij-iip1)) 169 169 enddo … … 172 172 ! calcul des pentes limitees 173 173 174 doij=1,ip1jmp1 ! cf below: should it be ip1jm instead ?174 DO ij=1,ip1jmp1 ! cf below: should it be ip1jm instead ? 175 175 IF(dyqv(ij)*dyqv(ij-iip1)>0.) then ! /!\ causes Warning: iteration 1056 invokes undefined behavior [-Waggressive-loop-optimizations] in 32x32x39 176 176 dyq(ij)=sign(min(abs(dyq(ij)),dyqmax(ij)),dyq(ij)) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limz.f90
r5136 r5158 55 55 56 56 ! calcul de la pente en haut et en bas de la maille 57 doij=1,ip1jmp158 dol = 1, llm-157 DO ij=1,ip1jmp1 58 DO l = 1, llm-1 59 59 dzqw(l)=q(ij,l+1)-q(ij,l) 60 60 enddo 61 61 dzqw(llm)=0. 62 62 63 dol=1,llm63 DO l=1,llm 64 64 adzqw(l)=abs(dzqw(l)) 65 65 enddo … … 67 67 ! calcul de la pente maximum dans la maille en valeur absolue 68 68 69 dol=2,llm-169 DO l=2,llm-1 70 70 dzqmax(l)=pente_max*min(adzqw(l-1),adzqw(l)) 71 71 enddo … … 73 73 ! calcul de la pente avec limitation 74 74 75 dol=2,llm-175 DO l=2,llm-1 76 76 IF( dzqw(l-1)*dzqw(l)>0. & 77 77 .AND. dzq(ij,l)*dzqw(l)>0.) THEN -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.f90
r5136 r5158 86 86 PRINT*,'SCHEMA AMONT NOUVEAU' 87 87 first=.FALSE. 88 doi=2,iip188 DO i=2,iip1 89 89 coslon(i)=cos(rlonv(i)) 90 90 sinlon(i)=sin(rlonv(i)) … … 187 187 !CC 188 188 IF(mode==2) THEN 189 dol=1,llm189 DO l=1,llm 190 190 s0s=0. 191 191 s0n=0. … … 196 196 smn=0. 197 197 sms=0. 198 doi=1,iim198 DO i=1,iim 199 199 smn=smn+sm(i,1,l) 200 200 sms=sms+sm(i,jjp1,l) … … 208 208 dys2=dys2+coslondlon(i)*zz 209 209 enddo 210 doi=1,iim210 DO i=1,iim 211 211 sy(i,1,l)=dyn1*sinlon(i)+dyn2*coslon(i) 212 212 sy(i,jjp1,l)=dys1*sinlon(i)+dys2*coslon(i) 213 213 enddo 214 doi=1,iim214 DO i=1,iim 215 215 s0(i,1,l)=s0n/smn+sy(i,1,l) 216 216 s0(i,jjp1,l)=s0s/sms-sy(i,jjp1,l) … … 220 220 s0(iip1,jjp1,l)=s0(1,jjp1,l) 221 221 222 doi=1,iim222 DO i=1,iim 223 223 sxn(i)=s0(i+1,1,l)-s0(i,1,l) 224 224 sxs(i)=s0(i+1,jjp1,l)-s0(i,jjp1,l) 225 225 ! on rerentre les masses 226 226 enddo 227 doi=1,iim227 DO i=1,iim 228 228 sy(i,1,l)=sy(i,1,l)*sm(i,1,l) 229 229 sy(i,jjp1,l)=sy(i,jjp1,l)*sm(i,jjp1,l) … … 233 233 sxn(iip1)=sxn(1) 234 234 sxs(iip1)=sxs(1) 235 doi=1,iim235 DO i=1,iim 236 236 sx(i+1,1,l)=0.25*(sxn(i)+sxn(i+1))*sm(i+1,1,l) 237 237 sx(i+1,jjp1,l)=0.25*(sxs(i)+sxs(i+1))*sm(i+1,jjp1,l) … … 247 247 248 248 IF (mode==4) THEN 249 dol=1,llm250 doi=1,iip1249 DO l=1,llm 250 DO i=1,iip1 251 251 sx(i,1,l)=0. 252 252 sx(i,jjp1,l)=0. … … 261 261 ! CALL minmaxq(zq,1.e33,-1.e33,'avant advy ') 262 262 IF (mode==4) THEN 263 dol=1,llm264 doi=1,iip1263 DO l=1,llm 264 DO i=1,iip1 265 265 sx(i,1,l)=0. 266 266 sx(i,jjp1,l)=0. … … 273 273 CALL advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz ) 274 274 ! CALL minmaxq(zq,1.e33,-1.e33,'avant advz ') 275 doj=1,jjp1276 doi=1,iip1275 DO j=1,jjp1 276 DO i=1,iip1 277 277 sz(i,j,1)=0. 278 278 sz(i,j,llm)=0. … … 282 282 CALL advz( limit,dtvr,w,sm,s0,sx,sy,sz ) 283 283 IF (mode==4) THEN 284 dol=1,llm285 doi=1,iip1284 DO l=1,llm 285 DO i=1,iip1 286 286 sx(i,1,l)=0. 287 287 sx(i,jjp1,l)=0. … … 293 293 CALL limy(s0,sy,sm,pente_max) 294 294 CALL advy( limit,.5*dtvr,pbarv,sm,s0,sx,sy,sz ) 295 dol=1,llm296 doj=1,jjp1295 DO l=1,llm 296 DO j=1,jjp1 297 297 sm(iip1,j,l)=sm(1,j,l) 298 298 s0(iip1,j,l)=s0(1,j,l) … … 306 306 ! CALL minmaxq(zq,1.e33,-1.e33,'avant advx ') 307 307 IF (mode==4) THEN 308 dol=1,llm309 doi=1,iip1308 DO l=1,llm 309 DO i=1,iip1 310 310 sx(i,1,l)=0. 311 311 sx(i,jjp1,l)=0. … … 354 354 dqzpn=ssum(iim,sz(1,1,l),1)/masn 355 355 dqzps=ssum(iim,sz(1,jjp1,l),1)/mass 356 doi=1,iip1356 DO i=1,iip1 357 357 q( i,1,llm+1-l,3)=dqzpn 358 358 q( i,jjp1,llm+1-l,3)=dqzps … … 365 365 dyn2=0. 366 366 dys2=0. 367 doi=1,iim367 DO i=1,iim 368 368 dyn1=dyn1+sinlondlon(i)*sy(i,1,l)/sm(i,1,l) 369 369 dyn2=dyn2+coslondlon(i)*sy(i,1,l)/sm(i,1,l) … … 371 371 dys2=dys2+coslondlon(i)*sy(i,jjp1,l)/sm(i,jjp1,l) 372 372 enddo 373 doi=1,iim373 DO i=1,iim 374 374 q(i,1,llm+1-l,2)= & 375 375 (sinlon(i)*dyn1+coslon(i)*dyn2) … … 387 387 dyn2=0. 388 388 dys2=0. 389 doi=1,iim389 DO i=1,iim 390 390 zz=s0(i,2,l)/sm(i,2,l)-q(i,1,llm+1-l,0) 391 391 dyn1=dyn1+sinlondlon(i)*zz … … 395 395 dys2=dys2+coslondlon(i)*zz 396 396 enddo 397 doi=1,iim397 DO i=1,iim 398 398 q(i,1,llm+1-l,2)= & 399 399 (sinlon(i)*dyn1+coslon(i)*dyn2)/2. … … 407 407 q(iip1,jjp1,llm+1-l,0)=q(1,jjp1,llm+1-l,0) 408 408 409 doi=1,iim409 DO i=1,iim 410 410 sxn(i)=q(i+1,1,llm+1-l,0)-q(i,1,llm+1-l,0) 411 411 sxs(i)=q(i+1,jjp1,llm+1-l,0)-q(i,jjp1,llm+1-l,0) … … 413 413 sxn(iip1)=sxn(1) 414 414 sxs(iip1)=sxs(1) 415 doi=1,iim415 DO i=1,iim 416 416 q(i+1,1,llm+1-l,1)=0.25*(sxn(i)+sxn(i+1)) 417 417 q(i+1,jjp1,llm+1-l,1)=0.25*(sxs(i)+sxs(i+1)) … … 426 426 427 427 ! bouclage en longitude 428 doiq=0,3429 dol=1,llm430 doj=1,jjp1428 DO iq=0,3 429 DO l=1,llm 430 DO j=1,jjp1 431 431 q(iip1,j,l,iq)=q(1,j,l,iq) 432 432 enddo … … 455 455 ! PRINT*, '-------------------------------------------' 456 456 457 dol=1,llm458 doj=1,jjp1459 doi=1,iip1457 DO l=1,llm 458 DO j=1,jjp1 459 DO i=1,iip1 460 460 IF(q(i,j,l,0)<qmin) & 461 461 PRINT*,'apres pentes, s0(',i,',',j,',',l,')=',q(i,j,l,0) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ppm3d.f90
r5117 r5158 361 361 ENDIF 362 362 ! 363 doJ=2,JMR363 DO J=2,JMR 364 364 acosp(j) = 1. / cosp(j) 365 365 END DO … … 401 401 ! 402 402 ! 403 doJ=2,JMR403 DO J=2,JMR 404 404 DTDX(j) = DT / ( DL*AE*COSP(J) ) 405 405 … … 419 419 ! 420 420 ! delp = pressure thickness: the psudo-density in a hydrostatic system. 421 dok=1,NLAY422 doj=1,JNP423 doi=1,IMR421 DO k=1,NLAY 422 DO j=1,JNP 423 DO i=1,IMR 424 424 delp1(i,j,k)=DAP(k)+DBK(k)*PS1(i,j) 425 425 delp2(i,j,k)=DAP(k)+DBK(k)*PS2(i,j) … … 451 451 END DO 452 452 ! 453 dok=1,NLAY453 DO k=1,NLAY 454 454 ! 455 455 IF(IGD==0) THEN … … 458 458 else 459 459 ! Convert winds on C-grid to Courant # 460 doj=j1,j2461 doi=2,IMR460 DO j=j1,j2 461 DO i=2,IMR 462 462 CRX(i,J) = dtdx(j)*U(i-1,j,k) 463 463 END DO … … 465 465 466 466 ! 467 doj=j1,j2467 DO j=j1,j2 468 468 CRX(1,J) = dtdx(j)*U(IMR,j,k) 469 469 END DO 470 470 ! 471 doi=1,IMR*JMR471 DO i=1,IMR*JMR 472 472 CRY(i,2) = DTDY*V(i,1,k) 473 473 END DO … … 478 478 JN = j2 479 479 ! 480 doj=JS0,j1+1,-1481 doi=1,IMR480 DO j=JS0,j1+1,-1 481 DO i=1,IMR 482 482 IF(abs(CRX(i,j))>1.) THEN 483 483 JS = j … … 488 488 ! 489 489 2222 continue 490 doj=JN0,j2-1491 doi=1,IMR490 DO j=JN0,j2-1 491 DO i=1,IMR 492 492 IF(abs(CRX(i,j))>1.) THEN 493 493 JN = j … … 499 499 ! 500 500 IF(j1/=2) then ! Enlarged polar cap. 501 doi=1,IMR501 DO i=1,IMR 502 502 DPI(i, 2,k) = 0. 503 503 DPI(i,JMR,k) = 0. … … 508 508 ! 509 509 ! N-S component 510 doj=j1,j2+1510 DO j=j1,j2+1 511 511 D5 = 0.5 * COSE(j) 512 doi=1,IMR512 DO i=1,IMR 513 513 ymass(i,j) = CRY(i,j)*D5*(delp2(i,j,k) + delp2(i,j-1,k)) 514 514 enddo 515 515 enddo 516 516 ! 517 doj=j1,j2517 DO j=j1,j2 518 518 DO i=1,IMR 519 519 DPI(i,j,k) = (ymass(i,j) - ymass(i,j+1)) * acosp(j) … … 524 524 sum1 = ymass(IMR,j1 ) 525 525 sum2 = ymass(IMR,J2+1) 526 doi=1,IMR-1526 DO i=1,IMR-1 527 527 sum1 = sum1 + ymass(i,j1 ) 528 528 sum2 = sum2 + ymass(i,J2+1) … … 531 531 sum1 = - sum1 * RCAP 532 532 sum2 = sum2 * RCAP 533 doi=1,IMR533 DO i=1,IMR 534 534 DPI(i, 1,k) = sum1 535 535 DPI(i,JNP,k) = sum2 … … 538 538 ! E-W component 539 539 ! 540 doj=j1,j2541 doi=2,IMR540 DO j=j1,j2 541 DO i=2,IMR 542 542 PU(i,j) = 0.5 * (delp2(i,j,k) + delp2(i-1,j,k)) 543 543 enddo 544 544 enddo 545 545 ! 546 doj=j1,j2546 DO j=j1,j2 547 547 PU(1,j) = 0.5 * (delp2(1,j,k) + delp2(IMR,j,k)) 548 548 enddo 549 549 ! 550 doj=j1,j2550 DO j=j1,j2 551 551 DO i=1,IMR 552 552 xmass(i,j) = PU(i,j)*CRX(i,j) … … 565 565 ! 566 566 DO j=j1,j2 567 doi=1,IMR-1567 DO i=1,IMR-1 568 568 UA(i,j) = 0.5 * (CRX(i,j)+CRX(i+1,j)) 569 569 enddo … … 576 576 ! Rajouts pour LMDZ.3.3 577 577 !cccccccccccccccccccccccccccccccccccccccccccccccccccccc 578 doi=1,IMR579 doj=1,JNP578 DO i=1,IMR 579 DO j=1,JNP 580 580 VA(i,j)=0. 581 581 enddo 582 582 enddo 583 583 584 doi=1,imr*(JMR-1)584 DO i=1,imr*(JMR-1) 585 585 VA(i,2) = 0.5*(CRY(i,2)+CRY(i,3)) 586 586 enddo … … 588 588 IF(j1==2) THEN 589 589 IMH = IMR/2 590 doi=1,IMH590 DO i=1,IMH 591 591 VA(i, 1) = 0.5*(CRY(i,2)-CRY(i+IMH,2)) 592 592 VA(i+IMH, 1) = -VA(i,1) … … 599 599 ! 600 600 ! ****6***0*********0*********0*********0*********0*********0**********72 601 doIC=1,NC602 ! 603 doi=1,IMJM601 DO IC=1,NC 602 ! 603 DO i=1,IMJM 604 604 wk1(i,1,1) = 0. 605 605 wk1(i,1,2) = 0. … … 607 607 ! 608 608 ! E-W advective cross term 609 doj=J1,J2609 DO j=J1,J2 610 610 IF(J>JS .AND. J<JN) GO TO 250 611 611 ! 612 doi=1,IMR612 DO i=1,IMR 613 613 qtmp(i) = q(i,j,k,IC) 614 614 enddo 615 615 ! 616 doi=-IML,0616 DO i=-IML,0 617 617 qtmp(i) = q(IMR+i,j,k,IC) 618 618 qtmp(IMR+1-i) = q(1-i,j,k,IC) … … 634 634 ! 635 635 IF(JN/=0) THEN 636 doj=JS+1,JN-1637 ! 638 doi=1,IMR636 DO j=JS+1,JN-1 637 ! 638 DO i=1,IMR 639 639 qtmp(i) = q(i,j,k,IC) 640 640 enddo … … 643 643 qtmp(IMR+1) = q( 1,J,k,IC) 644 644 ! 645 doi=1,imr645 DO i=1,imr 646 646 iu = i - UA(i,j) 647 647 wk1(i,j,1) = UA(i,j)*(qtmp(iu) - qtmp(iu+1)) … … 651 651 ! ****6***0*********0*********0*********0*********0*********0**********72 652 652 ! Contribution from the N-S advection 653 doi=1,imr*(j2-j1+1)653 DO i=1,imr*(j2-j1+1) 654 654 JT = REAL(J1) - VA(i,j1) 655 655 wk1(i,j1,2) = VA(i,j1) * (q(i,jt,k,IC) - q(i,jt+1,k,IC)) 656 656 enddo 657 657 ! 658 doi=1,IMJM658 DO i=1,IMJM 659 659 wk1(i,1,1) = q(i,1,k,IC) + 0.5*wk1(i,1,1) 660 660 wk1(i,1,2) = q(i,1,k,IC) + 0.5*wk1(i,1,2) … … 676 676 CALL xadv(IMR,JNP,j1,j2,wk1(1,1,2),UA,JS,JN,IML,DC2,iad) 677 677 CALL yadv(IMR,JNP,j1,j2,wk1(1,1,1),VA,PV,W,jad) 678 doj=1,JNP679 doi=1,IMR678 DO j=1,JNP 679 DO i=1,IMR 680 680 q(i,j,k,IC) = q(i,j,k,IC) + DC2(i,j) + PV(i,j) 681 681 enddo … … 696 696 ! 1st step: compute total column mass CONVERGENCE. 697 697 ! 698 doj=1,JNP699 doi=1,IMR698 DO j=1,JNP 699 DO i=1,IMR 700 700 CRY(i,j) = DPI(i,j,1) 701 701 END DO 702 702 END DO 703 703 ! 704 dok=2,NLAY705 doj=1,JNP706 doi=1,IMR704 DO k=2,NLAY 705 DO j=1,JNP 706 DO i=1,IMR 707 707 CRY(i,j) = CRY(i,j) + DPI(i,j,k) 708 708 END DO … … 710 710 END DO 711 711 ! 712 doj=1,JNP713 doi=1,IMR712 DO j=1,JNP 713 DO i=1,IMR 714 714 ! 715 715 ! 2nd step: compute PS2 (PS at n+1) using the hydrostatic assumption. … … 725 725 END DO 726 726 ! 727 dok=2,NLAY-1728 doj=1,JNP729 doi=1,IMR727 DO k=2,NLAY-1 728 DO j=1,JNP 729 DO i=1,IMR 730 730 W(i,j,k) = W(i,j,k-1) + DPI(i,j,k) - DBK(k)*CRY(i,j) 731 731 END DO … … 742 742 ! 743 743 KRD = max(3, KORD) 744 doIC=1,NC744 DO IC=1,NC 745 745 ! 746 746 !****6***0*********0*********0*********0*********0*********0**********72 … … 814 814 ! ****6***0*********0*********0*********0*********0*********0**********72 815 815 ! 816 dok=1,NLAYM1817 doi=1,IMJM816 DO k=1,NLAYM1 817 DO i=1,IMJM 818 818 DQDT(i,1,k) = P(i,1,k+1) - P(i,1,k) 819 819 END DO … … 909 909 END DO 910 910 ! 911 doi=1,IMR*NLAYM1911 DO i=1,IMR*NLAYM1 912 912 AR(i,1) = AL(i,2) 913 913 ! print *,'AR1',i,AR(i,1) 914 914 END DO 915 915 ! 916 doi=1,IMR*NLAY916 DO i=1,IMR*NLAY 917 917 A6(i,1) = 3.*(wk1(i,1)+wk1(i,1) - (AL(i,1)+AR(i,1))) 918 918 ! print *,'A61',i,A6(i,1) … … 949 949 END DO 950 950 ! 951 doi=1,IMR951 DO i=1,IMR 952 952 DQ(i,j, 1) = DQ(i,j, 1) - flux(i, 2) 953 953 DQ(i,j,NLAY) = DQ(i,j,NLAY) + flux(i,NLAY) 954 954 END DO 955 955 ! 956 dok=2,NLAYM1957 doi=1,IMR956 DO k=2,NLAYM1 957 DO i=1,IMR 958 958 DQ(i,j,k) = DQ(i,j,k) + flux(i,k) - flux(i,k+1) 959 959 END DO … … 984 984 j2vl = j2-jvan 985 985 ! 986 doj=j1,j2987 ! 988 doi=1,IMR986 DO j=j1,j2 987 ! 988 DO i=1,IMR 989 989 qtmp(i) = q(i,j) 990 990 enddo … … 1028 1028 2222 continue 1029 1029 ! 1030 doi=-IML,01030 DO i=-IML,0 1031 1031 qtmp(i) = q(IMR+i,j) 1032 1032 qtmp(IMP-i) = q(1-i,j) … … 1043 1043 CALL xmist(IMR,IML,Qtmp,DC) 1044 1044 ! 1045 doi=-IML,01045 DO i=-IML,0 1046 1046 DC(i) = DC(IMR+i) 1047 1047 DC(IMP-i) = DC(1-i) … … 1057 1057 ENDIF 1058 1058 ! 1059 doi=1,IMR1059 DO i=1,IMR 1060 1060 IF(uc(i,j)>1.) THEN 1061 1061 !DIR$ NOVECTOR 1062 doist = ISAVE(i),i-11062 DO ist = ISAVE(i),i-1 1063 1063 fx1(i) = fx1(i) + qtmp(ist) 1064 1064 enddo 1065 1065 elseIF(uc(i,j)<-1.) THEN 1066 doist = i,ISAVE(i)-11066 DO ist = i,ISAVE(i)-1 1067 1067 fx1(i) = fx1(i) - qtmp(ist) 1068 1068 enddo … … 1070 1070 ENDIF 1071 1071 END DO 1072 doi=1,IMR1072 DO i=1,IMR 1073 1073 fx1(i) = PU(i,j)*fx1(i) 1074 1074 enddo … … 1123 1123 END DO 1124 1124 ! 1125 doi=1,IMR-11125 DO i=1,IMR-1 1126 1126 AR(i) = AL(i+1) 1127 1127 END DO 1128 1128 AR(IMR) = AL(1) 1129 1129 ! 1130 doi=1,IMR1130 DO i=1,IMR 1131 1131 A6(i) = 3.*(p(i)+p(i) - (AL(i)+AR(i))) 1132 1132 END DO … … 1158 1158 REAL :: tmp,pmax,pmin 1159 1159 ! 1160 doi=1,IMR1160 DO i=1,IMR 1161 1161 tmp = R24*(8.*(p(i+1) - p(i-1)) + p(i-2) - p(i+2)) 1162 1162 Pmax = max(P(i-1), p(i), p(i+1)) - p(i) … … 1215 1215 sum1 = fx(IMR,j1 ) 1216 1216 sum2 = fx(IMR,J2+1) 1217 doi=1,IMR-11217 DO i=1,IMR-1 1218 1218 sum1 = sum1 + fx(i,j1 ) 1219 1219 sum2 = sum2 + fx(i,J2+1) … … 1222 1222 sum1 = DQ(1, 1) - sum1 * RCAP 1223 1223 sum2 = DQ(1,JNP) + sum2 * RCAP 1224 doi=1,IMR1224 DO i=1,IMR 1225 1225 DQ(i, 1) = sum1 1226 1226 DQ(i,JNP) = sum2 … … 1228 1228 ! 1229 1229 IF(j1/=2) THEN 1230 doi=1,IMR1230 DO i=1,IMR 1231 1231 DQ(i, 2) = sum1 1232 1232 DQ(i,JMR) = sum2 … … 1250 1250 ! 1251 1251 IF(ID==2) THEN 1252 doi=1,IMR*(JMR-1)1252 DO i=1,IMR*(JMR-1) 1253 1253 tmp = 0.25*(p(i,3) - p(i,1)) 1254 1254 Pmax = max(p(i,1),p(i,2),p(i,3)) - p(i,2) … … 1257 1257 END DO 1258 1258 ELSE 1259 doi=1,IMH1259 DO i=1,IMH 1260 1260 ! J=2 1261 1261 tmp = (8.*(p(i,3) - p(i,1)) + p(i+IMH,2) - p(i,4))*R24 … … 1269 1269 DC(i,JMR) = sign(min(abs(tmp),Pmin,Pmax),tmp) 1270 1270 END DO 1271 doi=IMH+1,IMR1271 DO i=IMH+1,IMR 1272 1272 ! J=2 1273 1273 tmp = (8.*(p(i,3) - p(i,1)) + p(i-IMH,2) - p(i,4))*R24 … … 1282 1282 END DO 1283 1283 ! 1284 doi=1,IJM31284 DO i=1,IJM3 1285 1285 tmp = (8.*(p(i,4) - p(i,2)) + p(i,1) - p(i,5))*R24 1286 1286 Pmax = max(p(i,2),p(i,3),p(i,4)) - p(i,3) … … 1291 1291 ! 1292 1292 IF(j1/=2) THEN 1293 doi=1,IMR1293 DO i=1,IMR 1294 1294 DC(i,1) = 0. 1295 1295 DC(i,JNP) = 0. … … 1298 1298 ! Determine slopes in polar caps for scalars! 1299 1299 ! 1300 doi=1,IMH1300 DO i=1,IMH 1301 1301 ! South 1302 1302 tmp = 0.25*(p(i,2) - p(i+imh,2)) … … 1311 1311 END DO 1312 1312 ! 1313 doi=imh+1,IMR1313 DO i=imh+1,IMR 1314 1314 DC(i, 1) = - DC(i-imh, 1) 1315 1315 DC(i,JNP) = - DC(i-imh,JNP) … … 1379 1379 1380 1380 1381 doi=1,len1381 DO i=1,len 1382 1382 A6(i,j11) = 3.*(p(i,j11)+p(i,j11) - (AL(i,j11)+AR(i,j11))) 1383 1383 END DO … … 1409 1409 JMR = JNP-1 1410 1410 IMH = IMR/2 1411 doj=1,JNP1412 doi=1,IMR1411 DO j=1,JNP 1412 DO i=1,IMR 1413 1413 wk(i,j) = p(i,j) 1414 1414 enddo 1415 1415 enddo 1416 1416 ! Poles: 1417 doi=1,IMH1417 DO i=1,IMH 1418 1418 wk(i, -1) = p(i+IMH,3) 1419 1419 wk(i+IMH,-1) = p(i,3) … … 1428 1428 ! -------------------------------- 1429 1429 IF(IAD==2) THEN 1430 doj=j1-1,j2+11431 doi=1,IMR1430 DO j=j1-1,j2+1 1431 DO i=1,IMR 1432 1432 ! WRITE(*,*) 'avt NINT','i=',i,'j=',j 1433 1433 JP = NINT(VA(i,j)) … … 1445 1445 ! 1446 1446 ELSEIF(IAD==1) THEN 1447 doj=j1-1,j2+11448 doi=1,imr1447 DO j=j1-1,j2+1 1448 DO i=1,imr 1449 1449 JP = REAL(j)-VA(i,j) 1450 1450 ady(i,j) = VA(i,j)*(wk(i,jp)-wk(i,jp+1)) … … 1456 1456 sum1 = 0. 1457 1457 sum2 = 0. 1458 doi=1,imr1458 DO i=1,imr 1459 1459 sum1 = sum1 + ady(i,2) 1460 1460 sum2 = sum2 + ady(i,JMR) … … 1463 1463 sum2 = sum2 / IMR 1464 1464 ! 1465 doi=1,imr1465 DO i=1,imr 1466 1466 ady(i, 2) = sum1 1467 1467 ady(i,JMR) = sum2 … … 1473 1473 sum1 = 0. 1474 1474 sum2 = 0. 1475 doi=1,imr1475 DO i=1,imr 1476 1476 sum1 = sum1 + ady(i,1) 1477 1477 sum2 = sum2 + ady(i,JNP) … … 1480 1480 sum2 = sum2 / IMR 1481 1481 ! 1482 doi=1,imr1482 DO i=1,imr 1483 1483 ady(i, 1) = sum1 1484 1484 ady(i,JNP) = sum2 … … 1497 1497 ! 1498 1498 JMR = JNP-1 1499 doj=j1,j21499 DO j=j1,j2 1500 1500 IF(J>JS .AND. J<JN) GO TO 1309 1501 1501 ! 1502 doi=1,IMR1502 DO i=1,IMR 1503 1503 qtmp(i) = p(i,j) 1504 1504 enddo 1505 1505 ! 1506 doi=-IML,01506 DO i=-IML,0 1507 1507 qtmp(i) = p(IMR+i,j) 1508 1508 qtmp(IMR+1-i) = p(1-i,j) … … 1531 1531 ENDIF 1532 1532 ! 1533 doi=1,IMR1533 DO i=1,IMR 1534 1534 adx(i,j) = adx(i,j) - p(i,j) 1535 1535 enddo … … 1539 1539 ! Eulerian upwind 1540 1540 ! 1541 doj=JS+1,JN-11542 ! 1543 doi=1,IMR1541 DO j=JS+1,JN-1 1542 ! 1543 DO i=1,IMR 1544 1544 qtmp(i) = p(i,j) 1545 1545 enddo … … 1551 1551 qtmp(-1) = p(IMR-1,J) 1552 1552 qtmp(IMR+2) = p(2,J) 1553 doi=1,imr1553 DO i=1,imr 1554 1554 IP = NINT(UA(i,j)) 1555 1555 ru = IP - UA(i,j) … … 1569 1569 ! 1570 1570 IF(j1/=2) THEN 1571 doi=1,IMR1571 DO i=1,IMR 1572 1572 adx(i, 2) = 0. 1573 1573 adx(i,JMR) = 0. … … 1575 1575 endif 1576 1576 ! set cross term due to x-adv at the poles to zero. 1577 doi=1,IMR1577 DO i=1,IMR 1578 1578 adx(i, 1) = 0. 1579 1579 adx(i,JNP) = 0. … … 1606 1606 IF(LMT==0) THEN 1607 1607 ! Full constraint 1608 doi=1,IM1608 DO i=1,IM 1609 1609 IF(DC(i)==0.) THEN 1610 1610 AR(i) = p(i) … … 1626 1626 elseif(LMT==1) THEN 1627 1627 ! Semi-monotonic constraint 1628 doi=1,IM1628 DO i=1,IM 1629 1629 IF(abs(AR(i)-AL(i)) >= -A6(i)) go to 150 1630 1630 IF(p(i)<AR(i) .AND. p(i)<AL(i)) THEN … … 1642 1642 END DO 1643 1643 elseif(LMT==2) THEN 1644 doi=1,IM1644 DO i=1,IM 1645 1645 IF(abs(AR(i)-AL(i)) >= -A6(i)) go to 250 1646 1646 fmin = p(i) + 0.25*(AR(i)-AL(i))**2/A6(i) + A6(i)*R12 … … 1669 1669 INTEGER :: i,j 1670 1670 ! 1671 doj=j1,j21672 doi=2,IMR1671 DO j=j1,j2 1672 DO i=2,IMR 1673 1673 CRX(i,J) = dtdx5(j)*(U(i,j)+U(i-1,j)) 1674 1674 END DO 1675 1675 END DO 1676 1676 ! 1677 doj=j1,j21677 DO j=j1,j2 1678 1678 CRX(1,J) = dtdx5(j)*(U(1,j)+U(IMR,j)) 1679 1679 END DO 1680 1680 ! 1681 doi=1,IMR*JMR1681 DO i=1,IMR*JMR 1682 1682 CRY(i,2) = DTDY5*(V(i,2)+V(i,1)) 1683 1683 END DO … … 1692 1692 REAL :: ph5 1693 1693 JMR = JNP-1 1694 doj=2,JNP1694 DO j=2,JNP 1695 1695 ph5 = -0.5*PI + (REAL(J-1)-0.5)*DP 1696 1696 cose(j) = cos(ph5) … … 1699 1699 JEQ = (JNP+1) / 2 1700 1700 IF(JMR == 2*(JMR/2) ) THEN 1701 doj=JNP, JEQ+1, -11701 DO j=JNP, JEQ+1, -1 1702 1702 cose(j) = cose(JNP+2-j) 1703 1703 enddo … … 1705 1705 ! cell edge at equator. 1706 1706 cose(JEQ+1) = 1. 1707 doj=JNP, JEQ+2, -11707 DO j=JNP, JEQ+2, -1 1708 1708 cose(j) = cose(JNP+2-j) 1709 1709 enddo 1710 1710 ENDIF 1711 1711 ! 1712 doj=2,JMR1712 DO j=2,JMR 1713 1713 cosp(j) = 0.5*(cose(j)+cose(j+1)) 1714 1714 END DO … … 1726 1726 ! 1727 1727 phi = -0.5*PI 1728 doj=2,JNP-11728 DO j=2,JNP-1 1729 1729 phi = phi + DP 1730 1730 cosp(j) = cos(phi) … … 1733 1733 cosp(JNP) = 0. 1734 1734 ! 1735 doj=2,JNP1735 DO j=2,JNP 1736 1736 cose(j) = 0.5*(cosp(j)+cosp(j-1)) 1737 1737 END DO 1738 1738 ! 1739 doj=2,JNP-11739 DO j=2,JNP-1 1740 1740 cosp(j) = 0.5*(cose(j)+cose(j+1)) 1741 1741 END DO … … 1771 1771 ! 1772 1772 ! Vertical filling... 1773 doi=1,len1773 DO i=1,len 1774 1774 IF( Q(i,j1,1)<0.) THEN 1775 1775 ip = ip + 1 … … 1792 1792 IF(icr==0) goto 225 1793 1793 ! 1794 doi=1,len1794 DO i=1,len 1795 1795 IF( Q(I,j1,L)<0.) THEN 1796 1796 ! … … 1858 1858 REAL :: dq,dn,d0,d1,ds,d2 1859 1859 icr = 0 1860 doj=j1+1,j2-11860 DO j=j1+1,j2-1 1861 1861 DO i=1,IMR-1 1862 1862 IF(q(i,j)<0.) THEN … … 1938 1938 END DO 1939 1939 ! 1940 doi=1,IMR1940 DO i=1,IMR 1941 1941 IF(q(i,j1)<0. .OR. q(i,j2)<0.) THEN 1942 1942 icr = 1 … … 1971 1971 ! 1972 1972 ipy = 0 1973 doj=j1+1,j2-11973 DO j=j1+1,j2-1 1974 1974 DO i=1,IMR 1975 1975 IF(q(i,j)<0.) THEN … … 1992 1992 END DO 1993 1993 ! 1994 doi=1,imr1994 DO i=1,imr 1995 1995 IF(q(i,j1)<0.) THEN 1996 1996 ipy = 1 … … 2006 2006 ! 2007 2007 j = j2 2008 doi=1,imr2008 DO i=1,imr 2009 2009 IF(q(i,j)<0.) THEN 2010 2010 ipy = 1 … … 2022 2022 IF(q(1,1)<0.) THEN 2023 2023 dq = q(1,1)*cap1/REAL(IMR)*acosp(j1) 2024 doi=1,imr2024 DO i=1,imr 2025 2025 q(i,1) = 0. 2026 2026 q(i,j1) = q(i,j1) + dq … … 2031 2031 IF(q(1,JNP)<0.) THEN 2032 2032 dq = q(1,JNP)*cap1/REAL(IMR)*acosp(j2) 2033 doi=1,imr2033 DO i=1,imr 2034 2034 q(i,JNP) = 0. 2035 2035 q(i,j2) = q(i,j2) + dq … … 2050 2050 ipx = 0 2051 2051 ! Copy & swap direction for vectorization. 2052 doi=1,imr2053 doj=j1,j22052 DO i=1,imr 2053 DO j=j1,j2 2054 2054 qtmp(j,i) = q(i,j) 2055 2055 END DO 2056 2056 END DO 2057 2057 ! 2058 doi=2,imr-12059 doj=j1,j22058 DO i=2,imr-1 2059 DO j=j1,j2 2060 2060 IF(qtmp(j,i)<0.) THEN 2061 2061 ipx = 1 … … 2075 2075 ! 2076 2076 i=1 2077 doj=j1,j22077 DO j=j1,j2 2078 2078 IF(qtmp(j,i)<0.) THEN 2079 2079 ipx = 1 … … 2092 2092 END DO 2093 2093 i=IMR 2094 doj=j1,j22094 DO j=j1,j2 2095 2095 IF(qtmp(j,i)<0.) THEN 2096 2096 ipx = 1 … … 2110 2110 ! 2111 2111 IF(ipx/=0) THEN 2112 doj=j1,j22113 doi=1,imr2112 DO j=j1,j2 2113 DO i=1,imr 2114 2114 q(i,j) = qtmp(j,i) 2115 2115 END DO … … 2132 2132 INTEGER :: IC,k,i 2133 2133 ! 2134 doIC = 1, nc2135 ! 2136 dok=1,km2137 doi=1,im2134 DO IC = 1, nc 2135 ! 2136 DO k=1,km 2137 DO i=1,im 2138 2138 qtmp(i,k) = q(i,km+1-k,IC) 2139 2139 END DO 2140 2140 END DO 2141 2141 ! 2142 doi=1,im*km2142 DO i=1,im*km 2143 2143 q(i,1,IC) = qtmp(i,1) 2144 2144 END DO -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.f90
r5136 r5158 81 81 PRINT*,'SCHEMA PRATHER' 82 82 first=.FALSE. 83 doi=2,iip183 DO i=2,iip1 84 84 coslon(i)=cos(rlonv(i)) 85 85 sinlon(i)=sin(rlonv(i)) … … 144 144 145 145 !----------------------------------------------------------- 146 doindice =1,nt146 DO indice =1,nt 147 147 CALL advxp( limit,0.5*dt,pbaru,sm,s0,sx,sy,sz & 148 148 ,sxx,sxy,sxz,syy,syz,szz,1 ) 149 149 END DO 150 dol=1,llm151 doi=1,iip1150 DO l=1,llm 151 DO i=1,iip1 152 152 sy(i,1,l)=0. 153 153 sy(i,jjp1,l)=0. … … 160 160 161 161 !--------------------------------------------------------- 162 doj=1,jjp1163 doi=1,iip1162 DO j=1,jjp1 163 DO i=1,iip1 164 164 sz(i,j,1)=0. 165 165 sz(i,j,llm)=0. … … 174 174 CALL advzp( limit,dt*nt,w,sm,s0,sx,sy,sz & 175 175 ,sxx,sxy,sxz,syy,syz,szz,1 ) 176 dol=1,llm177 doi=1,iip1176 DO l=1,llm 177 DO i=1,iip1 178 178 sy(i,1,l)=0. 179 179 sy(i,jjp1,l)=0. … … 201 201 ENDDO 202 202 ENDDO 203 doindice=1,nt203 DO indice=1,nt 204 204 CALL advxp( limit,0.5*dt,pbaru,sm,s0,sx,sy,sz & 205 205 ,sxx,sxy,sxz,syy,syz,szz,1 ) … … 242 242 dqzpn=ssum(iim,sz(1,1,l),1)/masn 243 243 dqzps=ssum(iim,sz(1,jjp1,l),1)/mass 244 doi=1,iip1244 DO i=1,iip1 245 245 q( i,1,llm+1-l,3)=dqzpn 246 246 q( i,jjp1,llm+1-l,3)=dqzps … … 256 256 dyn2=0. 257 257 dys2=0. 258 doi=1,iim258 DO i=1,iim 259 259 zz=s0(i,2,l)/sm(i,2,l)-q(i,1,llm+1-l,0) 260 260 dyn1=dyn1+sinlondlon(i)*zz … … 264 264 dys2=dys2+coslondlon(i)*zz 265 265 enddo 266 doi=1,iim266 DO i=1,iim 267 267 q(i,1,llm+1-l,2)= & 268 268 (sinlon(i)*dyn1+coslon(i)*dyn2)/2. … … 276 276 q(iip1,1,llm+1-l,0)=q(1,1,llm+1-l,0) 277 277 q(iip1,jjp1,llm+1-l,0)=q(1,jjp1,llm+1-l,0) 278 doi=1,iim278 DO i=1,iim 279 279 sxn(i)=q(i+1,1,llm+1-l,0)-q(i,1,llm+1-l,0) 280 280 sxs(i)=q(i+1,jjp1,llm+1-l,0)-q(i,jjp1,llm+1-l,0) … … 282 282 sxn(iip1)=sxn(1) 283 283 sxs(iip1)=sxs(1) 284 doi=1,iim284 DO i=1,iim 285 285 q(i+1,1,llm+1-l,1)=0.25*(sxn(i)+sxn(i+1)) 286 286 q(i+1,jjp1,llm+1-l,1)=0.25*(sxs(i)+sxs(i+1)) … … 290 290 q(iip1,jjp1,llm+1-l,1) 291 291 enddo 292 dol=1,llm293 doi=1,iim292 DO l=1,llm 293 DO i=1,iim 294 294 q( i,1,llm+1-l,4)=0. 295 295 q( i,jjp1,llm+1-l,4)=0. … … 310 310 ! 311 311 ! bouclage en longitude 312 dol=1,llm313 doj=1,jjp1312 DO l=1,llm 313 DO j=1,jjp1 314 314 q(iip1,j,l,0)=q(1,j,l,0) 315 315 q(iip1,j,llm+1-l,0)=q(1,j,llm+1-l,0) … … 336 336 q(i,j-1,l,2) 337 337 PRINT*,'SZ(',i,j,l,')=',q(i,j,l,3) 338 ! 338 ! PRINT*,' PBL EN SORTIE D'' ADVZP' 339 339 q(i,j,l,0)=0. 340 340 ! STOP … … 342 342 ENDDO 343 343 ENDDO 344 doj=1,jjp1,jjm345 doi=1,iip1344 DO j=1,jjp1,jjm 345 DO i=1,iip1 346 346 IF (q(i,j,l,0)<0.) THEN 347 347 PRINT*,'------------ BIP 2-----------' -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/test_period.f90
r5117 r5158 42 42 ENDDO 43 43 44 doij=1,iim44 DO ij=1,iim 45 45 IF (teta(ij,l)/=teta(1,l) & 46 46 .OR.teta(ip1jm+ij,l)/=teta(ip1jm+1,l) ) THEN … … 98 98 ENDIF 99 99 ENDDO 100 doij=1,iim100 DO ij=1,iim 101 101 IF (p(ij,l)/=p(1,l) & 102 102 .OR.p(ip1jm+ij,l)/=p(ip1jm+1,l) ) THEN -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/traceurpole.f90
r5136 r5158 30 30 sommemasses = 0 31 31 sommemqs = 0 32 dol = 1, llm33 doi = 1, iip132 DO l = 1, llm 33 DO i = 1, iip1 34 34 sommemasses(l) = sommemasses(l) + masse(i, jjp1, l) 35 35 sommemqs(l) = sommemqs(l) + masse(i, jjp1, l) * q(i, jjp1, l) … … 41 41 sommemassen = 0 42 42 sommemqn = 0 43 dol = 1, llm44 doi = 1, iip143 DO l = 1, llm 44 DO i = 1, iip1 45 45 sommemassen(l) = sommemassen(l) + masse(i, 1, l) 46 46 sommemqn(l) = sommemqn(l) + masse(i, 1, l) * q(i, 1, l) … … 50 50 51 51 ! On force le traceur à prendre cette valeur aux pôles 52 dol = 1, llm53 doi = 1, iip152 DO l = 1, llm 53 DO i = 1, iip1 54 54 q(i, 1, l) = qpolen(l) 55 55 q(i, jjp1, l) = qpoles(l) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/write_grads_dyn.h
r5117 r5158 23 23 string10='teta' 24 24 CALL wrgrads(1,llm,teta,string10,string10) 25 doiq=1,nqtot25 DO iq=1,nqtot 26 26 string10='q' 27 27 WRITE(string10(2:2),'(i1)') iq -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90
r5136 r5158 88 88 ! Temperature moyennee 89 89 90 doii = 1, ijp1llm90 DO ii = 1, ijp1llm 91 91 tm(ii) = teta(ii) * ppk(ii) / cpp 92 92 enddo
Note: See TracChangeset
for help on using the changeset viewer.