Changeset 3872


Ignore:
Timestamp:
Apr 12, 2021, 12:40:14 PM (3 years ago)
Author:
oboucher
Message:

Last modifications for the CO2/INCA (inco) case

Location:
LMDZ6/trunk/libf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d_common/infotrac.F90

    r3870 r3872  
    155155          WRITE(lunout,*) 'Incoherence between type_trac and config_inca. Model stops. Modify run.def'
    156156          CALL abort_gcm('infotrac_init','Incoherence between type_trac and config_inca',1)
    157        END IF
     157       ENDIF
    158158#ifndef INCA
    159159       WRITE(lunout,*) 'To run this option you must add cpp key INCA and compile with INCA code'
     
    181181          WRITE(lunout,*) 'Incoherence between type_trac and config_inca. Model stops. Modify run.def'
    182182          CALL abort_gcm('infotrac_init','Incoherence between type_trac and config_inca',1)
    183        END IF
     183       ENDIF
    184184#ifndef INCA
    185185       WRITE(lunout,*) 'To run this option you must add cpp key INCA and compilewith INCA code'
     
    189189       WRITE(lunout,*) 'type_trac=',type_trac,' not possible. Model stops'
    190190       CALL abort_gcm('infotrac_init','bad parameter',1)
    191     END IF
     191    ENDIF
    192192
    193193    ! Test if config_inca is other then none for run without INCA
     
    195195       WRITE(lunout,*) 'config_inca will now be changed to none as you do not couple with INCA model'
    196196       config_inca='none'
    197     END IF
     197    ENDIF
    198198
    199199!-----------------------------------------------------------------------
     
    204204!-----------------------------------------------------------------------
    205205    IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag' .OR. type_trac == 'co2i') THEN
    206        IF (type_trac=='co2i') THEN              ! ModThL
     206       IF (type_trac=='co2i') THEN
    207207          nqCO2 = 1
    208208       ELSE
     
    234234!>jyg
    235235    ELSE ! type_trac=inca or inco
    236        IF (type_trac=='inco') THEN              ! ModThL
     236       IF (type_trac=='inco') THEN
    237237          nqCO2 = 1
    238238       ELSE
     
    259259          CALL abort_gcm('infotrac_init','Bad number of water phases',1)
    260260          ENDIF
    261        END IF
     261       ENDIF
    262262       ! nbtr has been read from INCA by init_const_lmdz() in gcm.F
    263263#ifdef INCA
     
    267267#endif
    268268       nbtr=nqINCA+nqCO2
    269 
     269       nqtrue=nbtr+nqo
    270270       WRITE(lunout,*) trim(modname),': nqo = ',nqo
    271271       WRITE(lunout,*) trim(modname),': nbtr = ',nbtr
    272272       WRITE(lunout,*) trim(modname),': nqtrue = ',nqtrue
    273273       WRITE(lunout,*) trim(modname),': nqCO2 = ',nqCO2
    274        ALLOCATE(hadv_inca(nqINCA), vadv_inca(nqINCA), conv_flg_inca(nqINCA), pbl_flg_inca(nqINCA), solsym_inca(nqINCA))         ! Mod ThL
     274       WRITE(lunout,*) trim(modname),': nqINCA = ',nqINCA
     275       ALLOCATE(hadv_inca(nqINCA), vadv_inca(nqINCA), conv_flg_inca(nqINCA), pbl_flg_inca(nqINCA), solsym_inca(nqINCA))
    275276    ENDIF   ! type_trac 'inca' ou 'inco'
    276277!>jyg
    277278
    278279    IF ((planet_type=="earth").and.(nqtrue < 2)) THEN
    279        WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum'
     280       WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowed. 2 tracers is the minimum'
    280281       CALL abort_gcm('infotrac_init','Not enough tracers',1)
    281     END IF
     282    ENDIF
    282283   
    283284!jyg<
     
    287288!!       CALL Init_chem_rep_trac(nbtr)
    288289!!#endif
    289 !!    END IF
     290!!    ENDIF
    290291!>jyg
    291292       
     
    372373             write(lunout,*) 'tnom_transp(iq)=<',trim(tnom_transp(iq)),'>'
    373374
    374           END DO !DO iq=1,nqtrue
     375          ENDDO!DO iq=1,nqtrue
    375376          CLOSE(90) 
    376377
     
    400401          tnom_transp(1) = 'dummy'
    401402         endif ! of if (planet_type=="earth")
    402        END IF
     403       ENDIF
    403404       
    404405       WRITE(lunout,*) trim(modname),': Valeur de traceur.def :'
     
    469470       CALL Init_chem_rep_trac(nbtr,nqo,tnom_0)
    470471#endif
    471     END IF
     472    ENDIF
    472473!
    473474! Allocate variables depending on nbtr
     
    485486! dans traceur.def
    486487       IF (ierr .eq. 0) then
    487           DO iq=1,nqo
     488          DO iq=1,nqo+nqCO2
    488489
    489490             write(*,*) 'infotrac 237: iq=',iq
     
    526527             write(lunout,*) 'tnom_transp(iq)=<',trim(tnom_transp(iq)),'>'
    527528
    528           END DO !DO iq=1,nqo
     529          ENDDO !DO iq=1,nqo
    529530          CLOSE(90) 
    530531       ELSE  !! if traceur.def doesn't exist
     
    543544            hadv_inca, &
    544545            vadv_inca, &
    545             conv_flg_inca, &                            ! ModThL
    546             pbl_flg_inca,  &                            ! ModThL
    547             solsym_inca)                                ! ModThL
    548        conv_flg(1+nqCO2:nbtr) = conv_flg_inca           ! ModThL
    549        pbl_flg(1+nqCO2:nbtr) = pbl_flg_inca             ! ModThL
    550        solsym(1+nqCO2:nbtr) = solsym_inca               ! ModThL
    551        IF (type_trac == 'inco') THEN            ! ModThL
    552           conv_flg(1:nqCO2) = 1                 ! ModThL
    553           pbl_flg(1:nqCO2) = 1                  ! ModThL
    554           solsym(1:nqCO2) = 'CO2'               ! ModThL
    555        ENDIF                                    ! ModThL
    556 
     546            conv_flg_inca, &
     547            pbl_flg_inca,  &
     548            solsym_inca)
     549
     550       conv_flg(1+nqCO2:nbtr) = conv_flg_inca
     551       pbl_flg(1+nqCO2:nbtr) = pbl_flg_inca
     552       solsym(1+nqCO2:nbtr) = solsym_inca
     553
     554       IF (type_trac == 'inco') THEN
     555          conv_flg(1:nqCO2) = 1
     556          pbl_flg(1:nqCO2) = 1
     557          solsym(1:nqCO2) = 'CO2'
     558       ENDIF
    557559#endif
    558560
    559561!jyg<
    560        DO iq = nqo+nqCO2+1, nqtrue      ! ModThL
    561           hadv(iq) = hadv_inca(iq-nqo-nqCO2)            ! ModThL
    562           vadv(iq) = vadv_inca(iq-nqo-nqCO2)            ! ModThL
    563           tnom_0(iq)=solsym(iq-nqo-nqCO2)               ! ModThL
     562       DO iq = nqo+nqCO2+1, nqtrue
     563          hadv(iq) = hadv_inca(iq-nqo-nqCO2)
     564          vadv(iq) = vadv_inca(iq-nqo-nqCO2)
     565          tnom_0(iq)=solsym_inca(iq-nqo-nqCO2)
    564566          tnom_transp(iq) = 'air'
    565567       END DO
    566568
    567     END IF ! (type_trac == 'inca' or 'inco')
     569    ENDIF ! (type_trac == 'inca' or 'inco')
    568570
    569571!-----------------------------------------------------------------------
     
    585587          WRITE(lunout,*) trim(modname),': This choice of advection schema is not available',iq,hadv(iq),vadv(iq)
    586588          CALL abort_gcm('infotrac_init','Bad choice of advection schema - 1',1)
    587        END IF
     589       ENDIF
    588590    END DO
    589591   
     
    601603       ! The true number of tracers is also the total number
    602604       nqtot = nqtrue
    603     END IF
     605    ENDIF
    604606
    605607!
     
    627629
    628630          CALL abort_gcm('infotrac_init','Bad choice of advection schema - 2',1)
    629        END IF
     631       ENDIF
    630632     
    631633       str1=tnom_0(iq)
     
    635637       ELSE
    636638          ttext(new_iq)=trim(tnom_0(iq))//descrq(iadv(new_iq))
    637        END IF
     639       ENDIF
    638640
    639641       ! schemas tenant compte des moments d'ordre superieur
     
    653655             tname(new_iq)=trim(str1)//txtp(jq)
    654656          END DO
    655        END IF
     657       ENDIF
    656658    END DO
    657659
     
    688690          WRITE(lunout,*)trim(modname),'STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ'
    689691          CALL abort_gcm('infotrac_init','In this version iadv=14 is only permitted for water vapour!',1)
    690        END IF
     692       ENDIF
    691693    END DO
    692694
  • LMDZ6/trunk/libf/phylmd/infotrac_phy.F90

    r3870 r3872  
    135135    CHARACTER(len=4),INTENT(IN) :: type_trac_
    136136    INTEGER,INTENT(IN) :: niadv_ (nqtot_) ! equivalent dyn / physique
    137     INTEGER,INTENT(IN) :: conv_flg_(nbtr_)      ! ModThL
    138     INTEGER,INTENT(IN) :: pbl_flg_(nbtr_)       ! ModThL
    139     CHARACTER(len=8),INTENT(IN) :: solsym_(nbtr_)       ! ModThL
     137    INTEGER,INTENT(IN) :: conv_flg_(nbtr_)
     138    INTEGER,INTENT(IN) :: pbl_flg_(nbtr_)
     139    CHARACTER(len=8),INTENT(IN) :: solsym_(nbtr_)
    140140    ! Isotopes:
    141141    INTEGER,INTENT(IN) :: nqfils_(nqtot_)
     
    168168    nqo=nqo_
    169169    nbtr=nbtr_
    170     nqCO2=nqCO2_        ! ModThL
     170    nqCO2=nqCO2_
    171171#ifdef CPP_StratAer
    172172    nbtr_bin=nbtr_bin_
     
    192192     
    193193    IF(prt_level.ge.1) THEN
    194       write(lunout,*) TRIM(modname)//": nqtot,nqo,nbtr,nqCO2",nqtot,nqo,nbtr,nqCO2      ! ModThL
     194      write(lunout,*) TRIM(modname)//": nqtot,nqo,nbtr,nqCO2",nqtot,nqo,nbtr,nqCO2
    195195    ENDIF
    196196   
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r3870 r3872  
    19431943               klon, &
    19441944               nqtot, &
    1945                nqo+nqCO2, &     ! ModThL
     1945               nqo+nqCO2, &
    19461946               pdtphys, &
    19471947               annee_ref, &
     
    37813781            nbp_lon, &
    37823782            nbp_lat-1, &
    3783             tr_seri(:,:,1+nqCO2:nbtr), &                ! ModThL
     3783            tr_seri(:,:,1+nqCO2:nbtr), &
    37843784            ftsol, &
    37853785            paprs, &
     
    49234923    ENDDO
    49244924    !
    4925     IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN      ! ModThL
     4925    IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN
    49264926#ifdef INCA
    49274927       CALL VTe(VTphysiq)
     
    49324932            pplay, &
    49334933            t_seri, &
    4934             tr_seri(:,:,1+nqCO2:nbtr), &        ! ModThL
     4934            tr_seri(:,:,1+nqCO2:nbtr), &
    49354935            nbtr, &
    49364936            paprs, &
Note: See TracChangeset for help on using the changeset viewer.