Changeset 2366 for trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
- Timestamp:
- Jun 11, 2020, 7:40:22 PM (5 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
- Files:
-
- 1 deleted
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/lect_start_archive.F
r2136 r2366 2 2 & date,tsurf,tsoil,emis,q2, 3 3 & t,ucov,vcov,ps,h,phisold_newgrid, 4 & q,qsurf,surfith,nid) 5 6 ! USE surfdat_h 4 & q,qsurf,tankCH4,surfith,nid) 5 7 6 USE comchem_h, only : cnames, nkim 8 7 USE comchem_newstart_h 9 8 USE comsoil_h, ONLY: nsoilmx, layer, mlayer, volcapa, inertiedat 10 9 USE infotrac, ONLY: tname, nqtot 11 ! USE control_mod12 ! to use 'getin'13 10 USE callkeys_mod, only: callchim 14 11 USE comvert_mod, ONLY: ap,bp,aps,bps,preff … … 17 14 c======================================================================= 18 15 c 19 c 20 c Auteur: 05/1997 , 12/2003 : coord hybride FF 21 c ------ 22 c 23 c 24 c Objet: Lecture des variables d'un fichier "start_archive" 25 c Plus besoin de régler ancienne valeurs grace 26 c a l'allocation dynamique de memoire (Yann Wanherdrick) 27 c 28 c 16 c Routine to load variables from the "start_archive.nc" file 29 17 c 30 18 c======================================================================= … … 32 20 implicit none 33 21 34 #include "dimensions.h" 35 !#include "dimphys.h" 36 !#include "planete.h" 37 #include "paramet.h" 38 #include "comgeom2.h" 39 !#include "control.h" 40 #include "netcdf.inc" 41 !#include"advtrac.h" 22 include "dimensions.h" 23 include "paramet.h" 24 include "comgeom2.h" 25 include "netcdf.inc" 26 42 27 c======================================================================= 43 28 c Declarations … … 49 34 c------------------------------------ 50 35 INTEGER imold,jmold,lmold,nsoilold,nqold 36 51 37 52 38 c Variables pour les lectures des fichiers "ini" … … 60 46 CHARACTER*2 str2 61 47 62 ! REAL dimfirst(4) ! tableau contenant les 1ers elements des dimensions 63 64 ! REAL dimlast(4) ! tableau contenant les derniers elements des dimensions 65 66 ! REAL dimcycl(4) ! tableau contenant les periodes des dimensions 67 ! CHARACTER*120 dimsource 68 ! CHARACTER*16 dimname 69 ! CHARACTER*80 dimtitle 70 ! CHARACTER*40 dimunits 71 ! INTEGER dimtype 72 73 ! INTEGER dimord(4) ! tableau contenant l''ordre 74 ! data dimord /1,2,3,4/ ! de sortie des dimensions 75 76 ! INTEGER vardim(4) 77 REAL date 48 REAL,INTENT(OUT) :: date 78 49 INTEGER memo 79 50 ! character (len=50) :: tmpname … … 81 52 c Variable histoire 82 53 c------------------ 83 REAL vcov(iip1,jjm,llm),ucov(iip1,jjp1,llm) ! vents covariants 84 REAL h(iip1,jjp1,llm),ps(iip1,jjp1) 85 REAL q(iip1,jjp1,llm,nqtot),qtot(iip1,jjp1,llm) 86 87 c autre variables dynamique nouvelle grille 88 c------------------------------------------ 89 90 c!-*- 91 ! integer klatdat,klongdat 92 ! PARAMETER (klatdat=180,klongdat=360) 54 REAL,INTENT(OUT) :: vcov(iip1,jjm,llm),ucov(iip1,jjp1,llm) ! vents covariants 55 REAL,INTENT(OUT) :: h(iip1,jjp1,llm),ps(iip1,jjp1) 56 REAL,INTENT(OUT) :: q(iip1,jjp1,llm,nqtot) 93 57 94 58 c Physique sur grille scalaire … … 97 61 c variable physique 98 62 c------------------ 99 REAL tsurf(ngrid) ! surface temperature 100 REAL tsoil(ngrid,nsoilmx) ! soil temperature 101 REAL emis(ngrid) 102 REAL q2(ngrid,llm+1),qsurf(ngrid,nqtot) 63 REAL,INTENT(OUT) :: tsurf(ngrid) ! surface temperature 64 REAL,INTENT(OUT) :: tsoil(ngrid,nsoilmx) ! soil temperature 65 REAL,INTENT(OUT) :: emis(ngrid) 66 REAL,INTENT(OUT) :: q2(ngrid,llm+1),qsurf(ngrid,nqtot) 67 REAL,INTENT(OUT) :: tankCH4(ngrid) 103 68 c REAL phisfi(ngrid) 104 69 105 70 INTEGER i,j,l 106 INTEGER nid,nvarid 71 INTEGER,INTENT(IN) :: nid 72 INTEGER :: nvarid 107 73 c REAL year_day,periheli,aphelie,peri_day 108 74 c REAL obliquit,z0,emin_turb,lmixmin … … 116 82 c------------------------------------------------------ 117 83 real us(iip1,jjp1,llm),vs(iip1,jjp1,llm) 118 REAL phisold_newgrid(iip1,jjp1)119 REAL t(iip1,jjp1,llm)84 REAL,INTENT(OUT) :: phisold_newgrid(iip1,jjp1) 85 REAL,INTENT(OUT) :: t(iip1,jjp1,llm) 120 86 real tsurfS(iip1,jjp1),tsoilS(iip1,jjp1,nsoilmx) 121 87 real inertiedatS(iip1,jjp1,nsoilmx) 122 88 real emisS(iip1,jjp1) 123 89 REAL q2S(iip1,jjp1,llm+1),qsurfS(iip1,jjp1,nqtot) 124 90 REAL tankCH4S(iip1,jjp1) 91 125 92 real ptotal 126 93 … … 148 115 real, dimension(:,:), allocatable :: tsurfold 149 116 real, dimension(:,:), allocatable :: emisold 117 real, dimension(:,:), allocatable :: tankCH4old 150 118 real, dimension(:,:,:,:), allocatable :: qold 151 119 … … 167 135 real, dimension(:), allocatable :: newval 168 136 169 real surfith(iip1,jjp1) ! surface thermal inertia137 real,intent(out) :: surfith(iip1,jjp1) ! surface thermal inertia 170 138 ! surface thermal inertia at old horizontal grid resolution 171 139 real, dimension(:,:), allocatable :: surfithold … … 293 261 allocate(tsurfold(imold+1,jmold+1)) 294 262 allocate(emisold(imold+1,jmold+1)) 263 allocate(tankCH4old(imold+1,jmold+1)) 295 264 allocate(q2old(imold+1,jmold+1,lmold+1)) 296 265 ! allocate(tsoilold(imold+1,jmold+1,nsoilmx)) … … 312 281 allocate(varp1 (imold+1,jmold+1,llm+1)) 313 282 314 write(*,*) ' q2',ngrid,llm+1315 write(*,*) ' q2S',iip1,jjp1,llm+1316 write(*,*) ' q2old',imold+1,jmold+1,lmold+1283 write(*,*) 'lect_start_archive: q2',ngrid,llm+1 284 write(*,*) 'lect_start_archive: q2S',iip1,jjp1,llm+1 285 write(*,*) 'lect_start_archive: q2old',imold+1,jmold+1,lmold+1 317 286 318 287 !----------------------------------------------------------------------- … … 327 296 ierr = NF_INQ_VARID (nid, "controle", nvarid) 328 297 IF (ierr .NE. NF_NOERR) THEN 329 PRINT*, "Lect_start_archive: champ <controle> est absent"298 PRINT*, "Lect_start_archive: Field <controle> not found" 330 299 CALL abort 331 300 ENDIF … … 348 317 ierr = NF_INQ_VARID (nid, "rlonv", nvarid) 349 318 IF (ierr .NE. NF_NOERR) THEN 350 PRINT*, "lect_start_archive: Le champ <rlonv> est absent"319 PRINT*, "lect_start_archive: Field <rlonv> not found" 351 320 CALL abort 352 321 ENDIF … … 357 326 #endif 358 327 IF (ierr .NE. NF_NOERR) THEN 359 PRINT*, "lect_start_archive: Lecture echouee pour<rlonv>"328 PRINT*, "lect_start_archive: Failed loading <rlonv>" 360 329 CALL abort 361 330 ENDIF … … 363 332 ierr = NF_INQ_VARID (nid, "rlatu", nvarid) 364 333 IF (ierr .NE. NF_NOERR) THEN 365 PRINT*, "lect_start_archive: Le champ <rlatu> est absent"334 PRINT*, "lect_start_archive: Field <rlatu> not found" 366 335 CALL abort 367 336 ENDIF … … 372 341 #endif 373 342 IF (ierr .NE. NF_NOERR) THEN 374 PRINT*, "lect_start_archive: Lecture echouee pour<rlatu>"343 PRINT*, "lect_start_archive: Failed loading <rlatu>" 375 344 CALL abort 376 345 ENDIF … … 378 347 ierr = NF_INQ_VARID (nid, "rlonu", nvarid) 379 348 IF (ierr .NE. NF_NOERR) THEN 380 PRINT*, "lect_start_archive: Le champ <rlonu> est absent"349 PRINT*, "lect_start_archive: Field <rlonu> not found" 381 350 CALL abort 382 351 ENDIF … … 387 356 #endif 388 357 IF (ierr .NE. NF_NOERR) THEN 389 PRINT*, "lect_start_archive: Lecture echouee pour<rlonu>"358 PRINT*, "lect_start_archive: Failed loading <rlonu>" 390 359 CALL abort 391 360 ENDIF … … 393 362 ierr = NF_INQ_VARID (nid, "rlatv", nvarid) 394 363 IF (ierr .NE. NF_NOERR) THEN 395 PRINT*, "lect_start_archive: Le champ <rlatv> est absent"364 PRINT*, "lect_start_archive: Field <rlatv> not found" 396 365 CALL abort 397 366 ENDIF … … 402 371 #endif 403 372 IF (ierr .NE. NF_NOERR) THEN 404 PRINT*, "lect_start_archive: Lecture echouee pour<rlatv>"373 PRINT*, "lect_start_archive: Failed loading <rlatv>" 405 374 CALL abort 406 375 ENDIF … … 413 382 ierr = NF_INQ_VARID (nid, "aps", nvarid) 414 383 IF (ierr .NE. NF_NOERR) THEN 415 PRINT*, "lect_start_archive: Le champ <aps> est absent"384 PRINT*, "lect_start_archive: Field <aps> not found" 416 385 apsold=0 417 386 PRINT*, "<aps> set to 0" … … 423 392 #endif 424 393 IF (ierr .NE. NF_NOERR) THEN 425 PRINT*, "lect_start_archive: Lecture echouee pour<aps>"394 PRINT*, "lect_start_archive: Failed loading <aps>" 426 395 ENDIF 427 396 ENDIF … … 429 398 ierr = NF_INQ_VARID (nid, "bps", nvarid) 430 399 IF (ierr .NE. NF_NOERR) THEN 431 PRINT*, "lect_start_archive: Le champ <bps> est absent"400 PRINT*, "lect_start_archive: Field <bps> not found" 432 401 PRINT*, "It must be an old start_archive, lets look for sig_s" 433 402 ierr = NF_INQ_VARID (nid, "sig_s", nvarid) … … 443 412 #endif 444 413 IF (ierr .NE. NF_NOERR) THEN 445 PRINT*, "lect_start_archive: Lecture echouee pour<bps>"414 PRINT*, "lect_start_archive: Failed loading <bps>" 446 415 CALL abort 447 416 END IF … … 532 501 ierr=NF_INQ_VARID(nid,"preskim",nvarid) 533 502 IF (ierr .NE. NF_NOERR) THEN 534 PRINT*, "lect_start_archive: Le champ <preskim> est absent"503 PRINT*, "lect_start_archive: Field <preskim> not found" 535 504 CALL abort 536 505 ENDIF … … 541 510 #endif 542 511 IF (ierr .NE. NF_NOERR) THEN 543 PRINT*, "lect_start_archive: Lecture echouee pour<preskim>"512 PRINT*, "lect_start_archive: Failed reading <preskim>" 544 513 CALL abort 545 514 ENDIF … … 551 520 ierr = NF_INQ_VARID (nid, "phisinit", nvarid) 552 521 IF (ierr .NE. NF_NOERR) THEN 553 PRINT*, "lect_start_archive: Le champ <phisinit> est absent"522 PRINT*, "lect_start_archive: Field <phisinit> not found" 554 523 CALL abort 555 524 ENDIF … … 560 529 #endif 561 530 IF (ierr .NE. NF_NOERR) THEN 562 PRINT*, "lect_start_archive: Lecture echouee pour<phisinit>"531 PRINT*, "lect_start_archive: Failed loading <phisinit>" 563 532 CALL abort 564 533 ENDIF … … 579 548 ierr = NF_INQ_DIMID (nid, "temps", nvarid) 580 549 IF (ierr .NE. NF_NOERR) THEN 581 PRINT*, "lect_start_archive: Le champ <Time> est absent"550 PRINT*, "lect_start_archive: Field <Time> not found" 582 551 CALL abort 583 552 endif … … 594 563 #endif 595 564 IF (ierr .NE. NF_NOERR) THEN 596 PRINT*, "lect_start_archive: Lecture echouee pour<Time>"565 PRINT*, "lect_start_archive: Failed loading <Time>" 597 566 CALL abort 598 567 ENDIF … … 600 569 write(*,*) 601 570 write(*,*) 602 write(*,*) ' Differentes dates des etats initiaux stockes:'603 write(*,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '571 write(*,*) 'Available dates for the stored initial conditions:' 572 write(*,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 604 573 pi=2.*ASIN(1.) 605 574 do i=1,timelen 606 575 c call solarlong(timelist(i),sollong(i)) 607 576 c sollong(i) = sollong(i)*180./pi 608 write(*,*) ' etat initial au jour martien' ,int(timelist(i))577 write(*,*) 'initial state for day ' ,int(timelist(i)) 609 578 c write(*,6) nint(timelist(i)),nint(mod(timelist(i),669)), 610 579 c . sollong(i) … … 614 583 615 584 write(*,*) 616 write(*,*) 'Choi x de ladate'585 write(*,*) 'Choice for the date' 617 586 123 read(*,*,iostat=ierr) date 618 587 if(ierr.ne.0) goto 123 … … 627 596 write(*,*) 628 597 write(*,*) 629 write(*,*) 'He alors... Y sait pas lire !?!'598 write(*,*) "Wrong value... can't you read !?!" 630 599 write(*,*) 631 write(*,*) ' Differentes dates des etats initiaux stockes:'632 write(*,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '600 write(*,*) 'Available dates for the stored initial conditions:' 601 write(*,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 633 602 do i=1,timelen 634 write(*,*) ' etat initial au jour martien' ,nint(timelist(i))603 write(*,*) 'initial state for day ' ,nint(timelist(i)) 635 604 c write(*,6) nint(timelist(i)),nint(mod(timelist(i),669)) 636 605 end do … … 644 613 645 614 c----------------------------------------------------------------------- 646 c 5.1 Lecture des champs 2D (emis,ps,tsurf,Tg[10], qsurf )615 c 5.1 Lecture des champs 2D (emis,ps,tsurf,Tg[10], qsurf,tankCH4) 647 616 c----------------------------------------------------------------------- 648 617 … … 650 619 count=(/imold+1,jmold+1,1,0/) 651 620 652 653 621 ierr = NF_INQ_VARID (nid, "emis", nvarid) 654 622 IF (ierr .NE. NF_NOERR) THEN 655 PRINT*, "lect_start_archive: Le champ <emis> est absent"623 PRINT*, "lect_start_archive: Field <emis> not found" 656 624 CALL abort 657 625 ENDIF … … 662 630 #endif 663 631 IF (ierr .NE. NF_NOERR) THEN 664 PRINT*, "lect_start_archive: Lecture echouee pour<emis>"632 PRINT*, "lect_start_archive: Failed loading <emis>" 665 633 CALL abort 666 634 ENDIF … … 668 636 ierr = NF_INQ_VARID (nid, "ps", nvarid) 669 637 IF (ierr .NE. NF_NOERR) THEN 670 PRINT*, "lect_start_archive: Le champ <ps> est absent"638 PRINT*, "lect_start_archive: Field <ps> not found" 671 639 CALL abort 672 640 ENDIF … … 677 645 #endif 678 646 IF (ierr .NE. NF_NOERR) THEN 679 PRINT*, "lect_start_archive: Lecture echouee pour<ps>"647 PRINT*, "lect_start_archive: Failed loading <ps>" 680 648 CALL abort 681 649 ENDIF … … 683 651 ierr = NF_INQ_VARID (nid, "tsurf", nvarid) 684 652 IF (ierr .NE. NF_NOERR) THEN 685 PRINT*, "lect_start_archive: Le champ <tsurf> est absent"653 PRINT*, "lect_start_archive: Field <tsurf> not found" 686 654 CALL abort 687 655 ENDIF … … 692 660 #endif 693 661 IF (ierr .NE. NF_NOERR) THEN 694 PRINT*, "lect_start_archive: Lecture echouee pour<tsurf>"662 PRINT*, "lect_start_archive: Failed loading <tsurf>" 695 663 CALL abort 696 664 ENDIF … … 698 666 ierr = NF_INQ_VARID (nid, "q2surf", nvarid) 699 667 IF (ierr .NE. NF_NOERR) THEN 700 PRINT*, "lect_start_archive: Le champ <q2surf> est absent"668 PRINT*, "lect_start_archive: Field <q2surf> not found" 701 669 CALL abort 702 670 ENDIF … … 707 675 #endif 708 676 IF (ierr .NE. NF_NOERR) THEN 709 PRINT*, "lect_start_archive: Lecture echouee pour<q2surf>"677 PRINT*, "lect_start_archive: Failed loading <q2surf>" 710 678 CALL abort 711 679 ENDIF … … 721 689 call initial0((jmold+1)*(imold+1), qsurfold(1,1,iq)) 722 690 enddo 723 724 725 ! print*,'tname=',tname726 ! print*,'nid',nid727 ! print*,'nvarid',nvarid728 ! stop729 691 730 692 DO iq=1,nqtot … … 751 713 & " Failed loading <",trim(txt),">" 752 714 write (*,*) trim(txt),' is set to 0' 753 ! call initial0((jmold+1)*(imold+1), qsurfold(1,1,iq))754 715 ENDIF 755 716 756 717 ENDDO ! of DO iq=1,nqtot 757 718 c 719 ierr = NF_INQ_VARID (nid, "tankCH4", nvarid) 720 IF (ierr .NE. NF_NOERR) THEN 721 PRINT*, "lect_start_archive: Field <tankCH4> not found" 722 CALL abort 723 ENDIF 724 #ifdef NC_DOUBLE 725 ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,tankCH4old) 726 #else 727 ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,tqnkCH4old) 728 #endif 729 IF (ierr .NE. NF_NOERR) THEN 730 PRINT*, "lect_start_archive: Failed loading <tankCH4>" 731 CALL abort 732 ENDIF 758 733 759 734 !----------------------------------------------------------------------- … … 813 788 endif ! of if (olddepthdef) 814 789 815 !816 ! Read soil thermal inertias817 !818 ! if (.not.olddepthdef) then ! no thermal inertia data in "old" archives819 ! ierr=NF_INQ_VARID(nid,"inertiedat",nvarid)820 ! if (ierr.ne.NF_NOERR) then821 ! write(*,*)"lect_start_archive: Cannot find <inertiedat>"822 ! call abort823 ! else824 !#ifdef NC_DOUBLE825 ! ierr=NF_GET_VARA_DOUBLE(nid,nvarid,start,count,inertiedatold)826 !#else827 ! ierr=NF_GET_VARA_REAL(nid,nvarid,start,count,inertiedatold)828 !#endif829 ! endif ! of if (ierr.ne.NF_NOERR)830 ! endif831 832 833 790 c----------------------------------------------------------------------- 834 791 c 5.3 Read 3D upper chemistry fields, if needed … … 847 804 IF (ierr .NE. NF_NOERR) THEN ! H_up not found 848 805 849 PRINT*, "lect_start_archive: Le champ <H_up> est absent..."806 PRINT*, "lect_start_archive: Field <H_up> not found..." 850 807 IF (callchim) THEN 851 PRINT*, "... mais callchim=.TRUE. danscallphys.def !"852 PRINT*, " Verifiez start_archive.nc ou desactivezcallchim !"808 PRINT*, "... but callchim=.TRUE. in callphys.def !" 809 PRINT*, "Check start_archive.nc or deactivate callchim !" 853 810 CALL abort 854 811 ELSE … … 861 818 862 819 IF (.not.callchim) THEN 863 PRINT*, "lect_start_archive: Le champ <H_up> est present..."864 PRINT*, "... mais callchim=.FALSE. danscallphys.def !"865 PRINT*, " Si vous voulez gerer la chimie activezcallchim !"820 PRINT*, "lect_start_archive: Field <H_up> found..." 821 PRINT*, "... but callchim=.FALSE. in callphys.def !" 822 PRINT*, "If you want to have chemistry, activate callchim !" 866 823 ! CALL abort ! This is too violent to abort here we can start from an archive with chemistry and don't want to use it - JVO ! 867 824 ELSE … … 874 831 #endif 875 832 IF (ierr .NE. NF_NOERR) THEN 876 PRINT*, "lect_start_archive: Lecture echouee pour<H_up>"833 PRINT*, "lect_start_archive: Failed reading <H_up>" 877 834 CALL abort 878 835 ENDIF … … 882 839 ierr=NF_INQ_VARID(nid,trim(cnames(iq))//"_up",nvarid) 883 840 IF (ierr .NE. NF_NOERR) THEN 884 PRINT*, "lect_start_archive: Le champ<"885 &//trim(cnames(iq))//"_up> est absent..."841 PRINT*, "lect_start_archive: Field <" 842 &//trim(cnames(iq))//"_up> not found..." 886 843 CALL abort 887 844 ENDIF … … 894 851 #endif 895 852 IF (ierr .NE. NF_NOERR) THEN 896 PRINT*, "lect_start_archive: Lecture echouee pour<"853 PRINT*, "lect_start_archive: Failed reading <" 897 854 &//trim(cnames(iq))//"_up>" 898 855 CALL abort … … 916 873 ierr = NF_INQ_VARID (nid,"temp", nvarid) 917 874 IF (ierr .NE. NF_NOERR) THEN 918 PRINT*, "lect_start_archive: Le champ <temp> est absent"875 PRINT*, "lect_start_archive: Field <temp> not found" 919 876 CALL abort 920 877 ENDIF … … 925 882 #endif 926 883 IF (ierr .NE. NF_NOERR) THEN 927 PRINT*, "lect_start_archive: Lecture echouee pour<temp>"884 PRINT*, "lect_start_archive: Failed loading <temp>" 928 885 CALL abort 929 886 ENDIF … … 931 888 ierr = NF_INQ_VARID (nid,"u", nvarid) 932 889 IF (ierr .NE. NF_NOERR) THEN 933 PRINT*, "lect_start_archive: Le champ <u> est absent"890 PRINT*, "lect_start_archive: Field <u> not found" 934 891 CALL abort 935 892 ENDIF … … 940 897 #endif 941 898 IF (ierr .NE. NF_NOERR) THEN 942 PRINT*, "lect_start_archive: Lecture echouee pour<u>"899 PRINT*, "lect_start_archive: Failed loading <u>" 943 900 CALL abort 944 901 ENDIF … … 946 903 ierr = NF_INQ_VARID (nid,"v", nvarid) 947 904 IF (ierr .NE. NF_NOERR) THEN 948 PRINT*, "lect_start_archive: Le champ <v> est absent"905 PRINT*, "lect_start_archive: Field <v> not found" 949 906 CALL abort 950 907 ENDIF … … 955 912 #endif 956 913 IF (ierr .NE. NF_NOERR) THEN 957 PRINT*, "lect_start_archive: Lecture echouee pour<v>"914 PRINT*, "lect_start_archive: Failed loading <v>" 958 915 CALL abort 959 916 ENDIF … … 961 918 ierr = NF_INQ_VARID (nid,"q2atm", nvarid) 962 919 IF (ierr .NE. NF_NOERR) THEN 963 PRINT*, "lect_start_archive: Le champ <q2atm> est absent"920 PRINT*, "lect_start_archive: Field <q2atm> not found" 964 921 CALL abort 965 922 ENDIF … … 970 927 #endif 971 928 IF (ierr .NE. NF_NOERR) THEN 972 PRINT*, "lect_start_archive: Lecture echouee pour<q2atm>"929 PRINT*, "lect_start_archive: Failed loading <q2atm>" 973 930 CALL abort 974 931 ENDIF … … 1071 1028 1072 1029 write(*,*) 1073 write(*,*)' Ancienne grille: masse de l atm:',ptotalold1074 write(*,*)'N ouvelle grille: masse de l atm:',ptotal1030 write(*,*)'Old grid: atmospheric mass :',ptotalold 1031 write(*,*)'New grid: atmospheric mass :',ptotal 1075 1032 write (*,*) 'Ratio new atm./ old atm =', ptotal/ptotalold 1076 1033 write(*,*) … … 1429 1386 deallocate(ykim_upoldS) 1430 1387 1431 ! write(*,*)'lect_start_archive: END'1432 return1433 1388 end -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/newstart.F
r2136 r2366 39 39 use iniphysiq_mod, only: iniphysiq 40 40 use phyetat0_mod, only: phyetat0 41 use exner_hyb_m, only: exner_hyb 41 42 use tracer_h 42 43 implicit none … … 125 126 REAL :: xpn,xps,xppn(iim),xpps(iim) 126 127 REAL :: p3d(iip1, jjp1, llm+1) 127 REAL :: beta(iip1,jjp1,llm)128 128 ! REAL dteta(ip1jmp1,llm) 129 129 … … 542 542 & date,tsurf,tsoil,emis,q2, 543 543 & t,ucov,vcov,ps,teta,phisold_newgrid, 544 & q,qsurf, surfith,nid)544 & q,qsurf,tankCH4,surfith,nid) 545 545 write(*,*) "OK, read start_archive file" 546 546 ! copy soil thermal inertia … … 1120 1120 c----------------------------------------------------------------------- 1121 1121 1122 CALL exner_hyb(ip1jmp1, ps, p3d, beta,pks, pk, pkf)1122 CALL exner_hyb(ip1jmp1, ps, p3d, pks, pk, pkf) 1123 1123 ! Calcul de la temperature potentielle teta 1124 1124 -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F
r1903 r2366 22 22 USE comsoil_h 23 23 USE comchem_h, only : cnames, nkim, nlaykim_up, preskim, ykim_up 24 ! USE comgeomfi_h, ONLY: lati, long, area 25 ! use control_mod 26 ! use comgeomphy, only: initcomgeomphy 27 ! to use 'getin' 28 USE ioipsl_getincom 24 USE ioipsl_getincom, only: getin 29 25 USE planete_mod, only: year_day 30 26 USE mod_const_mpi, ONLY: COMM_LMDZ … … 35 31 USE temps_mod, ONLY: day_ini 36 32 USE iniphysiq_mod, ONLY: iniphysiq 33 use phys_state_var_mod, only: phys_state_var_init 37 34 use phyetat0_mod, only: phyetat0 38 35 use tracer_h 36 use exner_hyb_m, only: exner_hyb 39 37 implicit none 40 38 … … 44 42 include "comdissip.h" 45 43 include "comgeom.h" 46 !#include "control.h" 47 48 !#include "dimphys.h" 49 !#include "planete.h" 50 !#include"advtrac.h" 44 51 45 include "netcdf.inc" 52 46 c----------------------------------------------------------------------- … … 62 56 REAL pk(ip1jmp1,llm) 63 57 REAL pkf(ip1jmp1,llm) 64 REAL beta(iip1,jjp1,llm)65 58 REAL phis(ip1jmp1) ! geopotentiel au sol 66 59 REAL masse(ip1jmp1,llm) ! masse de l'atmosphere … … 262 255 Lmodif=0 263 256 257 ! Allocate saved arrays (as in firstcall of physiq) 258 call phys_state_var_init(nqtot) 259 264 260 ! Initialize tracer names, indexes and properties 265 261 CALL initracer2(nqtot,tname) … … 312 308 313 309 CALL pression(ip1jmp1, ap, bp, ps, p3d) 314 call exner_hyb(ip1jmp1, ps, p3d, beta,pks, pk, pkf)310 call exner_hyb(ip1jmp1, ps, p3d, pks, pk, pkf) 315 311 316 312 c======================================================================= -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/write_archive.F
r1886 r2366 37 37 implicit none 38 38 39 #include "dimensions.h"40 #include "paramet.h"41 #include "comgeom.h"42 #include "netcdf.inc"39 include "dimensions.h" 40 include "paramet.h" 41 include "comgeom.h" 42 include "netcdf.inc" 43 43 44 44 c----------------------------------------------------------------------- … … 83 83 84 84 write (*,*) "=====================" 85 write (*,*) " creation de",nom85 write (*,*) "defining ",nom 86 86 call def_var(nid,nom,titre,unite,4,id,varid,ierr) 87 87 … … 113 113 114 114 if (ierr.ne.NF_NOERR) then 115 write(*,*) "***** PUT_VAR matterin write_archive"116 write(*,*) "***** with ", nom," ",nf_STRERROR(ierr)115 write(*,*) "***** PUT_VAR problem in write_archive" 116 write(*,*) "***** with ",trim(nom)," ",nf_STRERROR(ierr) 117 117 call abort 118 118 endif … … 140 140 ! define the variable 141 141 write(*,*)"=====================" 142 write(*,*)"defining ",nom142 write(*,*)"defining variable ",trim(nom) 143 143 call def_var(nid,nom,titre,unite,4,id,varid,ierr) 144 144 … … 183 183 ! define the variable 184 184 write(*,*)"=====================" 185 write(*,*)"defining ",nom185 write(*,*)"defining variable ",trim(nom) 186 186 call def_var(nid,nom,titre,unite,4,id,varid,ierr) 187 187 … … 203 203 ierr= NF_PUT_VARA_REAL(nid,varid,corner,edges,px) 204 204 #endif 205 205 206 206 207 … … 222 223 223 224 write (*,*) "=====================" 224 write (*,*) " creation de ",nom225 write (*,*) "defining variable ",trim(nom) 225 226 226 227 call def_var(nid,nom,titre,unite,3,id,varid,ierr) … … 243 244 244 245 if (ierr.ne.NF_NOERR) then 245 write(*,*) "***** PUT_VAR matterin write_archive"246 write(*,*) "***** PUT_VAR problem in write_archive" 246 247 write(*,*) "***** with ",nom,nf_STRERROR(ierr) 247 248 call abort … … 264 265 265 266 write (*,*) "=====================" 266 write (*,*) " creation de ",nom267 write (*,*) "defining variable ",trim(nom) 267 268 268 269 call def_var(nid,nom,titre,unite,1,id,varid,ierr) … … 279 280 #endif 280 281 if (ierr.ne.NF_NOERR) then 281 write(*,*) "***** PUT_VAR matterin write_archive"282 write(*,*) "***** PUT_VAR problem in write_archive" 282 283 write(*,*) "***** with ",nom,nf_STRERROR(ierr) 283 284 call abort … … 289 290 endif ! of if (dim.eq.3) else if (dim.eq.-3) .... 290 291 291 return292 292 end 293 293
Note: See TracChangeset
for help on using the changeset viewer.