- Timestamp:
- Jul 1, 2024, 5:14:11 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/misc/readTracFiles_mod.f90
r5003 r5004 289 289 END IF 290 290 lerr = indexUpdate(tracers); IF(lerr) RETURN !--- Set iqParent, iqDescen, nqDescen, nqChildren 291 292 291 IF(PRESENT(tracs)) CALL MOVE_ALLOC(FROM=tracers, TO=tracs) 293 292 END FUNCTION readTracersFiles … … 473 472 DO k = 1, SIZE(ky%key) !--- Loop on the keys of the tracer named "defName" 474 473 ! 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 DO474 DO it = 1, SIZE(t); CALL addKey(ky%key(k), ky%val(k), t(it)%keys, .FALSE.); END DO 476 475 END DO 477 476 tt = [t(1:jd-1),t(jd+1:SIZE(t))]; CALL MOVE_ALLOC(FROM=tt, TO=t) !--- Remove the virtual tracer named "defName" … … 598 597 TYPE(trac_type), INTENT(INOUT) :: tr(:) !--- Tracer derived type vector 599 598 INTEGER :: iq, jq, ig 600 CHARACTER(LEN=maxlen), ALLOCATABLE :: parent(:), name(:)599 CHARACTER(LEN=maxlen), ALLOCATABLE :: parent(:), tname(:) 601 600 !------------------------------------------------------------------------------------------------------------------------------ 602 601 CHARACTER(LEN=maxlen) :: modname 603 602 modname = 'setGeneration' 604 lerr = getKey('name', name,ky=tr(:)%keys); IF(lerr) RETURN603 lerr = getKey('name', tname, ky=tr(:)%keys); IF(lerr) RETURN 605 604 lerr = getKey('parent', parent, ky=tr(:)%keys); IF(lerr) RETURN 606 605 DO iq = 1, SIZE(tr) 607 606 jq = iq; ig = 0 608 607 DO WHILE(parent(jq) /= tran0) 609 jq = strIdx( name(:), parent(jq))608 jq = strIdx(tname(:), parent(jq)) 610 609 lerr = jq == 0 611 IF(fmsg('Orphan tracer "'//TRIM( name(iq))//'"', modname, lerr)) RETURN610 IF(fmsg('Orphan tracer "'//TRIM(tname(iq))//'"', modname, lerr)) RETURN 612 611 ig = ig + 1 613 612 END DO 614 tr(iq)%gen0Name = name(jq)613 tr(iq)%gen0Name = tname(jq) 615 614 tr(iq)%iGeneration = ig 616 615 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) 618 617 END DO 619 618 END FUNCTION setGeneration … … 896 895 lerr = getKey('component', v2, i2, k2) 897 896 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) 899 898 900 899 !=== FOR TRACERS COMMON TO PREVIOUS AND CURRENT SECTIONS: CHECK WETHER SOME KEYS HAVE DIFFERENT VALUES ; KEEP OLD ONE … … 1065 1064 nq = SIZE(tr) 1066 1065 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 1072 1067 DO iq = 1, nq; iGen(iq) = 0; jq = iq 1068 iqParent(iq) = strIdx(tnames, parent(iq)) 1073 1069 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) 1074 1072 END DO 1075 CALL addKey('iGeneration', iGen, tr(:)%keys) 1076 1077 !=== iqDescen 1073 1074 !=== nqChildren, iqDescen, nqDescen 1078 1075 nGen = MAXVAL(iGen, MASK=.TRUE.) 1079 1076 DO iq = 1, nq … … 1539 1536 DO ik = 1, SIZE(t(jd)%keys%key) 1540 1537 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.) 1542 1539 END DO 1543 1540 END SUBROUTINE addKeysFromDef
Note: See TracChangeset
for help on using the changeset viewer.