Changeset 5004 for LMDZ6


Ignore:
Timestamp:
Jul 1, 2024, 5:14:11 PM (5 months ago)
Author:
dcugnet
Message:

"addKey_{irl}mm" contains a loop calling addKey_{irl}11.
For some reason, it crashes when returning to the calling routine (no crash for "addKey_smm" !).
No fix yet, so "addKey_{irl}mm" calls in "indexUpdate" are replaced by "addKey_{irl}11" in loops.

File:
1 edited

Legend:

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

    r5003 r5004  
    289289  END IF
    290290  lerr = indexUpdate(tracers); IF(lerr) RETURN                       !--- Set iqParent, iqDescen, nqDescen, nqChildren
    291 
    292291  IF(PRESENT(tracs)) CALL MOVE_ALLOC(FROM=tracers, TO=tracs)
    293292END FUNCTION readTracersFiles
     
    473472  DO k = 1, SIZE(ky%key)                                             !--- Loop on the keys of the tracer named "defName"
    474473!   CALL addKey(ky%key(k), ky%val(k), t(:)%keys, .FALSE.)            !--- Add key to all the tracers (no overwriting)
    475     DO it = 1, SIZE(t); CALL addKey_s11(ky%key(k), ky%val(k), t(it)%keys, .FALSE.); END DO
     474    DO it = 1, SIZE(t); CALL addKey(ky%key(k), ky%val(k), t(it)%keys, .FALSE.); END DO
    476475  END DO
    477476  tt = [t(1:jd-1),t(jd+1:SIZE(t))]; CALL MOVE_ALLOC(FROM=tt, TO=t)   !--- Remove the virtual tracer named "defName"
     
    598597  TYPE(trac_type),     INTENT(INOUT) :: tr(:)                        !--- Tracer derived type vector
    599598  INTEGER                            :: iq, jq, ig
    600   CHARACTER(LEN=maxlen), ALLOCATABLE :: parent(:), name(:)
     599  CHARACTER(LEN=maxlen), ALLOCATABLE :: parent(:), tname(:)
    601600!------------------------------------------------------------------------------------------------------------------------------
    602601  CHARACTER(LEN=maxlen) :: modname
    603602  modname = 'setGeneration'
    604   lerr = getKey('name',   name,   ky=tr(:)%keys); IF(lerr) RETURN
     603  lerr = getKey('name',   tname,  ky=tr(:)%keys); IF(lerr) RETURN
    605604  lerr = getKey('parent', parent, ky=tr(:)%keys); IF(lerr) RETURN
    606605  DO iq = 1, SIZE(tr)
    607606    jq = iq; ig = 0
    608607    DO WHILE(parent(jq) /= tran0)
    609       jq = strIdx(name(:), parent(jq))
     608      jq = strIdx(tname(:), parent(jq))
    610609      lerr = jq == 0
    611       IF(fmsg('Orphan tracer "'//TRIM(name(iq))//'"', modname, lerr)) RETURN
     610      IF(fmsg('Orphan tracer "'//TRIM(tname(iq))//'"', modname, lerr)) RETURN
    612611      ig = ig + 1
    613612    END DO
    614     tr(iq)%gen0Name = name(jq)
     613    tr(iq)%gen0Name = tname(jq)
    615614    tr(iq)%iGeneration = ig
    616615    CALL addKey('iGeneration',   ig,  tr(iq)%keys)
    617     CALL addKey('gen0Name', name(jq), tr(iq)%keys)
     616    CALL addKey('gen0Name', tname(jq), tr(iq)%keys)
    618617  END DO
    619618END FUNCTION setGeneration
     
    896895      lerr = getKey('component', v2, i2, k2)
    897896      tr(i1)%component = TRIM(v1)//','//TRIM(v2)
    898       CALL addKey_s11('component', TRIM(v1)//','//TRIM(v2), tr(i1)%keys)
     897      CALL addKey('component', TRIM(v1)//','//TRIM(v2), tr(i1)%keys)
    899898
    900899      !=== FOR TRACERS COMMON TO PREVIOUS AND CURRENT SECTIONS: CHECK WETHER SOME KEYS HAVE DIFFERENT VALUES ; KEEP OLD ONE
     
    10651064  nq = SIZE(tr)
    10661065
    1067   !=== iqParent
    1068   DO iq = 1, nq; iqParent(iq) = strIdx(tnames, parent(iq)); END DO
    1069   CALL addKey('iqParent', iqParent, tr(:)%keys)
    1070 
    1071   !=== iGeneration
     1066  !=== iqParent, iGeneration
    10721067  DO iq = 1, nq; iGen(iq) = 0; jq = iq
     1068    iqParent(iq) = strIdx(tnames, parent(iq))
    10731069    DO; jq = strIdx(tnames, parent(jq)); IF(jq == 0) EXIT; iGen(iq) = iGen(iq) + 1; END DO
     1070    CALL addKey('iqParent',   parent(iq), tr(iq)%keys)
     1071    CALL addKey('iqGeneration', iGen(iq), tr(iq)%keys)
    10741072  END DO
    1075   CALL addKey('iGeneration', iGen, tr(:)%keys)
    1076 
    1077   !=== iqDescen
     1073
     1074  !=== nqChildren, iqDescen, nqDescen
    10781075  nGen = MAXVAL(iGen, MASK=.TRUE.)
    10791076  DO iq = 1, nq
     
    15391536  DO ik = 1, SIZE(t(jd)%keys%key)
    15401537    CALL get_in(t(jd)%keys%key(ik), val, '*none*')
    1541     IF(val /= '*none*') CALL addKey_s11(t(jd)%keys%key(ik), val, t(jd)%keys, .TRUE.)
     1538    IF(val /= '*none*') CALL addKey(t(jd)%keys%key(ik), val, t(jd)%keys, .TRUE.)
    15421539  END DO
    15431540END SUBROUTINE addKeysFromDef
Note: See TracChangeset for help on using the changeset viewer.