Changeset 1339 for trunk/libIGCM
- Timestamp:
- 08/17/16 10:09:01 (8 years ago)
- Location:
- trunk/libIGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh
r1338 r1339 630 630 if [ ${#FileDef[@]} -ne 0 ] ; then 631 631 # Check XMLs coherency now 632 ${libIGCM}/libIGCM_post/xios_parser.py check --field ${FieldDef} --file ${FileDef} 632 IGCM_debug_Print 1 "${libIGCM}/libIGCM_post/xios_parser.py check --field ${FieldDef[*]} --file ${FileDef[*]}" 633 ${libIGCM}/libIGCM_post/xios_parser.py check --field ${FieldDef[*]} --file ${FileDef[*]} 633 634 if [ $? = 0 ] ; then 634 IGCM_debug_Print 3"${compname} XIOS XMLs are consistent"635 IGCM_debug_Print 1 "${compname} XIOS XMLs are consistent" 635 636 else 636 IGCM_debug_Print 3 "${compname} XIOS XMLs ARE NOT consistent" 637 ${libIGCM}/libIGCM_post/xios_parser.py -v modify --field ${FieldDef} --file ${FileDef} 638 [ $? != 0] && IGCM_debug_Exit "Failed to fix XIOS xml files for ${compname}" 637 IGCM_debug_Print 1 "${compname} XIOS XMLs ARE NOT consistent. Try to fix it:" 638 IGCM_debug_Print 3 "${libIGCM}/libIGCM_post/xios_parser.py -v modify --field ${FieldDef[*]} --file ${FileDef[*]}" 639 ${libIGCM}/libIGCM_post/xios_parser.py -vv modify --field ${FieldDef[*]} --file ${FileDef[*]} 640 [ $? != 0 ] && IGCM_debug_Exit "Failed to fix XIOS xml files for ${compname}" 639 641 fi 640 642 fi -
trunk/libIGCM/libIGCM_post/xios_parser.py
r1337 r1339 13 13 #************************************************************** 14 14 15 import os, pwd, sys, traceback, argparse , readline, rlcompleter15 import os, pwd, sys, traceback, argparse 16 16 import xml.etree.ElementTree as ET 17 readline.parse_and_bind("tab: complete") 17 #import readline, rlcompleter 18 #readline.parse_and_bind("tab: complete") 18 19 19 20 indent = 0 … … 50 51 51 52 def findField(root): 52 """Recursively find and list field tag with ID or field_refattribute."""53 """Recursively find and list field tag with "id" or "field_ref" attribute.""" 53 54 global fromField 54 55 global fromFile … … 104 105 # Compare the two lists. fromField must be a superset of fromFile. 105 106 if set(fromField).issuperset(set(fromFile)): 106 if args.verbosity >= 1: print ' ALL GOOD with %s' % (inputFile)107 if args.verbosity >= 1: print '\nALL GOOD with %s' % (inputFile) 107 108 if args.verbosity >= 3: print 'fromField=', fromField 108 109 if args.verbosity >= 3: print 'fromFile=', fromFile 109 110 else: 110 if args.verbosity >= 1: print ' TROUBLE AHEAD with %s' % (inputFile)111 if args.verbosity >= 1: print '\nTROUBLE AHEAD with %s' % (inputFile) 111 112 if args.verbosity >= 3: print ', '.join(sorted(list(set(fromFile)-set(fromField)))) 112 113 # Identify fields in fromFile but not in fromField … … 175 176 except KeyboardInterrupt: 176 177 print "Shutdown requested...exiting" 177 except Exception:178 traceback.print_exc(file=sys.stdout)178 #except Exception: 179 # traceback.print_exc(file=sys.stdout) 179 180 sys.exit(0)
Note: See TracChangeset
for help on using the changeset viewer.