Changeset 19 for readTracFiles_mod.f90


Ignore:
Timestamp:
Jun 21, 2022, 1:41:08 PM (2 years ago)
Author:
dcugnet
Message:

Sections names separator is no longer a coma (","), but a pipe ("|") because ioipsl "getin" is removing the comas.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • readTracFiles_mod.f90

    r18 r19  
    107107
    108108  !--- Required sections + corresponding files names (new style single section case)
    109   IF(test(strParse(type_trac, ',', sections), lerr)) RETURN          !--- Parse "type_trac" list
     109  IF(test(strParse(type_trac, '|', sections), lerr)) RETURN          !--- Parse "type_trac" list
    110110
    111111  nsec = SIZE(sections, DIM=1)
     
    193193!==============================================================================================================================
    194194LOGICAL 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)"
    196196!   file and create the corresponding tracers set descriptors in the database "dBase":
    197197! * dBase(id)%name                : section name
     
    201201!------------------------------------------------------------------------------------------------------------------------------
    202202  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)
    204204  CHARACTER(LEN=*), INTENT(IN)  :: modname                           !--- Calling routine name
    205205  INTEGER,  ALLOCATABLE :: ndb(:)                                    !--- Number of sections for each file
     
    211211!------------------------------------------------------------------------------------------------------------------------------
    212212  !=== READ THE REQUIRED SECTIONS
    213   ll = strCount(snames, ',', ndb)                                    !--- Number of sections for each file
     213  ll = strCount(snames, '|', ndb)                                    !--- Number of sections for each file
    214214  ALLOCATE(ixf(SUM(ndb)))
    215215  DO i=1, SIZE(fnames)                                               !--- Set %name, %keys
     
    239239!------------------------------------------------------------------------------------------------------------------------------
    240240  CHARACTER(LEN=*),           INTENT(IN) :: fnam                     !--- File name
    241   CHARACTER(LEN=*),           INTENT(IN) :: snam                     !--- Coma-separated sections list
     241  CHARACTER(LEN=*),           INTENT(IN) :: snam                     !--- Pipe-separated sections list
    242242  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: defName                  !--- Special section (default values) name
    243243!------------------------------------------------------------------------------------------------------------------------------
     
    254254    DO idb=n0,ndb; CALL addDefault(dBase(idb)%trac, defName); END DO !--- and remove the virtual tracer "defName"
    255255  END IF
    256   ll = strParse(snam, ',', keys = sec)                               !--- Requested sections names
     256  ll = strParse(snam, '|', keys = sec)                               !--- Requested sections names
    257257  ix = strIdx(dBase(:)%name, sec(:))                                 !--- Indexes of requested sections in database
    258258  IF(test(checkList(sec, ix == 0, 'In file "'//TRIM(fnam)//'"','section(s)', 'missing'), lerr)) RETURN
     
    893893  !--- READ THE FILE SECTIONS, ONE EACH PARENT TRACER
    894894  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 tracer
     895  IF(test(readSections(fnam,strStack(isot(:)%parent,'|')),lerr)) RETURN !--- Read sections, one each parent tracer
    896896  ndb = SIZE(dBase, DIM=1)                                           !--- Current database size
    897897  DO idb = nb0, ndb
Note: See TracChangeset for help on using the changeset viewer.