Changeset 19 for readTracFiles_mod.f90
- Timestamp:
- Jun 21, 2022, 1:41:08 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
readTracFiles_mod.f90
r18 r19 107 107 108 108 !--- Required sections + corresponding files names (new style single section case) 109 IF(test(strParse(type_trac, ' ,', sections), lerr)) RETURN !--- Parse "type_trac" list109 IF(test(strParse(type_trac, '|', sections), lerr)) RETURN !--- Parse "type_trac" list 110 110 111 111 nsec = SIZE(sections, DIM=1) … … 193 193 !============================================================================================================================== 194 194 LOGICAL FUNCTION feedDBase(fnames, snames, modname) RESULT(lerr) 195 ! Purpose: Read the sections "snames(is)" ( coma-separated list) from each "fnames(is)"195 ! Purpose: Read the sections "snames(is)" (pipe-separated list) from each "fnames(is)" 196 196 ! file and create the corresponding tracers set descriptors in the database "dBase": 197 197 ! * dBase(id)%name : section name … … 201 201 !------------------------------------------------------------------------------------------------------------------------------ 202 202 CHARACTER(LEN=*), INTENT(IN) :: fnames(:) !--- Files names 203 CHARACTER(LEN=*), INTENT(IN) :: snames(:) !--- Coma-deparated list of sections (one list each file)203 CHARACTER(LEN=*), INTENT(IN) :: snames(:) !--- Pipe-deparated list of sections (one list each file) 204 204 CHARACTER(LEN=*), INTENT(IN) :: modname !--- Calling routine name 205 205 INTEGER, ALLOCATABLE :: ndb(:) !--- Number of sections for each file … … 211 211 !------------------------------------------------------------------------------------------------------------------------------ 212 212 !=== READ THE REQUIRED SECTIONS 213 ll = strCount(snames, ' ,', ndb) !--- Number of sections for each file213 ll = strCount(snames, '|', ndb) !--- Number of sections for each file 214 214 ALLOCATE(ixf(SUM(ndb))) 215 215 DO i=1, SIZE(fnames) !--- Set %name, %keys … … 239 239 !------------------------------------------------------------------------------------------------------------------------------ 240 240 CHARACTER(LEN=*), INTENT(IN) :: fnam !--- File name 241 CHARACTER(LEN=*), INTENT(IN) :: snam !--- Coma-separated sections list241 CHARACTER(LEN=*), INTENT(IN) :: snam !--- Pipe-separated sections list 242 242 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: defName !--- Special section (default values) name 243 243 !------------------------------------------------------------------------------------------------------------------------------ … … 254 254 DO idb=n0,ndb; CALL addDefault(dBase(idb)%trac, defName); END DO !--- and remove the virtual tracer "defName" 255 255 END IF 256 ll = strParse(snam, ' ,', keys = sec) !--- Requested sections names256 ll = strParse(snam, '|', keys = sec) !--- Requested sections names 257 257 ix = strIdx(dBase(:)%name, sec(:)) !--- Indexes of requested sections in database 258 258 IF(test(checkList(sec, ix == 0, 'In file "'//TRIM(fnam)//'"','section(s)', 'missing'), lerr)) RETURN … … 893 893 !--- READ THE FILE SECTIONS, ONE EACH PARENT TRACER 894 894 nb0 = SIZE(dBase, DIM=1)+1 !--- Next database element index 895 IF(test(readSections(fnam,strStack(isot(:)%parent,' ,')),lerr)) RETURN !--- Read sections, one each parent tracer895 IF(test(readSections(fnam,strStack(isot(:)%parent,'|')),lerr)) RETURN !--- Read sections, one each parent tracer 896 896 ndb = SIZE(dBase, DIM=1) !--- Current database size 897 897 DO idb = nb0, ndb
Note: See TracChangeset
for help on using the changeset viewer.