Changeset 3945 for LMDZ6/trunk/libf/dyn3d_common
- Timestamp:
- Jun 18, 2021, 5:24:43 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r3924 r3945 287 287 288 288 !jyg< 289 ! Transfert number of tracers to Reprobus290 !! IF (type_trac == 'repr') THEN291 !!#ifdef REPROBUS292 !! CALL Init_chem_rep_trac(nbtr)293 !!#endif294 !! ENDIF295 !>jyg296 289 297 290 ! … … 300 293 ALLOCATE(tnom_0(nqtrue), hadv(nqtrue), vadv(nqtrue),tnom_transp(nqtrue)) 301 294 302 !303 !jyg<304 !! ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), solsym(nbtr))305 !! conv_flg(:) = 1 ! convection activated for all tracers306 !! pbl_flg(:) = 1 ! boundary layer activated for all tracers307 !>jyg308 295 309 296 !----------------------------------------------------------------------- … … 334 321 !--------------------------------------------------------------------- 335 322 IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag' .OR. type_trac == 'co2i') THEN 323 336 324 IF(ierr.EQ.0) THEN 325 337 326 ! Continue to read tracer.def 338 327 DO iq=1,nqtrue … … 378 367 379 368 ENDDO!DO iq=1,nqtrue 369 380 370 CLOSE(90) 381 371 382 372 ELSE ! Without tracer.def, set default values 373 383 374 if (planet_type=="earth") then 384 375 ! for Earth, default is to have 4 tracers … … 405 396 tnom_transp(1) = 'dummy' 406 397 endif ! of if (planet_type=="earth") 398 407 399 ENDIF 408 400 … … 470 462 ! 471 463 464 ! Transfert number of tracers to Reprobus 465 IF (type_trac == 'repr') THEN 466 #ifdef REPROBUS 467 CALL Init_chem_rep_trac(nbtr,nqo,tnom_0) 468 #endif 469 ENDIF 470 ! 471 ! Allocate variables depending on nbtr 472 ! 473 ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), solsym(nbtr)) 474 conv_flg(:) = 1 ! convection activated for all tracers 475 pbl_flg(:) = 1 ! boundary layer activated for all tracers 476 477 IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN ! config_inca='aero' ou 'chem' 478 !>jyg 479 ! le module de chimie fournit les noms des traceurs 480 ! et les schemas d'advection associes. excepte pour ceux lus 481 ! dans traceur.def 482 IF (ierr .eq. 0) then 483 484 DO iq=1,nqo+nqCO2 485 486 write(*,*) 'infotrac 237: iq=',iq 487 ! CRisi: ajout du nom du fluide transporteur 488 ! mais rester retro compatible 489 READ(90,'(I2,X,I2,X,A)',IOSTAT=IOstatus) hadv(iq),vadv(iq),tchaine 490 write(lunout,*) 'iq,hadv(iq),vadv(iq)=',iq,hadv(iq),vadv(iq) 491 write(lunout,*) 'tchaine=',trim(tchaine) 492 write(*,*) 'infotrac 238: IOstatus=',IOstatus 493 if (IOstatus.ne.0) then 494 CALL abort_gcm('infotrac_init','Pb dans la lecture de traceur.def',1) 495 endif 496 ! Y-a-t-il 1 ou 2 noms de traceurs? -> On regarde s'il y a un 497 ! espace ou pas au milieu de la chaine. 498 continu=.true. 499 nouveau_traceurdef=.false. 500 iiq=1 501 502 do while (continu) 503 if (tchaine(iiq:iiq).eq.' ') then 504 nouveau_traceurdef=.true. 505 continu=.false. 506 else if (iiq.lt.LEN_TRIM(tchaine)) then 507 iiq=iiq+1 508 else 509 continu=.false. 510 endif 511 enddo 512 513 write(*,*) 'iiq,nouveau_traceurdef=',iiq,nouveau_traceurdef 514 515 if (nouveau_traceurdef) then 516 write(lunout,*) 'C''est la nouvelle version de traceur.def' 517 tnom_0(iq)=tchaine(1:iiq-1) 518 tnom_transp(iq)=tchaine(iiq+1:30) 519 else 520 write(lunout,*) 'C''est l''ancienne version de traceur.def' 521 write(lunout,*) 'On suppose que les traceurs sont tous d''air' 522 tnom_0(iq)=tchaine 523 tnom_transp(iq) = 'air' 524 endif 525 526 write(lunout,*) 'tnom_0(iq)=<',trim(tnom_0(iq)),'>' 527 write(lunout,*) 'tnom_transp(iq)=<',trim(tnom_transp(iq)),'>' 528 529 ENDDO !DO iq=1,nqo 530 CLOSE(90) 531 532 ELSE !! if traceur.def doesn't exist 533 534 tnom_0(1)='H2Ov' 535 tnom_transp(1) = 'air' 536 tnom_0(2)='H2Ol' 537 tnom_transp(2) = 'air' 538 hadv(1) = 10 539 hadv(2) = 10 540 vadv(1) = 10 541 vadv(2) = 10 542 543 ENDIF 544 545 #ifdef INCA 546 CALL init_transport( & 547 hadv_inca, & 548 vadv_inca, & 549 conv_flg_inca, & 550 pbl_flg_inca, & 551 solsym_inca) 552 553 conv_flg(1+nqCO2:nbtr) = conv_flg_inca 554 pbl_flg(1+nqCO2:nbtr) = pbl_flg_inca 555 solsym(1+nqCO2:nbtr) = solsym_inca 556 557 IF (type_trac == 'inco') THEN 558 conv_flg(1:nqCO2) = 1 559 pbl_flg(1:nqCO2) = 1 560 solsym(1:nqCO2) = 'CO2' 561 ENDIF 562 #endif 563 564 !jyg< 565 DO iq = nqo+nqCO2+1, nqtrue 566 hadv(iq) = hadv_inca(iq-nqo-nqCO2) 567 vadv(iq) = vadv_inca(iq-nqo-nqCO2) 568 tnom_0(iq)=solsym_inca(iq-nqo-nqCO2) 569 tnom_transp(iq) = 'air' 570 END DO 571 572 ENDIF ! (type_trac == 'inca' or 'inco') 573 472 574 !----------------------------------------------------------------------- 473 575 ! … … 575 677 WRITE(lunout,*) trim(modname),': Information stored in infotrac :' 576 678 WRITE(lunout,*) trim(modname),': iadv niadv tname ttext :' 679 577 680 DO iq=1,nqtot 578 WRITE(lunout,*) iadv(iq),niadv(iq),& 579 ' ',trim(tname(iq)),' ',trim(ttext(iq)) 681 WRITE(lunout,*) iadv(iq),niadv(iq), ' ',trim(tname(iq)),' ',trim(ttext(iq)) 580 682 END DO 581 683 … … 720 822 ! endif !if (ntraciso.gt.0) then 721 823 722 723 ! Transfert number of tracers to Reprobus724 IF (type_trac == 'repr') THEN725 #ifdef REPROBUS726 CALL Init_chem_rep_trac(nbtr,nqo,tnom_0)727 #endif728 ENDIF729 !730 ! Allocate variables depending on nbtr731 !732 ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), solsym(nbtr))733 conv_flg(:) = 1 ! convection activated for all tracers734 pbl_flg(:) = 1 ! boundary layer activated for all tracers735 !736 !! ELSE ! type_trac=inca : config_inca='aero' ou 'chem'737 !738 IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN ! config_inca='aero' ou 'chem'739 !>jyg740 ! le module de chimie fournit les noms des traceurs741 ! et les schemas d'advection associes. excepte pour ceux lus742 ! dans traceur.def743 IF (ierr .eq. 0) then744 DO iq=1,nqo+nqCO2745 746 write(*,*) 'infotrac 237: iq=',iq747 ! CRisi: ajout du nom du fluide transporteur748 ! mais rester retro compatible749 READ(90,'(I2,X,I2,X,A)',IOSTAT=IOstatus) hadv(iq),vadv(iq),tchaine750 write(lunout,*) 'iq,hadv(iq),vadv(iq)=',iq,hadv(iq),vadv(iq)751 write(lunout,*) 'tchaine=',trim(tchaine)752 write(*,*) 'infotrac 238: IOstatus=',IOstatus753 if (IOstatus.ne.0) then754 CALL abort_gcm('infotrac_init','Pb dans la lecture de traceur.def',1)755 endif756 ! Y-a-t-il 1 ou 2 noms de traceurs? -> On regarde s'il y a un757 ! espace ou pas au milieu de la chaine.758 continu=.true.759 nouveau_traceurdef=.false.760 iiq=1761 do while (continu)762 if (tchaine(iiq:iiq).eq.' ') then763 nouveau_traceurdef=.true.764 continu=.false.765 else if (iiq.lt.LEN_TRIM(tchaine)) then766 iiq=iiq+1767 else768 continu=.false.769 endif770 enddo771 write(*,*) 'iiq,nouveau_traceurdef=',iiq,nouveau_traceurdef772 if (nouveau_traceurdef) then773 write(lunout,*) 'C''est la nouvelle version de traceur.def'774 tnom_0(iq)=tchaine(1:iiq-1)775 tnom_transp(iq)=tchaine(iiq+1:30)776 else777 write(lunout,*) 'C''est l''ancienne version de traceur.def'778 write(lunout,*) 'On suppose que les traceurs sont tous d''air'779 tnom_0(iq)=tchaine780 tnom_transp(iq) = 'air'781 endif782 write(lunout,*) 'tnom_0(iq)=<',trim(tnom_0(iq)),'>'783 write(lunout,*) 'tnom_transp(iq)=<',trim(tnom_transp(iq)),'>'784 785 ENDDO !DO iq=1,nqo786 CLOSE(90)787 ELSE !! if traceur.def doesn't exist788 tnom_0(1)='H2Ov'789 tnom_transp(1) = 'air'790 tnom_0(2)='H2Ol'791 tnom_transp(2) = 'air'792 hadv(1) = 10793 hadv(2) = 10794 vadv(1) = 10795 vadv(2) = 10796 ENDIF797 798 #ifdef INCA799 CALL init_transport( &800 hadv_inca, &801 vadv_inca, &802 conv_flg_inca, &803 pbl_flg_inca, &804 solsym_inca)805 806 conv_flg(1+nqCO2:nbtr) = conv_flg_inca807 pbl_flg(1+nqCO2:nbtr) = pbl_flg_inca808 solsym(1+nqCO2:nbtr) = solsym_inca809 810 IF (type_trac == 'inco') THEN811 conv_flg(1:nqCO2) = 1812 pbl_flg(1:nqCO2) = 1813 solsym(1:nqCO2) = 'CO2'814 ENDIF815 #endif816 817 !jyg<818 DO iq = nqo+nqCO2+1, nqtrue819 hadv(iq) = hadv_inca(iq-nqo-nqCO2)820 vadv(iq) = vadv_inca(iq-nqo-nqCO2)821 tnom_0(iq)=solsym_inca(iq-nqo-nqCO2)822 tnom_transp(iq) = 'air'823 END DO824 825 ENDIF ! (type_trac == 'inca' or 'inco')826 827 824 !----------------------------------------------------------------------- 828 825 ! Finalize :
Note: See TracChangeset
for help on using the changeset viewer.