Changeset 4169
- Timestamp:
- Jun 16, 2022, 2:45:08 PM (2 years ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r4158 r4169 201 201 202 202 CALL msg('type_trac = "'//TRIM(type_trac)//'"', modname) 203 IF(strParse(type_trac, ' ,', str, n=nt)) CALL abort_gcm(modname,'can''t parse "type_trac = '//TRIM(type_trac)//'"',1)203 IF(strParse(type_trac, '|', str, n=nt)) CALL abort_gcm(modname,'can''t parse "type_trac = '//TRIM(type_trac)//'"',1) 204 204 205 205 !--------------------------------------------------------------------------------------------------------------------------- … … 238 238 END SELECT 239 239 240 !--- DISABLE "config_inca" OPTION FOR A RUN WITHOUT "INCA" IF IT DIFFERS FROM "none"241 IF(fmsg('Setting config_inca="none" as you do not couple with INCA model', &242 modname, ALL(['inca', 'inco'] /= str(it)) .AND. config_inca /= 'none')) config_inca = 'none'243 244 240 !--------------------------------------------------------------------------------------------------------------------------- 245 241 END DO 246 242 !--------------------------------------------------------------------------------------------------------------------------- 243 244 !--- DISABLE "config_inca" OPTION FOR A RUN WITHOUT "INCA" IF IT DIFFERS FROM "none" 245 IF(fmsg('Setting config_inca="none" as you do not couple with INCA model', & 246 modname, ALL(str /= 'inca') .AND. ALL(str /= 'inco') .AND. config_inca /= 'none')) config_inca = 'none' 247 247 248 248 nqCO2 = 0; IF(ANY(str == 'inco')) nqCO2 = 1 -
LMDZ6/trunk/libf/misc/readTracFiles_mod.f90
r4159 r4169 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.