Changeset 1665 for LMDZ5/branches/testing/libf/dyn3d/leapfrog.F
- Timestamp:
- Oct 9, 2012, 3:35:26 PM (12 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 1576-1580,1582,1584,1591-1593,1597-1598,1600,1604-1620,1622-1628
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/dyn3d/leapfrog.F
r1529 r1665 72 72 73 73 real zqmin,zqmax 74 INTEGER nbetatmoy, nbetatdem,nbetat75 74 76 75 c variables dynamiques … … 118 117 119 118 REAL SSUM 120 REAL time_0 , finvmaold(ip1jmp1,llm) 119 REAL time_0 120 ! REAL finvmaold(ip1jmp1,llm) 121 121 122 122 cym LOGICAL lafin … … 212 212 dq(:,:,:)=0. 213 213 CALL pression ( ip1jmp1, ap, bp, ps, p ) 214 if ( disvert_type==1) then214 if (pressure_exner) then 215 215 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 216 else ! we assume that we are in the disvert_type==2 case216 else 217 217 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 218 218 endif … … 222 222 c ---------------------------------- 223 223 224 1 CONTINUE 225 226 jD_cur = jD_ref + day_ini - day_ref + int (itau * dtvr / daysec) 227 jH_cur = jH_ref + & 228 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 224 1 CONTINUE ! Matsuno Forward step begins here 225 226 jD_cur = jD_ref + day_ini - day_ref + & 227 & itau/day_step 228 jH_cur = jH_ref + start_time + & 229 & mod(itau,day_step)/float(day_step) 230 jD_cur = jD_cur + int(jH_cur) 231 jH_cur = jH_cur - int(jH_cur) 229 232 230 233 … … 255 258 256 259 c ... P.Le Van .26/04/94 .... 257 258 CALL SCOPY ( ijp1llm, masse, 1, finvmaold, 1 )259 CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 )260 261 2 CONTINUE 260 ! Ehouarn: finvmaold is actually not used 261 ! CALL SCOPY ( ijp1llm, masse, 1, finvmaold, 1 ) 262 ! CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 263 264 2 CONTINUE ! Matsuno backward or leapfrog step begins here 262 265 263 266 c----------------------------------------------------------------------- … … 302 305 c -------------------------------- 303 306 307 ! compute geopotential phi() 304 308 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 305 309 … … 315 319 316 320 IF( forward. OR . leapf ) THEN 317 321 ! Ehouarn: NB: at this point p with ps are not synchronized 322 ! (whereas mass and ps are...) 318 323 CALL caladvtrac(q,pbaru,pbarv, 319 324 * p, masse, dq, teta, … … 340 345 341 346 CALL integrd ( 2,vcovm1,ucovm1,tetam1,psm1,massem1 , 342 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis ,343 $ finvmaold )347 $ dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis ) 348 ! $ finvmaold ) 344 349 345 350 … … 364 369 365 370 CALL pression ( ip1jmp1, ap, bp, ps, p ) 366 if ( disvert_type==1) then371 if (pressure_exner) then 367 372 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta,pks, pk, pkf ) 368 else ! we assume that we are in the disvert_type==2 case373 else 369 374 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 370 375 endif … … 372 377 ! rdaym_ini = itau * dtvr / daysec 373 378 ! rdayvrai = rdaym_ini + day_ini 374 jD_cur = jD_ref + day_ini - day_ref 375 $ + int (itau * dtvr / daysec) 376 jH_cur = jH_ref + & 377 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 379 ! jD_cur = jD_ref + day_ini - day_ref 380 ! $ + int (itau * dtvr / daysec) 381 ! jH_cur = jH_ref + & 382 ! & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 383 jD_cur = jD_ref + day_ini - day_ref + & 384 & itau/day_step 385 jH_cur = jH_ref + start_time + & 386 & mod(itau,day_step)/float(day_step) 387 jD_cur = jD_cur + int(jH_cur) 388 jH_cur = jH_cur - int(jH_cur) 378 389 ! write(lunout,*)'itau, jD_cur = ', itau, jD_cur, jH_cur 379 390 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) … … 394 405 ! Ehouarn: be careful, diagedyn is Earth-specific (includes ../phylmd/..)! 395 406 IF (planet_type.eq."earth") THEN 407 #ifdef CPP_EARTH 396 408 CALL diagedyn(ztit,2,1,1,dtphys 397 409 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 410 #endif 398 411 ENDIF 399 412 ENDIF ! of IF (ip_ebil_dyn.ge.1 ) … … 472 485 473 486 CALL pression ( ip1jmp1, ap, bp, ps, p ) 474 if ( disvert_type==1) then487 if (pressure_exner) then 475 488 CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf ) 476 else ! we assume that we are in the disvert_type==2 case489 else 477 490 CALL exner_milieu( ip1jmp1, ps, p, beta, pks, pk, pkf ) 478 491 endif … … 529 542 ENDDO 530 543 531 DO ij = 1,iim 532 tppn(ij) = aire( ij ) * ps ( ij ) 533 tpps(ij) = aire(ij+ip1jm) * ps (ij+ip1jm) 534 ENDDO 535 tpn = SSUM(iim,tppn,1)/apoln 536 tps = SSUM(iim,tpps,1)/apols 537 538 DO ij = 1, iip1 539 ps( ij ) = tpn 540 ps(ij+ip1jm) = tps 541 ENDDO 542 544 if (1 == 0) then 545 !!! Ehouarn: lines here 1) kill 1+1=2 in the dynamics 546 !!! 2) should probably not be here anyway 547 !!! but are kept for those who would want to revert to previous behaviour 548 DO ij = 1,iim 549 tppn(ij) = aire( ij ) * ps ( ij ) 550 tpps(ij) = aire(ij+ip1jm) * ps (ij+ip1jm) 551 ENDDO 552 tpn = SSUM(iim,tppn,1)/apoln 553 tps = SSUM(iim,tpps,1)/apols 554 555 DO ij = 1, iip1 556 ps( ij ) = tpn 557 ps(ij+ip1jm) = tps 558 ENDDO 559 endif ! of if (1 == 0) 543 560 544 561 END IF ! of IF(apdiss) … … 622 639 ! Ehouarn: output only during LF or Backward Matsuno 623 640 if (leapf.or.(.not.leapf.and.(.not.forward))) then 624 nbetat = nbetatdem625 641 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 626 642 unat=0. … … 652 668 ! if (planet_type.eq."earth") then 653 669 ! Write an Earth-format restart file 654 CALL dynredem1("restart.nc", 0.0,670 CALL dynredem1("restart.nc",start_time, 655 671 & vcov,ucov,teta,q,masse,ps) 656 672 ! endif ! of if (planet_type.eq."earth") 657 673 658 674 CLOSE(99) 675 !!! Ehouarn: Why not stop here and now? 659 676 ENDIF ! of IF (itau.EQ.itaufin) 660 677 … … 740 757 IF(MOD(itau,iecri ).EQ.0) THEN 741 758 c IF(MOD(itau,iecri*day_step).EQ.0) THEN 742 nbetat = nbetatdem743 759 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 744 760 unat=0. … … 763 779 IF(itau.EQ.itaufin) THEN 764 780 ! if (planet_type.eq."earth") then 765 CALL dynredem1("restart.nc", 0.0,781 CALL dynredem1("restart.nc",start_time, 766 782 & vcov,ucov,teta,q,masse,ps) 767 783 ! endif ! of if (planet_type.eq."earth")
Note: See TracChangeset
for help on using the changeset viewer.