Changeset 5481 for LMDZ6


Ignore:
Timestamp:
Jan 16, 2025, 8:14:15 PM (13 hours ago)
Author:
dcugnet
Message:

Remove tracers attributes "isAdvected" and "isInPhysics" from infotrac (iadv is enough).
Remove tracers attribute "isAdvected" from infotrac_phy (isInPhysics is now equivalent
to former isInPhysics .AND. iadv > 0

Location:
LMDZ6/trunk/libf
Files:
13 edited

Legend:

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

    r5475 r5481  
    7878!  | nqChildren  | Number of childs            (1st generation only)    | nqfils      | 1:nqtot                |
    7979!  | iadv        | Advection scheme number                              | iadv        | 1,2,10-20(exc.15,19),30|
    80 !  | isAdvected  | Advected tracers flag (.TRUE. if iadv >= 0)          | /           | nqtrue  .TRUE. values  |
    81 !  | isInPhysics | Tracers not extracted from the main table in physics | /           | nqtottr .TRUE. values  |
    8280!  | iso_iGroup  | Isotopes group index in isotopes(:)                  | /           | 1:nbIso                |
    8381!  | iso_iName   | Isotope  name  index in isotopes(iso_iGroup)%trac(:) | iso_indnum  | 1:niso                 |
     
    260258
    261259!==============================================================================================================================
    262 ! 3) Determine the advection scheme choice for water and tracers "iadv" and the fields long name, isAdvected.
     260! 3) Determine the advection scheme choice for water and tracers "iadv" and the field "long name".
    263261!     iadv = 1    "LMDZ-specific humidity transport" (for H2O vapour)          LMV
    264262!     iadv = 2    backward                           (for H2O liquid)          BAK
     
    278276!==============================================================================================================================
    279277   ALLOCATE(ttr(nqtot))
    280    jq = nqtrue+1; tracers(:)%iadv = -1
     278   jq = nqtrue+1
    281279   DO iq = 1, nqtrue
    282280      t1 => tracers(iq)
     
    289287      IF(iad == -1) CALL abort_gcm(modname, msg1, 1)
    290288
    291       !--- SET FIELDS longName, iadv, isAdvected, isInPhysics
     289      !--- SET FIELDS longName and iadv
    292290      t1%longName   = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad)
    293291      t1%iadv       = iad
    294       t1%isAdvected = iad >= 0
    295       t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O
    296292      ttr(iq)       = t1
    297293
     
    307303      ttr(jq+1:jq+nm)%longName    = [ (TRIM(t1%longName)//'-'//TRIM(suff(im)), im=1, nm) ]
    308304      ttr(jq+1:jq+nm)%iadv        = [ (-iad,    im=1, nm) ]
    309       ttr(jq+1:jq+nm)%isAdvected  = [ (.FALSE., im=1, nm) ]
    310305      jq = jq + nm
    311306   END DO
  • LMDZ6/trunk/libf/dynphy_lonlat/calfis.f90

    r5285 r5481  
    279279  itr=0
    280280  DO iq=1,nqtot
    281      IF(.NOT.tracers(iq)%isAdvected) CYCLE
     281     IF(tracers(iq)%iadv < 0) CYCLE
    282282     itr = itr + 1
    283283     DO l=1,llm
     
    597597  itr = 0
    598598  DO iq=1,nqtot
    599      IF(.NOT.tracers(iq)%isAdvected) CYCLE
     599     IF(tracers(iq)%iadv < 0) CYCLE
    600600     itr = itr + 1
    601601     DO l=1,llm
  • LMDZ6/trunk/libf/dynphy_lonlat/calfis_loc.F90

    r5367 r5481  
    356356  itr = 0
    357357  DO iq=1,nqtot
    358      IF(.NOT.tracers(iq)%isAdvected) CYCLE
     358     IF(tracers(iq)%iadv < 0) CYCLE
    359359     itr = itr + 1
    360360!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
     
    10591059  itr = 0
    10601060  DO iq=1,nqtot
    1061      IF(.NOT.tracers(iq)%isAdvected) CYCLE
     1061     IF(tracers(iq)%iadv < 0) CYCLE
    10621062     itr = itr + 1
    10631063!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
  • LMDZ6/trunk/libf/misc/readTracFiles_mod.f90

    r5393 r5481  
    6161    INTEGER               :: nqChildren  = 0                    !--- Number of children  (first generation)
    6262    INTEGER               :: iadv        = 10                   !--- Advection scheme used
    63     LOGICAL               :: isAdvected  = .FALSE.              !--- "true" tracers: iadv > 0.   COUNT(isAdvected )=nqtrue
    6463    LOGICAL               :: isInPhysics = .TRUE.               !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr
    6564    INTEGER               :: iso_iGroup  = 0                    !--- Isotopes group index in isotopes(:)
     
    185184!     * The "keys" component (of type keys_type) is in principle enough to store everything we could need.
    186185!     But some variables are stored as direct-access keys to make the code more readable and because they are used often.
    187 !     * Most of the direct-access keys are set in this module, but some are not (longName, iadv, isAdvected for now).
     186!     * Most of the direct-access keys are set in this module, but some are not (longName, iadv and isInPhysicsfor now).
    188187!     * Some of the direct-access keys must be updated (using the routine "setDirectKeys") is a subset of "tracers(:)"
    189188!     is extracted: the indexes are no longer valid for a subset (examples: iqParent, iqDescen).
  • LMDZ6/trunk/libf/misc/wxios_mod.F90

    r5310 r5481  
    188188      ! On boucle sur les traceurs pour les ajouter au groupe puis fixer les attributs
    189189      DO iq = 1, nqtot
    190          IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     190         IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    191191         dn = 'd'//TRIM(tracers(iq)%name)//'_'
    192192
     
    241241      ! On boucle sur les traceurs pour les ajouter au groupe puis fixer les attributs
    242242      DO iq = 1, nqtot
    243          IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     243         IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    244244         
    245245         unt = "kg m-2"
  • LMDZ6/trunk/libf/phydev/infotrac_phy.f90

    r5268 r5481  
    3232    TYPE(keys_type)       :: keys                          !--- <key>=<val> pairs vector
    3333    INTEGER               :: iadv        = 10              !--- Advection scheme used
    34     LOGICAL               :: isAdvected  = .FALSE.         !--- "true" tracers: iadv > 0.   COUNT(isAdvected )=nqtrue
    3534    LOGICAL               :: isInPhysics = .TRUE.          !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr
    3635    INTEGER               :: iso_iGroup  = 0               !--- Isotopes group index in isotopes(:)
  • LMDZ6/trunk/libf/phylmd/infotrac_phy.F90

    r5475 r5481  
    8080!  | nqDescen    | Number of the descendants   (all generations)        | nqdesc      | 1:nqtot                |
    8181!  | nqChildren  | Number of childs            (1st generation only)    | nqfils      | 1:nqtot                |
    82 !  | isAdvected  | Advected tracers flag (.TRUE. if iadv >= 0)          | /           | nqtrue  .TRUE. values  |
    83 !  | isInPhysics | Tracers not extracted from the main table in physics | /           | nqtottr .TRUE. values  |
     82!  | isInPhysics | Advected tracers from the main table kept in physics | /           | nqtottr .TRUE. values  |
    8483!  | iso_iGroup  | Isotopes group index in isotopes(:)                  | /           | 1:nbIso                |
    8584!  | iso_iName   | Isotope  name  index in isotopes(iso_iGroup)%trac(:) | iso_indnum  | 1:niso                 |
     
    284283
    285284!==============================================================================================================================
    286 ! 3) Determine the advection scheme ; needed to compute the full tracers list, the long names, nqtot and %isAdvected
     285! 3) Determine the advection scheme ; needed to compute the full tracers list, the long names and nqtot
    287286!==============================================================================================================================
    288287   ALLOCATE(ttr(nqtot))
    289    jq = nqtrue+1; tracers(:)%iadv = -1
     288   jq = nqtrue+1
    290289   DO iq = 1, nqtrue
    291290      t1 => tracers(iq)
     
    298297      IF(iad == -1) CALL abort_physic(modname, msg1, 1)
    299298
    300       !--- SET FIELDS longName, isAdvected, isInPhysics
     299      !--- SET FIELDS longName, isInPhysics
    301300      t1%longName   = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad)
    302       t1%isAdvected = iad >= 0
    303       t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O
     301      t1%isInPhysics= iad >= 0 .AND. (delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz')
    304302      ttr(iq)       = t1
    305303
     
    314312      ttr(jq+1:jq+nm)%parent      = [ (TRIM(t1%parent)  //'-'//TRIM(suff(im)), im=1, nm) ]
    315313      ttr(jq+1:jq+nm)%longName    = [ (TRIM(t1%longName)//'-'//TRIM(suff(im)), im=1, nm) ]
    316       ttr(jq+1:jq+nm)%isAdvected  = [ (.FALSE., im=1, nm) ]
    317314      ttr(jq+1:jq+nm)%isInPhysics = [ (.FALSE., im=1, nm) ]
    318315      jq = jq + nm
     
    383380   t => tracers
    384381   CALL msg('Information stored in '//TRIM(modname)//': ', modname)
    385    IF(dispTable('isssssssssiiiiiiii', ['iq  ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp',     &
    386                        'isPh', 'isAd', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'],    &
    387       cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component,                          &
    388                                                          bool2str(t%isInPhysics), bool2str(t%isAdvected)), &
     382   IF(dispTable('issssssssiiiiiiii', ['iq  ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp',      &
     383                              'isPh', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'],     &
     384      cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, bool2str(t%isInPhysics)),&
    389385      cat([(iq, iq=1, nqtot)], t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup,          &
    390386                  t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax=maxTableWidth, nHead=2, sub=modname))   &
  • LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90

    r5310 r5481  
    525525     it = 0
    526526     DO iq = 1, nqtot
    527         IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     527        IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    528528        it = it+1
    529529        tname = tracers(iq)%name
  • LMDZ6/trunk/libf/phylmd/phyredem.f90

    r5296 r5481  
    356356       it = 0
    357357       DO iq = 1, nqtot
    358           IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     358          IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    359359          it = it+1
    360360          CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it))
  • LMDZ6/trunk/libf/phylmd/phys_output_mod.F90

    r5473 r5481  
    513513          itr = 0; itrb = 0
    514514          DO iq = 1, nqtot
    515             IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     515            IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    516516            itr = itr + 1
    517517            dn = 'd'//TRIM(tracers(iq)%name)//'_'
     
    638638
    639639!  DO iq=1,nqtot
    640 !    IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     640!    IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    641641!    WRITE(*,'(a,i1,a,10i3)')'trac(',iq,')%flag = ',o_trac(iq)%flag
    642642!    WRITE(*,'(a,i1,a)')'trac(',iq,')%name = '//TRIM(o_trac(iq)%name)
  • LMDZ6/trunk/libf/phylmd/traclmdz_mod.f90

    r5285 r5481  
    261261    it = 0
    262262    DO iq = 1, nqtot
    263        IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     263       IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    264264       it = it+1
    265265       ! Test if tracer is zero everywhere.
     
    310310   
    311311    USE yomcst_mod_h
    312 USE dimphy
     312    USE dimphy
    313313    USE infotrac_phy, ONLY: nbtr, pbl_flg
    314314    USE strings_mod,  ONLY: int2str
  • LMDZ6/trunk/libf/phylmdiso/phyetat0_mod.F90

    r5310 r5481  
    549549     it = 0
    550550     DO iq = 1, nqtot
    551         IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     551        IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    552552        it = it+1
    553553        tname = tracers(iq)%name
  • LMDZ6/trunk/libf/phylmdiso/phyredem.F90

    r5296 r5481  
    370370       it = 0
    371371       DO iq = 1, nqtot
    372           IF(.NOT.(tracers(iq)%isAdvected .AND. tracers(iq)%isInPhysics)) CYCLE
     372          IF(.NOT.tracers(iq)%isInPhysics) CYCLE
    373373          it = it+1
    374374          CALL put_field(pass,"trs_"//tracers(iq)%name, "", trs(:, it))
Note: See TracChangeset for help on using the changeset viewer.