- Timestamp:
- 07/13/18 10:18:25 (6 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r1449 r1467 1571 1571 eval IGCM_sys_Mkdir \${CMIP6_BUF_${comp}} 1572 1572 eval CMIP6_DIR=\${CMIP6_BUF_${comp}} 1573 1574 1573 # Modify path from dr2xml_{compname}.xml 1575 ${libIGCM}/libIGCM_post/xios_parser.py -v modifyPath --newPath ${CMIP6_DIR} --file dr2xml_${compname}.xml 1576 1574 if [ X${config_Post_dr2xmlFilePrefix} = XTRUE ]; then 1575 ${libIGCM}/libIGCM_post/xios_parser.py -v modifyPath --newPath ${CMIP6_DIR} --filePrefix ${config_UserChoices_JobName} --file dr2xml_${compname}.xml 1576 else 1577 ${libIGCM}/libIGCM_post/xios_parser.py -v modifyPath --newPath ${CMIP6_DIR} --file dr2xml_${compname}.xml 1578 fi 1577 1579 # Overwrite the original file 1578 1580 IGCM_sys_Mv modified.dr2xml_${compname}.xml dr2xml_${compname}.xml -
trunk/libIGCM/libIGCM_post/xios_parser.py
r1445 r1467 196 196 if not elem.attrib.get('mode') == 'read': 197 197 name=elem.attrib.get('name') 198 elem.set('name', os.path.normpath(args.newPath[0]) + '/' + os.path.normpath(name)) 198 if args.filePrefix is not None: 199 elem.set('name', os.path.normpath(args.newPath[0]) + '/' + args.filePrefix[0] + '_' + os.path.normpath(name)) 200 else: 201 elem.set('name', os.path.normpath(args.newPath[0]) + '/' + os.path.normpath(name)) 199 202 if args.verbosity >= 2: print elem.tag, elem.attrib 200 203 201 204 # Write out the results 202 205 if args.verbosity >= 1: print '\nWriting dr2xml_def_xml=','modified.' + inputFile … … 310 313 parser_check = subparsers.add_parser('modifyPath', help='Will make sure dr2xml write files where it should be') 311 314 parser_check.add_argument('--newPath', nargs=1, required=True, help='Directory output for file produced from dr2xml_file type') 315 parser_check.add_argument('--filePrefix', nargs=1, required=False, help='Prefix to be added to file produced from dr2xml_file type') 312 316 parser_check.add_argument('--file', nargs='+', required=True, help='XIOS xml dr2xml_file type') 313 317 parser_check.set_defaults(func=modifyPath)
Note: See TracChangeset
for help on using the changeset viewer.