Changeset 4487 for LMDZ6/trunk


Ignore:
Timestamp:
Mar 30, 2023, 12:00:46 PM (21 months ago)
Author:
dcugnet
Message:

Fix the tracers(:)%isAdvected computation in the lInit=.TRUE. case.
Few cosmetic changes to make infotrac and infotrac_phy more similar, so more easily comparable.

Location:
LMDZ6/trunk/libf
Files:
2 edited

Legend:

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

    r4433 r4487  
    66   USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
    77        delPhase, niso, getKey, isot_type, readIsotopesFile, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &
    8         addPhase, iH2O, nbIso,  isoSelect, testTracersFiles, isoKeys, indexUpdate,   isoCheck, nzone, ntiso, isoName, &
    9         addKey
     8        addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate,   isoCheck, nbIso, ntiso, isoName
    109   IMPLICIT NONE
    1110
     
    169168!------------------------------------------------------------------------------------------------------------------------------
    170169   suff          = ['x ','y ','z ','xx','xy','xz','yy','yz','zz']
     170   descrq( 1:30) =  '   '
    171171   descrq( 1: 2) = ['LMV','BAK']
    172172   descrq(10:20) = ['VL1','VLP','FH1','FH2','VLH','   ','PPM','PPS','PPP','   ','SLP']
  • LMDZ6/trunk/libf/phylmd/infotrac_phy.F90

    r4432 r4487  
    44
    55   USE       strings_mod, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strIdx
    6    USE readTracFiles_mod, ONLY: trac_type, nphas, readTracersFiles, tracers, setGeneration, itZonIso, nbIso, tran0, delPhase, &
    7                         getKey, isot_type, nzone, readIsotopesFile, isotope, maxTableWidth, iqIsoPha, ntiso, ixIso, addPhase, &
    8                    indexUpdate, isoSelect, niso,  testTracersFiles, isoPhas, isoZone, isoName, isoKeys, iH2O, isoCheck, addKey
     6   USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
     7        delPhase, niso, getKey, isot_type, readIsotopesFile, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &
     8        addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate,   isoCheck, nbIso, ntiso, isoName
    99   IMPLICIT NONE
    1010
     
    2525   PUBLIC :: isoSelect, ixIso                              !--- Isotopes family selection tool + selected family index
    2626   !=== FOR ISOTOPES: Specific to water
    27    PUBLIC :: iH2O                                          !--- H2O isotopes index
     27   PUBLIC :: iH2O                                          !--- H2O isotopes class index
    2828   !=== FOR ISOTOPES: Depending on the selected isotopes family
    2929   PUBLIC :: isotope, isoKeys                              !--- Selected isotopes database + associated keys (cf. getKey)
     
    7171!  | component   | Name(s) of the merged/cumulated section(s)           | /           | coma-separated names   |
    7272!  | iGeneration | Generation (>=1)                                     | /           |                        |
    73 !  | isInPhysics | tracers not extracted from the main table in physics | /           | nqtottr .TRUE. values  |
    7473!  | iqParent    | Index of the parent tracer                           | iqpere      | 1:nqtot                |
    7574!  | iqDescen    | Indexes of the childs       (all generations)        | iqfils      | 1:nqtot                |
     
    7776!  | nqChildren  | Number of childs            (1st generation only)    | nqfils      | 1:nqtot                |
    7877!  | keys        | key/val pairs accessible with "getKey" routine       | /           |                        |
     78!  | isAdvected  | advected tracers flag (.TRUE. if iadv >= 0)          | /           | nqtrue  .TRUE. values  |
     79!  | isInPhysics | tracers not extracted from the main table in physics | /           | nqtottr .TRUE. values  |
    7980!  | iso_iGroup  | Isotopes group index in isotopes(:)                  | /           | 1:nbIso                |
    8081!  | iso_iName   | Isotope  name  index in isotopes(iso_iGroup)%trac(:) | iso_indnum  | 1:niso                 |
     
    247248   IF(fType == 0) CALL abort_gcm(modname, 'Missing tracers file: "traceur.def", "tracer.def" or "tracer_<keyword>.def file.',1)
    248249   !---------------------------------------------------------------------------------------------------------------------------
    249    IF(fType == 1 .AND. ANY(['inca','inco']==type_trac) .AND. lInit) THEN  !=== OLD STYLE INCA "traceur.def" (single type_trac)
     250   IF(fType == 1 .AND. ANY(['inca','inco']==type_trac) .AND. lInit) THEN  !=== FOUND OLD STYLE INCA "traceur.def"
    250251   !---------------------------------------------------------------------------------------------------------------------------
    251252#ifdef INCA
     
    278279         CALL addKey('phase',     t1%phase,     t1%keys)
    279280      END DO
    280       IF(setGeneration(tracers)) CALL abort_gcm(modname,'See below',1) !- SET FIELDS %iGeneration, %gen0Name
     281      IF(setGeneration(tracers)) CALL abort_gcm(modname,'See above',1) !- SET FIELDS %iGeneration, %gen0Name
    281282      DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
    282283#endif
     
    327328
    328329!==============================================================================================================================
    329 ! 3) Determine the advection scheme ; needed to compute the full tracers list, the long names and nqtot.
     330! 3) Determine the advection scheme ; needed to compute the full tracers list, the long names, nqtot and %isAdvected
    330331!==============================================================================================================================
    331332   ALLOCATE(ttr(nqtot))
     
    341342      IF(iad == -1) CALL abort_gcm(modname, msg1, 1)
    342343
    343       !--- SET FIELDS %longName, %isInPhysics
     344      !--- SET FIELDS %longName, %isAdvected, %isInPhysics
    344345      t1%longName   = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad)
     346      t1%isAdvected = iad >= 0
    345347      t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' &
    346348                          .OR. t1%component /= 'lmdz' !=== OTHER EXCEPTIONS TO BE ADDED: CO2i, SURSATURATED WATER CLOUD...
     
    356358      ttr(jq+1:jq+nm)%parent      = [(TRIM(t1%parent)  //'-'//TRIM(suff(im)), im=1, nm) ]
    357359      ttr(jq+1:jq+nm)%longName    = [(TRIM(t1%longName)//'-'//TRIM(suff(im)), im=1, nm) ]
     360      ttr(jq+1:jq+nm)%isAdvected  = [(.FALSE., im=1, nm) ]
    358361      jq = jq + nm
    359362   END DO
Note: See TracChangeset for help on using the changeset viewer.