Changeset 1357 for LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d
- Timestamp:
- Apr 14, 2010, 4:03:19 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d
- Files:
-
- 1 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/control_mod.F90
r1320 r1357 1 1 ! 2 ! $Id $2 ! $Id $ 3 3 ! 4 4 … … 14 14 INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy 15 15 INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn 16 LOGICAL :: offline , output_grads_dyn, ok_dynzon16 LOGICAL :: offline 17 17 CHARACTER (len=4) :: config_inca 18 CHARACTER (len=10) :: planet_type 18 CHARACTER (len=10) :: planet_type ! planet type ('earth','mars',...) 19 LOGICAL output_grads_dyn ! output dynamics diagnostics in 20 ! binary grads file 'dyn.dat' (y/n) 21 LOGICAL ok_dynzon ! output zonal transports in dynzon.nc file 22 LOGICAL ok_dyn_ins ! output instantaneous values of fields 23 ! in the dynamics in NetCDF files dyn_hist*nc 24 LOGICAL ok_dyn_ave ! output averaged values of fields in the dynamics 25 ! in NetCDF files dyn_hist*ave.nc 19 26 20 27 END MODULE -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/gcm.F
r1333 r1357 73 73 #include "description.h" 74 74 #include "serre.h" 75 #include "com_io_dyn.h"75 !#include "com_io_dyn.h" 76 76 #include "iniprint.h" 77 77 #include "tracstoke.h" 78 #ifdef INCA 79 ! Only INCA needs these informations (from the Earth's physics) 78 80 #include "indicesol.h" 79 81 #endif 80 82 INTEGER longcles 81 83 PARAMETER ( longcles = 20 ) … … 319 321 . ' restart ne correspondent pas a celles lues dans ' 320 322 write(lunout,*)' gcm.def' 321 322 323 323 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 324 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 325 write(lunout,*)' Pas de remise a zero' 324 326 ENDIF 325 327 326 c $$$if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then327 c $$$write(lunout,*)328 c $$$. 'GCM: Attention les dates initiales lues dans le fichier'329 c $$$write(lunout,*)330 c $$$. ' restart ne correspondent pas a celles lues dans '331 c $$$write(lunout,*)' gcm.def'332 c $$$write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref333 c $$$write(lunout,*)' day_ref=',day_ref," dayref=",dayref334 c $$$if (raz_date .ne. 1) then335 c $$$write(lunout,*)336 c $$$. 'GCM: On garde les dates du fichier restart'337 c $$$else338 c $$$annee_ref = anneeref339 c $$$day_ref = dayref340 c $$$day_ini = dayref341 c $$$itau_dyn = 0342 c $$$itau_phy = 0343 c $$$time_0 = 0.344 c $$$write(lunout,*)345 c $$$. 'GCM: On reinitialise a la date lue dans gcm.def'346 c $$$endif347 c $$$ELSE348 c $$$raz_date = 0349 c $$$endif328 c if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 329 c write(lunout,*) 330 c . 'GCM: Attention les dates initiales lues dans le fichier' 331 c write(lunout,*) 332 c . ' restart ne correspondent pas a celles lues dans ' 333 c write(lunout,*)' gcm.def' 334 c write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 335 c write(lunout,*)' day_ref=',day_ref," dayref=",dayref 336 c if (raz_date .ne. 1) then 337 c write(lunout,*) 338 c . 'GCM: On garde les dates du fichier restart' 339 c else 340 c annee_ref = anneeref 341 c day_ref = dayref 342 c day_ini = dayref 343 c itau_dyn = 0 344 c itau_phy = 0 345 c time_0 = 0. 346 c write(lunout,*) 347 c . 'GCM: On reinitialise a la date lue dans gcm.def' 348 c endif 349 c ELSE 350 c raz_date = 0 351 c endif 350 352 351 353 #ifdef CPP_IOIPSL … … 461 463 462 464 #ifdef CPP_IOIPSL 463 if ( 1.eq.1) then464 465 time_step = zdtvr 465 t_ops = iecri * daysec 466 t_wrt = iecri * daysec 467 ! CALL inithist(dynhist_file,day_ref,annee_ref,time_step, 468 ! . t_ops, t_wrt, histid, histvid) 469 470 ! IF (ok_dynzon) THEN 471 ! t_ops = iperiod * time_step 472 ! t_wrt = periodav * daysec 473 ! CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step, 474 ! . t_ops, t_wrt, histaveid) 475 ! END IF 466 if (ok_dyn_ins) then 467 ! initialize output file for instantaneous outputs 468 ! t_ops = iecri * daysec ! do operations every t_ops 469 t_ops =((1.0*iecri)/day_step) * daysec 470 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 471 CALL inithist(day_ref,annee_ref,time_step, 472 & t_ops,t_wrt) 473 endif 474 475 IF (ok_dyn_ave) THEN 476 ! initialize output file for averaged outputs 477 t_ops = iperiod * time_step ! do operations every t_ops 478 t_wrt = periodav * daysec ! write output every t_wrt 479 CALL initdynav(day_ref,annee_ref,time_step, 480 & t_ops,t_wrt) 481 END IF 476 482 dtav = iperiod*dtvr/daysec 477 endif478 479 480 483 #endif 481 484 ! #endif of #ifdef CPP_IOIPSL -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/leapfrog.F
r1299 r1357 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 = REAL(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= REAL(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 = REAL(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.