Ignore:
Timestamp:
Dec 23, 2021, 6:54:17 PM (2 years ago)
Author:
dcugnet
Message:

Second commit for new tracers.

  • include most of the keys in the tracers descriptor vector "tracers(:)".
  • fix in phylmdiso/cv3_routines: fq_* variables were used where their fxt_* counterparts were expected.
  • multiple IF(nqdesc(iq)>0) and IF(nqfils(iq)>0) tests suppressed, because they are not needed: "do ... enddo" loops with 0 upper bound are not executed.
  • remove French accents from comments (encoding problem) in phylmdiso/cv3_routines and phylmdiso/cv30_routines.
  • modifications in "isotopes_verif_mod", where the call to function "iso_verif_tag17_q_deltad_chn" in "iso_verif_tag17_q_deltad_chn" was not detected at linking stage, although defined in the same module (?).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d/iniacademic.F90

    r3976 r4050  
    55
    66  USE filtreg_mod, ONLY: inifilr
    7   USE infotrac
     7  USE infotrac,    ONLY: nqtot,niso_possibles,ok_isotopes,ok_iso_verif,tnat,alpha_ideal, &
     8        & iqiso,iso_indnum, tracers
    89  USE control_mod, ONLY: day_step,planet_type
    910#ifdef CPP_IOIPSL
     
    6162  real tetastrat ! potential temperature in the stratosphere, in K
    6263  real tetajl(jjp1,llm)
    63   INTEGER i,j,l,lsup,ij
     64  INTEGER i,j,l,lsup,ij, iq
    6465
    6566  REAL teta0,ttp,delt_y,delt_z,eps ! Constantes pour profil de T
     
    7071
    7172  real zz,ran1
    72   integer idum
     73  integer idum, iqParent, iName, iZone, iPhase
    7374
    7475  REAL zdtvr
     
    275276        if (planet_type=="earth") then
    276277           ! Earth: first two tracers will be water
    277            do i=1,nqtot
    278               if (i == 1) q(:,:,i)=1.e-10
    279               if (i == 2) q(:,:,i)=1.e-15
    280               if (i.gt.2) q(:,:,i)=0.
     278           do iq=1,nqtot
     279              q(:,:,iq)=0.
     280              IF(tracers(iq)%name == 'H2Ov') q(:,:,iq)=1.e-10
     281              IF(tracers(iq)%name == 'H2Ol') q(:,:,iq)=1.e-15
    281282
    282283              ! CRisi: init des isotopes
    283284              ! distill de Rayleigh très simplifiée
    284               if (ok_isotopes) then
    285                 if ((iso_num(i).gt.0).and.(zone_num(i).eq.0)) then         
    286                    q(:,:,i)=q(:,:,iqpere(i))             &
    287       &                  *tnat(iso_num(i))               &
    288       &                  *(q(:,:,iqpere(i))/30.e-3)      &
    289       &                  **(alpha_ideal(iso_num(i))-1)
    290                 endif               
    291                 if ((iso_num(i).gt.0).and.(zone_num(i).eq.1)) then
    292                   q(:,:,i)=q(:,:,iqiso(iso_indnum(i),phase_num(i)))
    293                 endif
     285              iName = tracers(iq)%iso_iName
     286              iZone = tracers(iq)%iso_iZone
     287              iPhase= tracers(iq)%iso_iPhase
     288              iqParent = tracers(iq)%iqParent
     289              if (ok_isotopes .AND. iName > 0) then
     290                if (iZone == 0) q(:,:,iq) = q(:,:,iqParent)*tnat(iName) &
     291                                          *(q(:,:,iqParent)/30.e-3)**(alpha_ideal(iName)-1)
     292                if (iZone == 1) q(:,:,iq) = q(:,:,iqiso(iso_indnum(iq),iPhase))
    294293              endif !if (ok_isotopes) then
    295294
Note: See TracChangeset for help on using the changeset viewer.