Changeset 1403 for LMDZ4/trunk/libf/dyn3d/leapfrog.F
- Timestamp:
- Jul 1, 2010, 11:02:53 AM (14 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/dyn3d/leapfrog.F
r1286 r1403 15 15 USE guide_mod, ONLY : guide_main 16 16 USE write_field 17 USE control_mod 17 18 IMPLICIT NONE 18 19 … … 56 57 #include "logic.h" 57 58 #include "temps.h" 58 #include "control.h"59 59 #include "ener.h" 60 60 #include "description.h" 61 61 #include "serre.h" 62 #include "com_io_dyn.h"62 !#include "com_io_dyn.h" 63 63 #include "iniprint.h" 64 64 #include "academic.h" … … 197 197 198 198 itau = 0 199 c $$$iday = day_ini+itau/day_step200 c $$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0201 c $$$IF(time.GT.1.) THEN202 c $$$time = time-1.203 c $$$iday = iday+1204 c $$$ENDIF199 c iday = day_ini+itau/day_step 200 c time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0 201 c IF(time.GT.1.) THEN 202 c time = time-1. 203 c iday = iday+1 204 c ENDIF 205 205 206 206 … … 276 276 277 277 IF( purmats ) THEN 278 ! Purely Matsuno time stepping 278 279 IF( MOD(itau,iconser) .EQ.0.AND. forward ) conser = .TRUE. 279 280 IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE. … … 281 282 s .and. iflag_phys.EQ.1 ) apphys = .TRUE. 282 283 ELSE 284 ! Leapfrog/Matsuno time stepping 283 285 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 284 286 IF( MOD(itau+1,idissip) .EQ. 0 ) apdiss = .TRUE. 285 287 IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE. 286 288 END IF 289 290 ! Ehouarn: for Shallow Water case (ie: 1 vertical layer), 291 ! supress dissipation step 292 if (llm.eq.1) then 293 apdiss=.false. 294 endif 287 295 288 296 c----------------------------------------------------------------------- … … 522 530 IF(forward. OR. leapf) THEN 523 531 itau= itau + 1 524 c $$$iday= day_ini+itau/day_step525 c $$$ time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0526 c $$$IF(time.GT.1.) THEN527 c $$$time = time-1.528 c $$$iday = iday+1529 c $$$ENDIF532 c iday= day_ini+itau/day_step 533 c time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0 534 c IF(time.GT.1.) THEN 535 c time = time-1. 536 c iday = iday+1 537 c ENDIF 530 538 ENDIF 531 539 … … 559 567 IF (ok_dynzon) THEN 560 568 #ifdef CPP_IOIPSL 561 ! CALL writedynav(histaveid, itau,vcov , 562 ! , ucov,teta,pk,phi,q,masse,ps,phis) 563 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 564 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 569 CALL bilan_dyn(2,dtvr*iperiod,dtvr*day_step*periodav, 570 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 565 571 #endif 566 572 END IF 567 568 ENDIF 573 IF (ok_dyn_ave) THEN 574 #ifdef CPP_IOIPSL 575 CALL writedynav(itau,vcov, 576 & ucov,teta,pk,phi,q,masse,ps,phis) 577 #endif 578 ENDIF 579 580 ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin)) 569 581 570 582 c----------------------------------------------------------------------- … … 572 584 c ------------------------------ 573 585 574 IF( MOD(itau,iecri 575 c IF( MOD(itau,iecri*day_step).EQ.0) THEN 576 586 IF( MOD(itau,iecri).EQ.0) THEN 587 ! Ehouarn: output only during LF or Backward Matsuno 588 if (leapf.or.(.not.leapf.and.(.not.forward))) then 577 589 nbetat = nbetatdem 578 590 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) … … 583 595 enddo 584 596 #ifdef CPP_IOIPSL 585 c CALL writehist(histid,histvid,itau,vcov, 586 c & ucov,teta,phi,q,masse,ps,phis) 597 if (ok_dyn_ins) then 598 ! write(lunout,*) "leapfrog: call writehist, itau=",itau 599 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 600 ! call WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/))) 601 ! call WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/))) 602 ! call WriteField('teta',reshape(teta,(/iip1,jmp1,llm/))) 603 ! call WriteField('ps',reshape(ps,(/iip1,jmp1/))) 604 ! call WriteField('masse',reshape(masse,(/iip1,jmp1,llm/))) 605 endif ! of if (ok_dyn_ins) 587 606 #endif 588 607 ! For some Grads outputs of fields 589 if (output_grads_dyn) then608 if (output_grads_dyn) then 590 609 #include "write_grads_dyn.h" 591 endif592 610 endif 611 endif ! of if (leapf.or.(.not.leapf.and.(.not.forward))) 593 612 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 594 613 … … 645 664 646 665 itau = itau + 1 647 c $$$iday = day_ini+itau/day_step648 c $$$ time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0649 c $$$650 c $$$IF(time.GT.1.) THEN651 c $$$time = time-1.652 c $$$iday = iday+1653 c $$$ENDIF666 c iday = day_ini+itau/day_step 667 c time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0 668 c 669 c IF(time.GT.1.) THEN 670 c time = time-1. 671 c iday = iday+1 672 c ENDIF 654 673 655 674 forward = .FALSE. … … 660 679 GO TO 2 661 680 662 ELSE ! of IF(forward) 681 ELSE ! of IF(forward) i.e. backward step 663 682 664 683 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN … … 671 690 IF (ok_dynzon) THEN 672 691 #ifdef CPP_IOIPSL 673 ! CALL writedynav(histaveid, itau,vcov , 674 ! , ucov,teta,pk,phi,q,masse,ps,phis) 675 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 676 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 677 #endif 678 END IF 692 CALL bilan_dyn(2,dtvr*iperiod,dtvr*day_step*periodav, 693 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 694 #endif 695 ENDIF 696 IF (ok_dyn_ave) THEN 697 #ifdef CPP_IOIPSL 698 CALL writedynav(itau,vcov, 699 & ucov,teta,pk,phi,q,masse,ps,phis) 700 #endif 701 ENDIF 679 702 680 703 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) … … 690 713 enddo 691 714 #ifdef CPP_IOIPSL 692 c CALL writehist( histid, histvid, itau,vcov , 693 c & ucov,teta,phi,q,masse,ps,phis) 715 if (ok_dyn_ins) then 716 ! write(lunout,*) "leapfrog: call writehist (b)", 717 ! & itau,iecri 718 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 719 endif ! of if (ok_dyn_ins) 694 720 #endif 695 721 ! For some Grads outputs
Note: See TracChangeset
for help on using the changeset viewer.