Changeset 1140 for LMDZ4/branches/LMDZ4-dev/libf/dyn3d/leapfrog.F
- Timestamp:
- Mar 30, 2009, 4:46:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/leapfrog.F
r1114 r1140 7 7 8 8 cIM : pour sortir les param. du modele dans un fis. netcdf 110106 9 USE IOIPSL 9 #ifdef CPP_IOIPSL 10 use IOIPSL 11 #endif 10 12 USE infotrac 11 13 … … 161 163 162 164 character*80 dynhist_file, dynhistave_file 163 character *20modname165 character(len=20) :: modname 164 166 character*80 abort_message 165 167 … … 217 219 call guide(itau,ucov,vcov,teta,q,masse,ps) 218 220 else 219 IF(prt_level>9)WRITE( *,*)'attention on ne guide pas les',220 . ' 6 dernieres heures'221 IF(prt_level>9)WRITE(lunout,*)'leapfrog: attention on ne ', 222 . 'guide pas les 6 dernieres heures' 221 223 endif 222 224 #endif … … 227 229 c ENDIF 228 230 c 231 232 ! Save fields obtained at previous time step as '...m1' 229 233 CALL SCOPY( ijmllm ,vcov , 1, vcovm1 , 1 ) 230 234 CALL SCOPY( ijp1llm,ucov , 1, ucovm1 , 1 ) … … 242 246 CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 ) 243 247 244 call minmax(ijp1llm,q(:,:,3),zqmin,zqmax) 248 ! Ehouarn: what is this for? zqmin & zqmax are not used anyway ... 249 ! call minmax(ijp1llm,q(:,:,3),zqmin,zqmax) 245 250 246 251 2 CONTINUE … … 302 307 303 308 304 ENDIF 305 c 306 ENDIF 309 ENDIF ! of IF (offline) 310 c 311 ENDIF ! of IF( forward. OR . leapf ) 307 312 308 313 … … 350 355 c ----------------------------------------------------- 351 356 352 #ifdef CPP_PHYS353 357 c+jld 354 358 355 359 c Diagnostique de conservation de l'énergie : initialisation 356 IF (ip_ebil_dyn.ge.1 ) THEN360 IF (ip_ebil_dyn.ge.1 ) THEN 357 361 ztit='bil dyn' 358 CALL diagedyn(ztit,2,1,1,dtphys 359 e , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 360 ENDIF 362 ! Ehouarn: be careful, diagedyn is Earth-specific (includes ../phylmd/..)! 363 IF (planet_type.eq."earth") THEN 364 CALL diagedyn(ztit,2,1,1,dtphys 365 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 366 ENDIF 367 ENDIF ! of IF (ip_ebil_dyn.ge.1 ) 361 368 c-jld 369 #ifdef CPP_IOIPSL 362 370 cIM : pour sortir les param. du modele dans un fis. netcdf 110106 363 IF (first) THEN364 first=.false.371 IF (first) THEN 372 first=.false. 365 373 #include "ini_paramLMDZ_dyn.h" 366 ENDIF374 ENDIF 367 375 c 368 376 #include "write_paramLMDZ_dyn.h" 369 377 c 370 371 CALL calfis( lafin ,rdayvrai,time , 378 #endif 379 ! #endif of #ifdef CPP_IOIPSL 380 CALL calfis( lafin ,rdayvrai,time , 372 381 $ ucov,vcov,teta,q,masse,ps,p,pk,phis,phi , 373 382 $ du,dv,dteta,dq, … … 375 384 $ clesphy0, dufi,dvfi,dtetafi,dqfi,dpfi ) 376 385 377 IF (ok_strato) THEN378 CALL top_bound( vcov,ucov,teta, dufi,dvfi,dtetafi)379 ENDIF386 IF (ok_strato) THEN 387 CALL top_bound( vcov,ucov,teta, dufi,dvfi,dtetafi) 388 ENDIF 380 389 381 390 c ajout des tendances physiques: … … 386 395 c 387 396 c Diagnostique de conservation de l'énergie : difference 388 IF (ip_ebil_dyn.ge.1 ) THEN397 IF (ip_ebil_dyn.ge.1 ) THEN 389 398 ztit='bil phys' 390 CALL diagedyn(ztit,2,1,1,dtphys 391 e , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 392 ENDIF 393 #endif 399 IF (planet_type.eq."earth") THEN 400 CALL diagedyn(ztit,2,1,1,dtphys 401 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2)) 402 ENDIF 403 ENDIF ! of IF (ip_ebil_dyn.ge.1 ) 404 394 405 ENDIF ! of IF( apphys ) 395 406 396 IF(iflag_phys.EQ.2) THEN ! "Newtonian physics" case407 IF(iflag_phys.EQ.2) THEN ! "Newtonian" case 397 408 c Calcul academique de la physique = Rappel Newtonien + friction 398 409 c -------------------------------------------------------------- … … 472 483 473 484 474 END IF 485 END IF ! of IF(apdiss) 475 486 476 487 c ajout debug … … 545 556 c IF( MOD(itau,iecri*day_step).EQ.0) THEN 546 557 547 nbetat = nbetatdem 548 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 549 unat=0. 550 do l=1,llm 551 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm) 552 vnat(:,l)=vcov(:,l)/cv(:) 553 enddo 554 #ifdef CPP_IOIPSL 555 c CALL writehist(histid,histvid,itau,vcov, 556 c s ucov,teta,phi,q,masse,ps,phis) 557 #else 558 nbetat = nbetatdem 559 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 560 unat=0. 561 do l=1,llm 562 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm) 563 vnat(:,l)=vcov(:,l)/cv(:) 564 enddo 565 #ifdef CPP_IOIPSL 566 c CALL writehist(histid,histvid,itau,vcov, 567 c & ucov,teta,phi,q,masse,ps,phis) 568 #endif 569 ! For some Grads outputs of fields 570 if (output_grads_dyn) then 558 571 #include "write_grads_dyn.h" 559 #endif 560 561 562 ENDIF 572 endif 573 574 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 563 575 564 576 IF(itau.EQ.itaufin) THEN 565 577 566 578 567 #ifdef CPP_IOIPSL 568 CALL dynredem1("restart.nc",0.0, 569 , vcov,ucov,teta,q,masse,ps) 570 #endif 579 if (planet_type.eq."earth") then 580 #ifdef CPP_EARTH 581 ! Write an Earth-format restart file 582 CALL dynredem1("restart.nc",0.0, 583 & vcov,ucov,teta,q,masse,ps) 584 #endif 585 endif ! of if (planet_type.eq."earth") 571 586 572 587 CLOSE(99) 573 ENDIF 588 ENDIF ! of IF (itau.EQ.itaufin) 574 589 575 590 c----------------------------------------------------------------------- … … 593 608 leapf = .TRUE. 594 609 dt = 2.*dtvr 595 GO TO 2 596 END IF 610 GO TO 2 611 END IF ! of IF (forward) 597 612 ELSE 598 613 … … 602 617 dt = 2.*dtvr 603 618 GO TO 2 604 END IF 605 606 ELSE 619 END IF ! of IF (MOD(itau,iperiod).EQ.0) 620 ! ELSEIF (MOD(itau-1,iperiod).EQ.0) 621 622 ELSE ! of IF (.not.purmats) 607 623 608 624 c ........................................................ … … 627 643 GO TO 2 628 644 629 ELSE 630 631 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN645 ELSE ! of IF(forward) 646 647 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN 632 648 IF(itau.EQ.itaufin) THEN 633 649 iav=1 … … 636 652 ENDIF 637 653 #ifdef CPP_IOIPSL 638 CALL writedynav(histaveid, itau,vcov ,654 CALL writedynav(histaveid, itau,vcov , 639 655 , ucov,teta,pk,phi,q,masse,ps,phis) 640 656 call bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, … … 642 658 #endif 643 659 644 ENDIF645 646 660 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) 661 662 IF(MOD(itau,iecri ).EQ.0) THEN 647 663 c IF(MOD(itau,iecri*day_step).EQ.0) THEN 648 nbetat = nbetatdem 649 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 650 unat=0. 651 do l=1,llm 652 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm) 653 vnat(:,l)=vcov(:,l)/cv(:) 654 enddo 655 #ifdef CPP_IOIPSL 656 c CALL writehist( histid, histvid, itau,vcov , 657 c , ucov,teta,phi,q,masse,ps,phis) 658 #else 664 nbetat = nbetatdem 665 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 666 unat=0. 667 do l=1,llm 668 unat(iip2:ip1jm,l)=ucov(iip2:ip1jm,l)/cu(iip2:ip1jm) 669 vnat(:,l)=vcov(:,l)/cv(:) 670 enddo 671 #ifdef CPP_IOIPSL 672 c CALL writehist( histid, histvid, itau,vcov , 673 c & ucov,teta,phi,q,masse,ps,phis) 674 #endif 675 ! For some Grads outputs 676 if (output_grads_dyn) then 659 677 #include "write_grads_dyn.h" 660 #endif 661 662 663 ENDIF 664 665 #ifdef CPP_IOIPSL 666 IF(itau.EQ.itaufin) 667 . CALL dynredem1("restart.nc",0.0, 668 . vcov,ucov,teta,q,masse,ps) 669 #endif 670 671 forward = .TRUE. 672 GO TO 1 673 674 ENDIF 675 676 END IF 678 endif 679 680 ENDIF ! of IF(MOD(itau,iecri ).EQ.0) 681 682 IF(itau.EQ.itaufin) THEN 683 if (planet_type.eq."earth") then 684 #ifdef CPP_EARTH 685 CALL dynredem1("restart.nc",0.0, 686 & vcov,ucov,teta,q,masse,ps) 687 #endif 688 endif ! of if (planet_type.eq."earth") 689 ENDIF ! of IF(itau.EQ.itaufin) 690 691 forward = .TRUE. 692 GO TO 1 693 694 ENDIF ! of IF (forward) 695 696 END IF ! of IF(.not.purmats) 677 697 678 698 STOP
Note: See TracChangeset
for help on using the changeset viewer.