Changeset 3539 for trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto
- Timestamp:
- Dec 9, 2024, 3:39:31 PM (16 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto
- Files:
-
- 3 edited
-
leapfrog_nogcm.F (modified) (29 diffs)
-
newstart.F (modified) (4 diffs)
-
nogcm.F90 (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto/leapfrog_nogcm.F
r3422 r3539 38 38 IMPLICIT NONE 39 39 40 c ...... Version du 10/01/98 .......... 41 42 c avec coordonnees verticales hybrides 43 c avec nouveaux operat. dissipation * ( gradiv2,divgrad2,nxgraro2 ) 40 c ...... Version du 30/11/24 .......... 44 41 45 42 c======================================================================= 46 43 c 47 c Auteur: P. Le Van /L. Fairhead/F.Hourdin44 c Auteur: T. Bertrand, F. Forget, A. Falco 48 45 c ------- 49 46 c … … 51 48 c ------ 52 49 c 53 c GCM LMD nouvelle grille50 c GCM LMD sans dynamique, pour modele saisonnier de surface 54 51 c 55 52 c======================================================================= 56 c57 c ... Dans inigeom , nouveaux calculs pour les elongations cu , cv58 c et possibilite d'appeler une fonction f(y) a derivee tangente59 c hyperbolique a la place de la fonction a derivee sinusoidale.60 61 c ... Possibilite de choisir le shema pour l'advection de62 c q , en modifiant iadv dans traceur.def (10/02) .63 c64 c Pour Van-Leer + Vapeur d'eau saturee, iadv(1)=4. (F.Codron,10/99)65 c Pour Van-Leer iadv=1066 53 c 67 54 c----------------------------------------------------------------------- … … 76 63 #include "iniprint.h" 77 64 #include "academic.h" 78 79 ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique80 ! #include "clesphys.h"81 65 82 66 REAL,INTENT(IN) :: time_0 ! not used … … 103 87 REAL tsurpk(ip1jmp1,llm) ! cpp*T/pk 104 88 105 ! real zqmin,zqmax 106 107 108 ! ED18 nogcm 89 ! nogcm 109 90 REAL tau_ps 110 91 REAL tau_x … … 117 98 REAL tetamean 118 99 real globaverage2d 119 ! LOGICAL firstcall_globaverage2d120 121 100 122 101 c variables dynamiques intermediaire pour le transport … … 132 111 REAL dteta(ip1jmp1,llm),dq(ip1jmp1,llm,nqtot) 133 112 134 c tendances de la dissipation en */s135 REAL dvdis(ip1jm,llm),dudis(ip1jmp1,llm)136 REAL dtetadis(ip1jmp1,llm)137 138 c tendances de la couche superieure */s139 c REAL dvtop(ip1jm,llm)140 REAL dutop(ip1jmp1,llm)141 c REAL dtetatop(ip1jmp1,llm)142 c REAL dqtop(ip1jmp1,llm,nqtot),dptop(ip1jmp1)143 144 c TITAN : tendances due au forces de marees */s145 REAL dvtidal(ip1jm,llm),dutidal(ip1jmp1,llm)146 147 113 c tendances physiques */s 148 114 REAL dvfi(ip1jm,llm),dufi(ip1jmp1,llm) … … 159 125 160 126 REAL SSUM 161 ! REAL finvmaold(ip1jmp1,llm)162 127 163 128 cym LOGICAL lafin 164 129 LOGICAL :: lafin=.false. 165 130 INTEGER ij,iq,l 166 ! INTEGER ik167 168 ! real time_step, t_wrt, t_ops169 131 170 132 REAL rdaym_ini … … 179 141 save first 180 142 data first/.true./ 181 ! real dt_cum182 ! character*10 infile183 ! integer zan, tau0, thoriid184 ! integer nid_ctesGCM185 ! save nid_ctesGCM186 ! real degres187 ! real rlong(iip1), rlatg(jjp1)188 ! real zx_tmp_2d(iip1,jjp1)189 ! integer ndex2d(iip1*jjp1)190 143 logical ok_sync 191 144 parameter (ok_sync = .true.) … … 214 167 REAL vcont(ip1jm,llm),ucont(ip1jmp1,llm) 215 168 REAL vnat(ip1jm,llm),unat(ip1jmp1,llm) 216 ! REAL d_h_vcol, d_qt, d_qw, d_ql, d_ec217 169 CHARACTER*15 ztit 218 !IM INTEGER ip_ebil_dyn ! PRINT level for energy conserv. diag. 219 !IM SAVE ip_ebil_dyn 220 !IM DATA ip_ebil_dyn/0/ 221 c-jld 222 223 ! integer :: itau_w ! for write_paramLMDZ_dyn.h 224 225 ! character*80 dynhist_file, dynhistave_file 170 226 171 character(len=*),parameter :: modname="leapfrog" 227 172 character*80 abort_message … … 271 216 272 217 c INITIALISATIONS 273 dudis(:,:) =0.274 dvdis(:,:) =0.275 dtetadis(:,:)=0.276 dutop(:,:) =0.277 c dvtop(:,:) =0.278 c dtetatop(:,:)=0.279 c dqtop(:,:,:) =0.280 c dptop(:) =0.281 218 dufi(:,:) =0. 282 219 dvfi(:,:) =0. … … 330 267 write(*,*) "Fin Test PK" 331 268 c stop 269 332 270 c------------------ 333 271 c Preparing mixing of pressure and tracers in nogcm … … 337 275 c It is checked that globalaverage2d(Pi)=pmean 338 276 DO ij=1,ip1jmp1 339 kpd(ij) = exp(-phis(ij)/(r* 200.))277 kpd(ij) = exp(-phis(ij)/(r*38.)) 340 278 ENDDO 341 279 p00d=globaverage2d(kpd) ! mean pres at ref level 342 tau_ps = 1. ! constante de rappel for pressure (s) 343 tau_n2 = 1 ! constante de rappel for mix ratio qn2 (s) 344 tau_def = 1.E7 ! default constante de rappel for mix ratio qX (s) 280 tau_ps = tau_n2 ! constante de rappel for pressure (s) 281 tau_def = 1. ! default constante de rappel for mix ratio qX (s) 345 282 tau_teta = 1.E7 !constante de rappel for potentiel temperature 346 283 … … 368 305 c ----- 369 306 370 jD_cur = jD_ref + day_ini - day_ref + &307 jD_cur = jD_ref + day_ini - day_ref + 371 308 & (itau+1)/day_step 372 jH_cur = jH_ref + start_time + &309 jH_cur = jH_ref + start_time + 373 310 & mod(itau+1,day_step)/float(day_step) 374 311 jD_cur = jD_cur + int(jH_cur) 375 312 jH_cur = jH_cur - int(jH_cur) 376 377 c378 313 379 314 ! Save fields obtained at previous time step as '...m1' … … 407 342 c gestion des appels de la physique et des dissipations: 408 343 c ------------------------------------------------------ 409 c410 c ... P.Le Van ( 6/02/95 ) ....411 412 ! ED18: suppression des mentions de la variable apdiss dans le cas413 ! 'nogcm'414 344 415 345 apphys = .FALSE. 416 346 statcl = .FALSE. 417 347 conser = .FALSE. 418 419 348 420 349 IF( purmats ) THEN 421 350 ! Purely Matsuno time stepping 422 351 IF( MOD(itau,iconser) .EQ.0.AND. forward ) conser = .TRUE. 423 424 352 425 353 IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 426 354 s .and. physics ) apphys = .TRUE. 427 355 ELSE 428 ! Leapfrog/Matsuno time stepping 429 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 430 431 432 IF( MOD(itau+1,iphysiq).EQ.0.AND.physics) apphys=.TRUE. 356 ! Leapfrog/Matsuno time stepping 357 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 358 IF( MOD(itau+1,iphysiq).EQ.0.AND.physics) apphys=.TRUE. 433 359 END IF 434 435 ! Ehouarn: for Shallow Water case (ie: 1 vertical layer),436 ! supress dissipation step437 438 439 360 440 361 c----------------------------------------------------------------------- … … 442 363 c -------------------------------- 443 364 444 ! ED18: suppression de l'onglet pour le cas nogcm 445 446 447 dv(:,:) = 0. 448 du(:,:) = 0. 449 dteta(:,:) = 0. 450 dq(:,:,:) = 0. 451 452 453 454 c .P.Le Van (26/04/94 ajout de finvpold dans l'appel d'integrd) 455 c 365 dv(:,:) = 0. 366 du(:,:) = 0. 367 dteta(:,:) = 0. 368 dq(:,:,:) = 0. 369 456 370 c----------------------------------------------------------------------- 457 371 c calcul des tendances physiques: 458 372 c ------------------------------- 459 c ######## P.Le Van ( Modif le 6/02/95 ) ###########460 373 c 461 374 IF( purmats ) THEN … … 464 377 IF( itau+1. EQ. itaufin ) lafin = .TRUE. 465 378 ENDIF 466 c 467 c 379 468 380 IF( apphys ) THEN 469 c470 c ....... Ajout P.Le Van ( 17/04/96 ) ...........471 c472 381 473 382 CALL pression ( ip1jmp1, ap, bp, ps, p ) … … 481 390 CALL geopot ( ip1jmp1, teta , pk , pks, phis , phi ) 482 391 483 jD_cur = jD_ref + day_ini - day_ref + &392 jD_cur = jD_ref + day_ini - day_ref + 484 393 & (itau+1)/day_step 485 394 486 ! AS: we make jD_cur to be pday 487 jD_cur = int(day_ini + itau/day_step) 488 489 ! print*,'itau =',itau 490 ! print*,'day_step =',day_step 491 ! print*,'itau/day_step =',itau/day_step 492 493 494 jH_cur = jH_ref + start_time + & 395 ! AS: we make jD_cur to be pday 396 jD_cur = int(day_ini + itau/day_step) 397 398 jH_cur = jH_ref + start_time + 495 399 & mod(itau+1,day_step)/float(day_step) 496 jH_cur = jH_ref + start_time + &400 jH_cur = jH_ref + start_time + 497 401 & mod(itau,day_step)/float(day_step) 498 jD_cur = jD_cur + int(jH_cur) 499 jH_cur = jH_cur - int(jH_cur) 500 501 502 503 ! write(lunout,*)'itau, jD_cur = ', itau, jD_cur, jH_cur 504 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) 505 ! write(lunout,*)'current date = ',an, mois, jour, secondes 506 507 c rajout debug 508 c lafin = .true. 509 402 jD_cur = jD_cur + int(jH_cur) 403 jH_cur = jH_cur - int(jH_cur) 510 404 511 405 c Interface avec les routines de phylmd (phymars ... ) 512 406 c ----------------------------------------------------- 513 514 c+jld515 516 c Diagnostique de conservation de l'Energie : initialisation517 IF (ip_ebil_dyn.ge.1 ) THEN518 ztit='bil dyn'519 ! Ehouarn: be careful, diagedyn is Earth-specific!520 IF (planet_type.eq."earth") THEN521 CALL diagedyn(ztit,2,1,1,dtphys522 & , ucov , vcov , ps, p ,pk , teta , q(:,:,1), q(:,:,2))523 ENDIF524 ENDIF ! of IF (ip_ebil_dyn.ge.1 )525 c-jld526 #ifdef CPP_IOIPSL527 cIM decommenter les 6 lignes suivantes pour sortir quelques parametres dynamiques de LMDZ528 cIM uncomment next 6 lines to get some parameters for LMDZ dynamics529 c IF (first) THEN530 c first=.false.531 c#include "ini_paramLMDZ_dyn.h"532 c ENDIF533 c534 c#include "write_paramLMDZ_dyn.h"535 c536 #endif537 ! #endif of #ifdef CPP_IOIPSL538 539 c call WriteField('pfi',reshape(p,(/iip1,jmp1,llmp1/)))540 ! print*,'---------LEAPFROG---------------'541 ! print*,''542 ! print*,'> AVANT CALFIS'543 ! print*,''544 ! print*,'teta(3049,:) = ',teta(3049,:)545 ! print*,''546 ! print*,'dteta(3049,:) = ',dteta(3049,:)547 ! print*,''548 ! print*,'dtetafi(3049,:) = ',dtetafi(3049,:)549 ! print*,''550 407 551 408 CALL calfis( lafin , jD_cur, jH_cur, … … 555 412 $ dufi,dvfi,dtetafi,dqfi,dpfi ) 556 413 557 c call WriteField('dufi',reshape(dufi,(/iip1,jmp1,llm/)))558 c call WriteField('dvfi',reshape(dvfi,(/iip1,jjm,llm/)))559 c call WriteField('dtetafi',reshape(dtetafi,(/iip1,jmp1,llm/)))560 ! print*,'> APRES CALFIS (AVANT ADDFI)'561 ! print*,''562 ! print*,'teta(3049,:) = ',teta(3049,:)563 ! print*,''564 ! print*,'dteta(3049,:) = ',dteta(3049,:)565 ! print*,''566 ! print*,'dtetafi(3049,:) = ',dtetafi(3049,:)567 ! print*,''568 569 570 414 c ajout des tendances physiques 571 415 c ------------------------------ 572 416 573 CALL addfi( dtphys, leapf, forward ,417 CALL addfi( dtphys, leapf, forward , 574 418 $ ucov, vcov, teta , q ,ps , 575 419 $ dufi, dvfi, dtetafi , dqfi ,dpfi ) 576 420 577 ! print*,'> APRES ADDFI' 578 ! print*,'' 579 ! print*,'teta(3049,:) = ',teta(3049,:) 580 ! print*,'' 581 ! print*,'dteta(3049,:) = ',dteta(3049,:) 582 ! print*,'' 583 ! print*,'dtetafi(3049,:) = ',dtetafi(3049,:) 584 ! print*,'' 585 586 CALL pression (ip1jmp1,ap,bp,ps,p) 587 CALL massdair(p,masse) 421 CALL pression (ip1jmp1,ap,bp,ps,p) 422 CALL massdair(p,masse) 588 423 589 ! Mass of tracers in each mess (kg) before Horizontal mixing of pressure 590 c ------------------------------------------------------------------- 424 ! 1) Mass of tracers in each mess (kg) before Horizontal mixing of pressure 591 425 592 426 DO l=1, llm … … 596 430 ENDDO 597 431 598 c Horizontal mixing of pressure 599 c ------------------------------ 432 ! 2) Horizontal mixing of pressure 600 433 ! Rappel newtonien vers psmean 601 psmean= globaverage2d(ps) ! mean pressure602 p0=psmean/p00d603 DO ij=1,ip1jmp1604 oldps(ij)=ps(ij)605 ps(ij)=ps(ij) +(p0*kpd(ij)434 psmean= globaverage2d(ps) ! mean pressure 435 p0=psmean/p00d 436 DO ij=1,ip1jmp1 437 oldps(ij)=ps(ij) 438 ps(ij)=ps(ij) +(p0*kpd(ij) 606 439 & -ps(ij))*(1-exp(-dtphys/tau_ps)) 607 ENDDO608 609 write(72,*) 'psmean = ',psmean ! mean pressure redistributed610 611 ! security check: test pressure negative612 DO ij=1,ip1jmp1440 ENDDO 441 442 write(72,*) 'psmean = ',psmean ! mean pressure redistributed 443 444 ! 3) Security check: test pressure negative 445 DO ij=1,ip1jmp1 613 446 IF (ps(ij).le.0.) then 614 447 !write(*,*) 'Negative pressure :' … … 617 450 !write(*,*) 'tau_ps = ',tau_ps 618 451 !STOP 619 ps(ij)= 0.0000001*kpd(ij)/p00d452 ps(ij)=1.e-6*kpd(ij)/p00d 620 453 ENDIF 621 ENDDO 622 !*********************** 623 ! Correction on teta due to surface pressure changes 624 DO l = 1,llm 625 DO ij = 1,ip1jmp1 626 teta(ij,l)= teta(ij,l)*(ps(ij)/oldps(ij))**kappa 627 ENDDO 628 ENDDO 629 !*********************** 630 631 632 633 ! ! update pressure and update p and pk 634 ! DO ij=1,ip1jmp1 635 ! ps(ij) = ps(ij) + dpfi(ij)*dtphys 454 ENDDO 455 456 ! ! 4) Correction on teta due to surface pressure changes 457 ! DO l = 1,llm 458 ! DO ij = 1,ip1jmp1 459 ! teta(ij,l)= teta(ij,l)*(ps(ij)/oldps(ij))**kappa 460 ! ENDDO 636 461 ! ENDDO 637 CALL pression (ip1jmp1,ap,bp,ps,p) 638 CALL massdair(p,masse) 639 if (pressure_exner) then 462 463 ! 5) Update pressure p and pk 464 CALL pression (ip1jmp1,ap,bp,ps,p) 465 CALL massdair(p,masse) 466 if (pressure_exner) then 640 467 CALL exner_hyb( ip1jmp1, ps, p, pks, pk, pkf ) 641 else468 else 642 469 CALL exner_milieu( ip1jmp1, ps, p, pks, pk, pkf ) 643 endif 644 645 ! Update tracers after Horizontal mixing of pressure to ! conserve tracer mass 646 c ------------------------------------------------------------------- 470 endif 471 472 ! 6) Update tracers after Horizontal mixing of pressure to ! conserve tracer mass 647 473 DO l=1, llm 648 474 DO ij=1,ip1jmp1 … … 650 476 ENDDO 651 477 ENDDO 652 653 654 655 c Horizontal mixing of pressure 656 c ------------------------------ 657 ! Rappel newtonien vers psmean 658 psmean= globaverage2d(ps) ! mean pressure 659 ! ! increment q_n2 with physical tendancy 660 ! IF (igcm_n2.ne.0) then 661 ! DO l=1, llm 662 ! DO ij=1,ip1jmp1 663 ! q(ij,l,igcm_n2)=q(ij,l,igcm_n2)+ 664 ! & dqfi(ij,l,igcm_n2)*dtphys 665 ! ENDDO 666 ! ENDDO 667 ! ENDIF 668 669 c Mixing N2 vertically ! not used for pluto ? 670 c -------------------------- 671 ! if (igcm_n2.ne.0) then 672 ! DO ij=1,ip1jmp1 673 ! qmean_x_vert=0. 674 ! DO l=1, llm 675 ! qmean_x_vert= qmean_x_vert 676 ! & + q(ij,l,igcm_n2)*( p(ij,l) - p(ij,l+1)) 677 ! END DO 678 ! qmean_x_vert= qmean_x_vert/ps(ij) 679 ! DO l=1, llm 680 ! q(ij,l,igcm_n2)= qmean_x_vert 681 ! END DO 682 ! END DO 683 ! end if 684 685 686 687 c Horizontal mixing of pressure 688 c ------------------------------ 689 ! Rappel newtonien vers psmean 690 psmean= globaverage2d(ps) ! mean pressure 691 692 c Horizontal mixing tracers, and temperature (replace dynamics in nogcm) 693 c --------------------------------------------------------------------------------- 478 479 ! 7) Horizontal mixing tracers, and temperature (replace dynamics in nogcm) 480 psmean= globaverage2d(ps) ! mean pressure 694 481 695 482 ! Simulate redistribution by dynamics for qX … … 703 490 pqxmean=globaverage2d(pqx) 704 491 705 !Rappel newtonien vers qx_mean492 ! Rappel newtonien vers qx_mean 706 493 qmean_x= pqxmean / psmean 707 494 … … 728 515 END DO 729 516 730 ! TEMPORAIRE (ED) 731 !PRINT*,'psmean = ',psmean732 !PRINT*,'qmean_x = ',qmean_x733 !PRINT*,'pqxmean = ',pqxmean517 ! Diagnostics 518 ! PRINT*,'psmean = ',psmean 519 ! PRINT*,'qmean_x = ',qmean_x 520 ! PRINT*,'pqxmean = ',pqxmean 734 521 ! PRINT*,' q(50,1) = ',iq,q(50,1,iq) 735 522 ! PRINT*,' q(50,2) = ',iq,q(50,2,iq) … … 737 524 738 525 endif ! igcm_n2.ne.0 739 enddo 740 741 742 ! *****************************************s*************** 743 744 c Horizontal mixing of pressure 745 c ------------------------------ 746 ! Rappel newtonien vers psmean 747 psmean= globaverage2d(ps) ! mean pressure 748 749 750 c Mixing Temperature horizontally 751 c ------------------------------- 752 ! initialize variables that will be averaged 753 DO l=1,llm 754 DO ij=1,ip1jmp1 755 dp(ij,l) = p(ij,l) - p(ij,l+1) 756 tetadp(ij,l) = teta(ij,l)*dp(ij,l) 757 ENDDO 758 ENDDO 759 760 DO l=1,llm 761 tetadpmean = globaverage2d(tetadp(:,l)) 762 dpmean = globaverage2d(dp(:,l)) 763 tetamean = tetadpmean / dpmean 764 DO ij=1,ip1jmp1 765 teta(ij,l) = teta(ij,l) + (tetamean - teta(ij,l)) * 766 & (1 - exp(-dtphys/tau_teta)) 767 ENDDO 768 ENDDO 526 ENDDO 527 528 ! 8) Mixing Temperature horizontally 529 ! initialize variables that will be averaged 530 ! DO l=1,llm 531 ! DO ij=1,ip1jmp1 532 ! dp(ij,l) = p(ij,l) - p(ij,l+1) 533 ! tetadp(ij,l) = teta(ij,l)*dp(ij,l) 534 ! ENDDO 535 ! ENDDO 536 537 ! DO l=1,llm 538 ! tetadpmean = globaverage2d(tetadp(:,l)) 539 ! dpmean = globaverage2d(dp(:,l)) 540 ! tetamean = tetadpmean / dpmean 541 ! DO ij=1,ip1jmp1 542 ! teta(ij,l) = teta(ij,l) + (tetamean - teta(ij,l)) * 543 ! & (1 - exp(-dtphys/tau_teta)) 544 ! ENDDO 545 ! ENDDO 769 546 770 771 547 ENDIF ! of IF( apphys ) 772 548 … … 777 553 c ******************************************************************** 778 554 c ******************************************************************** 779 780 555 781 556 IF ( .NOT.purmats ) THEN … … 793 568 c ENDIF 794 569 ENDIF 795 796 570 797 571 IF( itau. EQ. itaufinp1 ) then … … 810 584 call abort_gcm(modname,abort_message,0) 811 585 ENDIF 586 812 587 c----------------------------------------------------------------------- 813 588 c ecriture du fichier histoire moyenne: … … 824 599 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 825 600 826 IF (ok_dynzon) THEN827 #ifdef CPP_IOIPSL828 c les traceurs ne sont pas sortis, trop lourd.829 c Peut changer eventuellement si besoin.830 CALL bilan_dyn(dtvr*iperiod,dtvr*day_step*periodav,831 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,832 & du,dudis,dutop,dufi)833 #endif834 END IF835 601 IF (ok_dyn_ave) THEN 836 602 #ifdef CPP_IOIPSL … … 963 729 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) 964 730 965 IF (ok_dynzon) THEN966 #ifdef CPP_IOIPSL967 c les traceurs ne sont pas sortis, trop lourd.968 c Peut changer eventuellement si besoin.969 CALL bilan_dyn(dtvr*iperiod,dtvr*day_step*periodav,970 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,971 & du,dudis,dutop,dufi)972 #endif973 ENDIF974 731 IF (ok_dyn_ave) THEN 975 732 #ifdef CPP_IOIPSL -
trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto/newstart.F
r3438 r3539 100 100 REAL tsurf(ngridmx) ! surface temperature 101 101 REAL,ALLOCATABLE :: tsoil(:,:) ! soil temperature 102 REAL,ALLOCATABLE :: inertiedat_simple(:,:) ! thermal inertia tmp for dynamico 102 103 REAL emis(ngridmx) ! surface emissivity 103 104 real emisread ! added by RW … … 235 236 call getin_p("nsoilmx",nsoilmx) 236 237 238 allocate(inertiedat_simple(ngridmx,nsoilmx)) 237 239 allocate(tsoil(ngridmx,nsoilmx)) 238 240 allocate(field_inputs(ngridmx,nsoilmx)) … … 379 381 CALL phyetat0(.true.,ngridmx,llm,fichnom,tab0,Lmodif,nsoilmx, 380 382 . nqtot,day_ini,time, 381 . tsurf,tsoil,emis,q2,qsurf ) !) ! temporary modif by RDW383 . tsurf,tsoil,emis,q2,qsurf,inertiedat_simple) !) ! temporary modif by RDW 382 384 383 385 ! copy albedo and soil thermal inertia on (local) physics grid … … 4013 4015 & llm, 4014 4016 & nqtot,dtphys,real(day_ini),0.0, 4015 & cell_area,albfi, ithfi,zmea,zstd,zsig,zgam,zthe)4017 & cell_area,albfi,zmea,zstd,zsig,zgam,zthe) 4016 4018 call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot, 4017 4019 & dtphys,real(day_ini), 4018 & tsurf,tsoil, emis,q2,qsurf)4020 & tsurf,tsoil,ithfi,emis,q2,qsurf) 4019 4021 ! & cloudfrac,totalfrac,hice, 4020 4022 ! & rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) -
trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto/nogcm.F90
r3412 r3539 1 1 ! 2 ! nogcm for Pluto, based on mars nogcm, 07/20243 ! Author: A. Falco 2 ! nogcm for Pluto, based on mars nogcm, 12/2024 3 ! Author: A. Falco, T. Bertrand 4 4 ! 5 5 ! … … 47 47 IMPLICIT NONE 48 48 49 ! ...... Version du 10/01/98 ..........50 51 ! avec coordonnees verticales hybrides52 ! avec nouveaux operat. dissipation * ( gradiv2,divgrad2,nxgraro2 )53 54 !=======================================================================55 !56 ! Auteur: P. Le Van /L. Fairhead/F.Hourdin57 ! -------58 !59 ! Objet:60 ! ------61 !62 ! GCM LMD nouvelle grille63 !64 !=======================================================================65 !66 ! ... Dans inigeom , nouveaux calculs pour les elongations cu , cv67 ! et possibilite d'appeler une fonction f(y) a derivee tangente68 ! hyperbolique a la place de la fonction a derivee sinusoidale.69 ! ... Possibilite de choisir le schema pour l'advection de70 ! q , en modifiant iadv dans traceur.def (MAF,10/02) .71 !72 ! Pour Van-Leer + Vapeur d'eau saturee, iadv(1)=4. (F.Codron,10/99)73 ! Pour Van-Leer iadv=1074 !75 49 !----------------------------------------------------------------------- 76 50 ! Declarations: … … 114 88 LOGICAL first 115 89 116 ! LOGICAL call_iniphys117 ! data call_iniphys/.true./118 119 !+jld variables test conservation energie120 ! REAL ecin(ip1jmp1,llm),ecin0(ip1jmp1,llm)121 ! Tendance de la temp. potentiel d (theta)/ d t due a la122 ! tansformation d'energie cinetique en energie thermique123 ! cree par la dissipation124 90 REAL dhecdt(ip1jmp1,llm) 125 ! REAL vcont(ip1jm,llm),ucont(ip1jmp1,llm)126 ! REAL d_h_vcol, d_qt, d_qw, d_ql, d_ec127 91 CHARACTER (len=15) :: ztit 128 !-jld129 92 130 93 … … 171 134 172 135 173 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!174 ! FH 2008/05/02175 ! A nettoyer. On ne veut qu'une ou deux routines d'interface176 ! dynamique -> physique pour l'initialisation177 !#ifdef CPP_PHYS178 ! CALL init_phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))179 !! call initcomgeomphy ! now done in iniphysiq180 !#endif181 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!182 136 ! 183 137 ! Initialisations pour Cp(T) Venus … … 194 148 call ioconf_calendar('360d') 195 149 write(lunout,*)'CALENDRIER CHOISI: Terrestre a 360 jours/an' 196 else if (calend == 'earth_365d') then 197 call ioconf_calendar('noleap') 198 write(lunout,*)'CALENDRIER CHOISI: Terrestre a 365 jours/an' 199 else if (calend == 'earth_366d') then 200 call ioconf_calendar('gregorian') 201 write(lunout,*)'CALENDRIER CHOISI: Terrestre bissextile' 202 else if (calend == 'titan') then 203 ! call ioconf_calendar('titan') 204 write(lunout,*)'CALENDRIER CHOISI: Titan' 205 abort_message = 'A FAIRE...' 206 call abort_gcm(modname,abort_message,1) 207 else if (calend == 'venus') then 208 ! call ioconf_calendar('venus') 209 write(lunout,*)'CALENDRIER CHOISI: Venus' 210 abort_message = 'A FAIRE...' 211 call abort_gcm(modname,abort_message,1) 212 else 213 abort_message = 'Mauvais choix de calendrier' 214 call abort_gcm(modname,abort_message,1) 215 endif 216 #endif 217 !----------------------------------------------------------------------- 218 ! 219 ! 150 endif 151 #endif 152 220 153 !------------------------------------ 221 154 ! Initialisation partie parallele 222 155 !------------------------------------ 223 156 224 !225 !226 157 !----------------------------------------------------------------------- 227 158 ! Initialisation des traceurs … … 257 188 endif 258 189 259 ! write(73,*) 'ucov',ucov260 ! write(74,*) 'vcov',vcov261 ! write(75,*) 'teta',teta262 ! write(76,*) 'ps',ps263 ! write(77,*) 'q',q264 265 190 endif ! of if (read_start) 266 191 … … 268 193 ! le cas echeant, creation d un etat initial 269 194 IF (prt_level > 9) WRITE(lunout,*) & 270 ' GCM: AVANT iniacademic AVANT AVANT AVANT AVANT'195 'NOGCM: AVANT iniacademic AVANT AVANT AVANT AVANT' 271 196 if (.not.read_start) then 272 197 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) … … 330 255 ENDIF 331 256 332 ! if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then333 ! write(lunout,*)334 ! . 'GCM: Attention les dates initiales lues dans le fichier'335 ! write(lunout,*)336 ! . ' restart ne correspondent pas a celles lues dans '337 ! write(lunout,*)' gcm.def'338 ! write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref339 ! write(lunout,*)' day_ref=',day_ref," dayref=",dayref340 ! if (raz_date .ne. 1) then341 ! write(lunout,*)342 ! . 'GCM: On garde les dates du fichier restart'343 ! else344 ! annee_ref = anneeref345 ! day_ref = dayref346 ! day_ini = dayref347 ! itau_dyn = 0348 ! itau_phy = 0349 ! time_0 = 0.350 ! write(lunout,*)351 ! . 'GCM: On reinitialise a la date lue dans gcm.def'352 ! endif353 ! ELSE354 ! raz_date = 0355 ! endif356 357 257 #ifdef CPP_IOIPSL 358 258 mois = 1 359 259 heure = 0. 360 ! Ce n'est defini pour l'instant que pour la Terre...361 if (planet_type.eq.'earth') then362 call ymds2ju(annee_ref, mois, day_ref, heure, jD_ref)363 jH_ref = jD_ref - int(jD_ref)364 jD_ref = int(jD_ref)365 366 call ioconf_startdate(INT(jD_ref), jH_ref)367 368 write(lunout,*)'DEBUG'369 write(lunout,*)'annee_ref, mois, day_ref, heure, jD_ref'370 write(lunout,*)annee_ref, mois, day_ref, heure, jD_ref371 call ju2ymds(jD_ref+jH_ref,an, mois, jour, heure)372 write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure'373 write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure374 ! else if (planet_type.eq.'titan') then375 ! jD_ref=1 ! Only if we use old Titan starts (J.V.O 2016)376 else377 ! A voir pour Titan et Venus378 jD_ref=0379 jH_ref=0380 write(lunout,*)'A VOIR POUR VENUS ET TITAN: jD_ref, jH_ref'381 write(lunout,*)jD_ref,jH_ref382 endif ! planet_type383 260 #else 384 261 ! Ehouarn: we still need to define JD_ref and JH_ref … … 410 287 ! 411 288 !----------------------------------------------------------------------- 412 ! Initialisation de la dissipation :413 ! ----------------------------------414 415 !ED18 CALL inidissip( lstardis, nitergdiv, nitergrot, niterh , &416 ! tetagdiv, tetagrot , tetatemp, vert_prof_dissip)417 418 !-----------------------------------------------------------------------419 289 ! Initialisation des I/O : 420 290 ! ------------------------ … … 434 304 WRITE(lunout,'(a,i7,a,i7)') & 435 305 "run from day ",day_ini," to day",day_end 436 437 #ifdef CPP_IOIPSL438 ! Ce n'est defini pour l'instant que pour la Terre...439 if (planet_type.eq.'earth') then440 call ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure)441 write (lunout,301)jour, mois, an442 call ju2ymds(jD_ref + day_end - day_ref, an, mois, jour, heure)443 write (lunout,302)jour, mois, an444 else445 ! A voir pour Titan et Venus446 write(lunout,*)'A VOIR POUR VENUS/TITAN: separation en annees...'447 endif ! planet_type448 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4)449 302 FORMAT('1'/,15x,' au ', i2,'/',i2,'/',i4)450 #endif451 452 306 453 307 !----------------------------------------------------------------------- … … 467 321 468 322 469 if (planet_type=="mars") then 470 ! For Mars we transmit day_ini 471 CALL dynredem0("restart.nc", day_ini, phis) 472 else 473 CALL dynredem0("restart.nc", day_end, phis) 474 endif 323 ! Note that for Mars we transmit day_ini 324 CALL dynredem0("restart.nc", day_end, phis) 475 325 ecripar = .TRUE. 476 326 … … 503 353 istphy=istdyn/iphysiq 504 354 505 506 !507 355 !----------------------------------------------------------------------- 508 356 ! Integration temporelle du modele : 509 357 ! ---------------------------------- 510 358 511 ! write(78,*) 'ucov',ucov512 ! write(78,*) 'vcov',vcov513 ! write(78,*) 'teta',teta514 ! write(78,*) 'ps',ps515 ! write(78,*) 'q',q516 517 359 CALL leapfrog_nogcm(ucov,vcov,teta,ps,masse,phis,q,time_0) 518 360
Note: See TracChangeset
for help on using the changeset viewer.
