Changeset 7 for readTracFiles_mod.f90
- Timestamp:
- Jan 28, 2022, 6:37:28 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readTracFiles_mod.f90
r6 r7 15 15 16 16 PUBLIC :: known_phases, old_phases, nphases, phases_names, & !--- VARIABLES RELATED TO THE PHASES 17 phases_sep, delPhase, addPhase !--- + ROUTINES TO ADD/REMOVE PHASE TO/FROM A NAME 17 phases_sep, delPhase, addPhase, & !--- + ROUTINES TO ADD/REMOVE PHASE TO/FROM A NAME 18 old2newPhase, new2oldPhase 18 19 19 20 PUBLIC :: tran0, idxAncestor, ancestor !--- GENERATION 0 TRACER + TOOLS FOR GENERATIONS … … 1255 1256 CHARACTER(LEN=*), INTENT(IN) :: s 1256 1257 INTEGER :: l, i, ix 1258 CHARACTER(LEN=maxlen) :: sh, st 1257 1259 out = s 1258 1260 IF(s == '') RETURN !--- Empty string: nothing to do 1259 1261 1260 1262 !--- Special case: old phases for water, no phases separator 1261 IF(ANY([('H2O'//old_phases(ix:ix), ix=1, nphases)] == s)) THEN; out='H2O'; RETURN; END IF 1263 i = INDEX(s,'_'); sh = s; IF(i/=0) sh=s(1:i-1); st='H2O'; IF(i/=0) st='H2O_'//s(i+1:LEN_TRIM(s)) 1264 IF(ANY([('H2O'//old_phases(ix:ix), ix=1, nphases)] == sh)) THEN; out=st; RETURN; END IF 1262 1265 1263 1266 !--- Index of found phase in "known_phases" … … 1300 1303 !------------------------------------------------------------------------------------------------------------------------------ 1301 1304 1305 CHARACTER(LEN=1) FUNCTION old2newPhase(op) RESULT(np) 1306 CHARACTER(LEN=1), INTENT(IN) :: op 1307 np = known_phases(INDEX(old_phases,op):INDEX(old_phases,op)) 1308 END FUNCTION old2newPhase 1309 1310 CHARACTER(LEN=1) FUNCTION new2oldPhase(np) RESULT(op) 1311 CHARACTER(LEN=1), INTENT(IN) :: np 1312 op = old_phases(INDEX(known_phases,np):INDEX(known_phases,np)) 1313 END FUNCTION new2oldPhase 1302 1314 1303 1315 !============================================================================================================================== … … 1360 1372 1361 1373 END MODULE readTracFiles_mod 1374
Note: See TracChangeset
for help on using the changeset viewer.