Changeset 4358 for LMDZ6/trunk/libf/misc


Ignore:
Timestamp:
Nov 30, 2022, 4:37:30 PM (19 months ago)
Author:
dcugnet
Message:
  • remove "config_inca" variable from "control_mod" and "infotrac_phy" (read in infotrac)
  • only kept version of "type_trac" is in tracinca ; few tests are moved from infotrac to this module.
  • simplify and generalize a bit the routines "phyetat0_get" and "phyetat0_srf" from phyetat0, converted to a module.
  • fix the isotopic version: few "USE … » were misplaced between ISOVERIF CPP keys
  • fix the old water and derived isotopes names in the ISOTRAC case
Location:
LMDZ6/trunk/libf/misc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/misc/readTracFiles_mod.f90

    r4348 r4358  
    5454    CHARACTER(LEN=maxlen) :: phase       = 'g'             !--- Phase ('g'as / 'l'iquid / 's'olid)
    5555    CHARACTER(LEN=maxlen) :: component   = ''              !--- Coma-separated list of components (Ex: lmdz,inca)
    56     INTEGER               :: iadv        = 10              !--- Advection scheme used
    5756    INTEGER               :: iGeneration = -1              !--- Generation number (>=0)
    58     LOGICAL               :: isAdvected  = .FALSE.         !--- "true" tracers: iadv > 0.   COUNT(isAdvected )=nqtrue
    59     LOGICAL               :: isInPhysics = .TRUE.          !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr
    6057    INTEGER               :: iqParent    = 0               !--- Parent index
    6158    INTEGER,  ALLOCATABLE :: iqDescen(:)                   !--- Descendants index (in growing generation order)
    6259    INTEGER               :: nqDescen    = 0               !--- Number of descendants (all generations)
    6360    INTEGER               :: nqChildren  = 0               !--- Number of children  (first generation)
     61    TYPE(keys_type)       :: keys                          !--- <key>=<val> pairs vector
     62    INTEGER               :: iadv        = 10              !--- Advection scheme used
     63    LOGICAL               :: isAdvected  = .FALSE.         !--- "true" tracers: iadv > 0.   COUNT(isAdvected )=nqtrue
     64    LOGICAL               :: isInPhysics = .TRUE.          !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr
    6465    INTEGER               :: iso_iGroup  = 0               !--- Isotopes group index in isotopes(:)
    6566    INTEGER               :: iso_iName   = 0               !--- Isotope  name  index in isotopes(iso_iGroup)%trac(:)
    6667    INTEGER               :: iso_iZone   = 0               !--- Isotope  zone  index in isotopes(iso_iGroup)%zone(:)
    6768    INTEGER               :: iso_iPhase  = 0               !--- Isotope  phase index in isotopes(iso_iGroup)%phase
    68     TYPE(keys_type)       :: keys                          !--- <key>=<val> pairs vector
    6969  END TYPE trac_type
    7070!------------------------------------------------------------------------------------------------------------------------------
     
    18951895  ip = getiPhase(newName)                                                      !--- Phase index
    18961896  IF(ip /= 0 .AND. PRESENT(iPhase)) iPhase = ip                                !--- Returning phase index
    1897   ix = strIdx(newH2OIso, newName)                                              !--- Index in the known H2O isotopes list
    1898   IF(ix /= 0) oldName = 'H2O'//'_'//TRIM(oldH2OIso(ix))                        !=== WATER ISOTOPE WITHOUT PHASE
     1897  ix = strIdx(newH2OIso, strHead(newName, '_'))                                !--- Index in the known H2O isotopes list
     1898  IF(ix /= 0) THEN
     1899    oldName = 'H2O'//'_'//TRIM(oldH2OIso(ix))                                  !=== WATER ISOTOPE WITHOUT PHASE
     1900    IF(newH2OIso(ix)/=newName) oldName=TRIM(oldName)//'_'//strTail(newName,'_')!=== WATER ISOTOPIC TAGGING TRACER WITHOUT PHASE
     1901  END IF
    18991902  IF(ix /= 0 .OR. ip == 0)           RETURN
    19001903  oldName = 'H2O'//old_phases(ip:ip)
  • LMDZ6/trunk/libf/misc/strings_mod.F90

    r4349 r4358  
    505505!=== Count the number of elements separated by "delimiter" in list "rawList". =================================================
    506506!==============================================================================================================================
    507 LOGICAL FUNCTION strCount_11(rawList, delimiter, nb, lSc) RESULT(out)
     507LOGICAL FUNCTION strCount_11(rawList, delimiter, nb, lSc) RESULT(lerr)
    508508  CHARACTER(LEN=*),  INTENT(IN)  :: rawList
    509509  CHARACTER(LEN=*),  INTENT(IN)  :: delimiter
     
    513513  LOGICAL :: ll
    514514  ll = .FALSE.; IF(PRESENT(lSc)) ll = lSc
    515   out = strCount_1m(rawList, [delimiter], nb, ll)
     515  lerr = strCount_1m(rawList, [delimiter], nb, ll)
    516516END FUNCTION strCount_11
    517517!==============================================================================================================================
    518 LOGICAL FUNCTION strCount_m1(rawList, delimiter, nb, lSc) RESULT(out)
     518LOGICAL FUNCTION strCount_m1(rawList, delimiter, nb, lSc) RESULT(lerr)
    519519  CHARACTER(LEN=*),     INTENT(IN)  :: rawList(:)
    520520  CHARACTER(LEN=*),     INTENT(IN)  :: delimiter
     
    525525  INTEGER :: id
    526526  ll  = .FALSE.; IF(PRESENT(lSc)) ll = lSc .AND. INDEX('+-', delimiter) /= 0
    527   out = .TRUE.
     527  lerr = .TRUE.
    528528  ALLOCATE(nb(SIZE(rawList)))
    529529  DO id = 1, SIZE(rawList)
    530     out = out .AND. strCount_1m(rawList(id), [delimiter], nb(id), ll)
     530    lerr = lerr .AND. strCount_1m(rawList(id), [delimiter], nb(id), ll)
    531531  END DO
    532532END FUNCTION strCount_m1
Note: See TracChangeset for help on using the changeset viewer.