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/dyn3dmem/iniacademic_loc.F90

    r3976 r4050  
    77  use exner_hyb_m, only: exner_hyb
    88  use exner_milieu_m, only: exner_milieu
    9   USE infotrac, ONLY: nqtot,niso_possibles,ok_isotopes,iqpere,ok_iso_verif,tnat,alpha_ideal, &
    10         & iqiso,phase_num,iso_indnum,iso_num,zone_num
     9  USE infotrac, ONLY: nqtot, niso_possibles, ok_isotopes, ok_iso_verif, tnat, alpha_ideal, &
     10                      iqiso, tracers, iso_indnum
    1111  USE control_mod, ONLY: day_step,planet_type
    1212  USE parallel_lmdz, ONLY: ijb_u, ije_u, ijb_v, ije_v
     
    6767  real tetastrat ! potential temperature in the stratosphere, in K
    6868  real tetajl(jjp1,llm)
    69   INTEGER i,j,l,lsup,ij
     69  INTEGER i,j,l,lsup,ij, iq, iName, iZone, iPhase, iqParent
    7070
    7171  REAL teta0,ttp,delt_y,delt_z,eps ! Constantes pour profil de T
     
    282282           ! Earth: first two tracers will be water
    283283
    284            do i=1,nqtot
    285               if (i == 1) q(ijb_u:ije_u,:,i)=1.e-10
    286               if (i == 2) q(ijb_u:ije_u,:,i)=1.e-15
    287               if (i.gt.2) q(ijb_u:ije_u,:,i)=0.
     284           do iq=1,nqtot
     285              q(ijb_u:ije_u,:,iq)=0.
     286              if (tracers(iq)%name == 'H2Ov') q(ijb_u:ije_u,:,iq)=1.e-10
     287              if (tracers(iq)%name == 'H2Ol') q(ijb_u:ije_u,:,iq)=1.e-15
    288288
    289289              ! CRisi: init des isotopes
    290290              ! distill de Rayleigh très simplifiée
    291               if (ok_isotopes) then
    292                 if ((iso_num(i).gt.0).and.(zone_num(i).eq.0)) then         
    293                    q(ijb_u:ije_u,:,i)=q(ijb_u:ije_u,:,iqpere(i))       &
    294       &                  *tnat(iso_num(i))                             &
    295       &                  *(q(ijb_u:ije_u,:,iqpere(i))/30.e-3)                              &
    296      &                   **(alpha_ideal(iso_num(i))-1)
    297                 endif               
    298                 if ((iso_num(i).gt.0).and.(zone_num(i).eq.1)) then
    299                   q(ijb_u:ije_u,:,i)=q(ijb_u:ije_u,:,iqiso(iso_indnum(i),phase_num(i)))
    300                 endif
     291              iName = tracers(iq)%iso_iName
     292              iZone = tracers(iq)%iso_iZone
     293              iPhase= tracers(iq)%iso_iPhase
     294              iqParent = tracers(iq)%iqParent
     295              if (ok_isotopes .AND. iName > 0) then
     296                if (iZone == 0) q(ijb_u:ije_u,:,iq) = q(ijb_u:ije_u,:,iqParent)*tnat(iName) &
     297                                                    *(q(ijb_u:ije_u,:,iqParent)/30.e-3)**(alpha_ideal(iName)-1)
     298                if (iZone == 1) q(ijb_u:ije_u,:,iq) = q(ijb_u:ije_u,:,iqiso(iso_indnum(iq),iPhase))
    301299              endif !if (ok_isotopes) then
    302300
Note: See TracChangeset for help on using the changeset viewer.