- Timestamp:
- Aug 2, 2024, 2:12:03 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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)
Note: See TracChangeset
for help on using the changeset viewer.