Changeset 5099 for LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h
- Timestamp:
- Jul 22, 2024, 9:29:09 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1Dconv.h
r4593 r5099 1 ! 1 2 2 ! $Id$ 3 ! 3 4 4 subroutine get_uvd(itap,dtime,file_forctl,file_fordat, & 5 5 & ht,hq,hw,hu,hv,hthturb,hqturb, & 6 6 & Ts,imp_fcg,ts_fcg,Tp_fcg,Turb_fcg) 7 ! 7 8 8 implicit none 9 9 … … 109 109 real Tsbef 110 110 save htbef,hqbef,hwbef,hubef,hvbef,hthturbbef,hqturbbef 111 ! 111 112 112 real timeaft,timebef 113 113 save timeaft,timebef … … 131 131 real hqturb_mes(100) !tendance horizontale d humidite, due aux 132 132 !flux turbulents 133 ! 133 134 134 !--------------------------------------------------------------------- 135 135 ! variable argument de la subroutine copie … … 149 149 !*** on determine le pas du meso_NH correspondant au nouvel itap *** 150 150 !*** pour aller chercher les champs dans rdgrads *** 151 ! 151 152 152 time=time0+itap*dtime 153 153 !c temps=int(time/dt+1) … … 156 156 pas=min(temps,pasmax-1) 157 157 print*,'le pas Meso est:',pas 158 ! 159 ! 158 159 160 160 !=================================================================== 161 ! 161 162 162 !*** on remplit les champs before avec les champs after du pas *** 163 163 !*** precedent en format gcm *** … … 190 190 & ,hu_mes,hv_mes,hthturb_mes,hqturb_mes & 191 191 & ,ts_fcg,ts_subr,imp_fcg,Turb_fcg) 192 !193 192 194 193 if(Tp_fcg) then … … 203 202 enddo 204 203 endif ! Turb_fcg 205 ! 204 206 205 print*,'ht_mes ',(ht_mes(i),i=1,nblvlm) 207 206 print*,'hq_mes ',(hq_mes(i),i=1,nblvlm) … … 286 285 ts_subr = ((timeaft-time)*tsbef + (time-timebef)*tsaft)/dt 287 286 endif ! temps.ge.pasmax 288 ! 287 289 288 print *,' time,timebef,timeaft',time,timebef,timeaft 290 289 print *,' ht,htbef,htaft,hthturb,hthturbbef,hthturbaft' … … 298 297 & hqturb(j),hqturbbef(j),hqturbaft(j) 299 298 enddo 300 ! 299 301 300 !------------------------------------------------------------------- 302 ! 301 303 302 IF (Ts_fcg) Ts = Ts_subr 304 303 return 305 ! 304 306 305 !----------------------------------------------------------------------- 307 306 ! on sort les champs de "convergence" pour l instant initial 'in' … … 312 311 & imp_fcg,ts_fcg,Tp_fcg,Turb_fcg) 313 312 print*,'le pas itap est:',itap 314 ! 313 315 314 !=================================================================== 316 ! 315 317 316 write(*,'(a)') 'OPEN '//file_forctl 318 317 open(97,FILE=file_forctl,FORM='FORMATTED') 319 ! 318 320 319 !------------------ 321 320 do i=1,1000 … … 355 354 pasprev=in-1 356 355 time0=dt*pasprev 357 ! 356 358 357 close(98) 359 ! 358 360 359 write(*,'(a)') 'OPEN '//file_fordat 361 360 open(99,FILE=file_fordat,FORM='UNFORMATTED', & … … 371 370 print *, 'get_uvd : rdgrads ->' 372 371 print *, tp_fcg 373 ! 372 374 373 ! following commented out because we have temperature already in ARM case 375 374 ! (otherwise this is the potential temperature ) … … 445 444 close(99) 446 445 close(98) 447 ! 446 448 447 !------------------------------------------------------------------- 449 ! 450 ! 448 449 451 450 100 IF (Ts_fcg) Ts = Ts_subr 452 451 return 453 ! 452 454 453 999 continue 455 454 stop 'erreur lecture, file forcing.ctl' … … 565 564 SUBROUTINE mesolupbis(file_forctl) 566 565 implicit none 567 ! 566 568 567 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 569 ! 568 570 569 ! Lecture descripteur des donnees MESO-NH (forcing.ctl): 571 570 ! ------------------------------------------------------- 572 ! 571 573 572 ! Cette subroutine lit dans le fichier de controle "essai.ctl" 574 573 ! et affiche le nombre de niveaux du Meso-NH ainsi que les valeurs 575 574 ! des pressions en milieu de couche du Meso-NH (en Pa puis en hPa). 576 575 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 577 ! 576 578 577 INTEGER nblvlm !nombre de niveau de pression du mesoNH 579 578 REAL playm(100) !pression en Pa milieu de chaque couche Meso-NH … … 591 590 lu=9 592 591 open(lu,file=file_forctl,form='formatted') 593 ! 592 594 593 do i=1,1000 595 594 read(lu,1000,end=999) a 596 595 if (a .eq. 'ZDEF') go to 100 597 596 enddo 598 ! 597 599 598 100 backspace(lu) 600 599 print*,' DESCRIPTION DES 2 MODELES : ' 601 600 print*,' ' 602 ! 601 603 602 read(lu,2000) aaa 604 603 2000 format (a80) … … 607 606 read(anblvl,*) nblvlm 608 607 609 !610 608 print*,'nbre de niveaux de pression Meso-NH :',nblvlm 611 609 print*,' ' 612 610 print*,'pression en Pa de chaque couche du meso-NH :' 613 ! 611 614 612 read(lu,*) (playm(mlz),mlz=1,nblvlm) 615 613 ! Si la pression est en HPa, la multiplier par 100 … … 620 618 endif 621 619 print*,(playm(mlz),mlz=1,nblvlm) 622 ! 620 623 621 1000 format (a4) 624 622 1001 format(5x,i2) 625 ! 623 626 624 print*,' ' 627 625 do mlzh=1,nblvlm 628 626 hplaym(mlzh)=playm(mlzh)/100. 629 627 enddo 630 ! 628 631 629 print*,'pression en hPa de chaque couche du meso-NH: ' 632 630 print*,(hplaym(mlzh),mlzh=1,nblvlm) 633 ! 631 634 632 close (lu) 635 633 return 636 ! 634 637 635 999 stop 'erreur lecture des niveaux pression des donnees' 638 636 end … … 645 643 real hthtur(nl),hqtur(nl) 646 644 real ts 647 ! 645 648 646 INTEGER k 649 ! 647 650 648 LOGICAL imp_fcg,ts_fcg,Turb_fcg 651 ! 649 652 650 icomp = icount 653 ! 654 ! 651 652 655 653 do k=1,nl 656 654 icomp=icomp+1 … … 667 665 read(itape,rec=icomp)hQ(k) 668 666 enddo 669 ! 667 670 668 if(turb_fcg) then 671 669 do k=1,nl … … 679 677 endif 680 678 print *,' apres lecture hthtur, hqtur' 681 ! 679 682 680 if(imp_fcg) then 683 681 … … 692 690 693 691 endif 694 ! 692 695 693 do k=1,nl 696 694 icomp=icomp+1 697 695 read(itape,rec=icomp)hw(k) 698 696 enddo 699 ! 697 700 698 if(ts_fcg) then 701 699 icomp=icomp+1 702 700 read(itape,rec=icomp)ts 703 701 endif 704 ! 702 705 703 print *,' rdgrads ->' 706 704 … … 756 754 endif 757 755 enddo 758 ! 756 759 757 !c if (play(klev) .le. playm(nblvlm)) then 760 758 !c mlz=nblvlm-1 … … 765 763 !c * /(playm(mlz+1)-playm(mlz)) 766 764 !c endif 767 ! 765 768 766 print*,' ' 769 767 print*,' INTERPOLATION : ' … … 779 777 print*,'valeurs du deuxieme coef d"interpolation pour les 9 niveaux:' 780 778 print*,(coef2(k),k=1,klev) 781 ! 779 782 780 return 783 781 end … … 821 819 END 822 820 CHARACTER*(*) FUNCTION SPACES(STR,NSPACE) 823 ! 821 824 822 ! CERN PROGLIB# M433 SPACES .VERSION KERNFOR 4.14 860211 825 823 ! ORIG. 6/05/86 M.GOOSSENS/DD 826 ! 824 827 825 !- The function value SPACES returns the character string STR with 828 826 !- leading blanks removed and each occurence of one or more blanks 829 827 !- replaced by NSPACE blanks inside the string STR 830 ! 828 831 829 CHARACTER*(*) STR 832 ! 830 833 831 LENSPA = LEN(SPACES) 834 832 SPACES = ' ' … … 853 851 999 END 854 852 FUNCTION INDEXC(STR,SSTR) 855 ! 853 856 854 ! CERN PROGLIB# M433 INDEXC .VERSION KERNFOR 4.14 860211 857 855 ! ORIG. 26/03/86 M.GOOSSENS/DD 858 ! 856 859 857 !- Find the leftmost position where substring SSTR does not match 860 858 !- string STR scanning forward 861 ! 859 862 860 CHARACTER*(*) STR,SSTR 863 ! 861 864 862 LENS = LEN(STR) 865 863 LENSS = LEN(SSTR) 866 ! 864 867 865 DO 10 I=1,LENS-LENSS+1 868 866 IF (STR(I:I+LENSS-1).NE.SSTR) THEN … … 872 870 10 CONTINUE 873 871 INDEXC = 0 874 ! 872 875 873 999 END
Note: See TracChangeset
for help on using the changeset viewer.