Changeset 1339 for trunk/libIGCM


Ignore:
Timestamp:
08/17/16 10:09:01 (8 years ago)
Author:
sdipsl
Message:
  • adjust the printed look and feel
Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r1338 r1339  
    630630    if [ ${#FileDef[@]} -ne 0 ] ; then 
    631631      # 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[*]} 
    633634      if [ $? = 0 ] ; then 
    634         IGCM_debug_Print 3 "${compname} XIOS XMLs are consistent" 
     635        IGCM_debug_Print 1 "${compname} XIOS XMLs are consistent" 
    635636      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}" 
    639641      fi 
    640642    fi 
  • trunk/libIGCM/libIGCM_post/xios_parser.py

    r1337 r1339  
    1313#************************************************************** 
    1414 
    15 import os, pwd, sys, traceback, argparse, readline, rlcompleter 
     15import os, pwd, sys, traceback, argparse 
    1616import xml.etree.ElementTree as ET 
    17 readline.parse_and_bind("tab: complete") 
     17#import readline, rlcompleter 
     18#readline.parse_and_bind("tab: complete") 
    1819 
    1920indent = 0 
     
    5051 
    5152def findField(root): 
    52     """Recursively find and list field tag with ID or field_ref attribute.""" 
     53    """Recursively find and list field tag with "id" or "field_ref" attribute.""" 
    5354    global fromField 
    5455    global fromFile 
     
    104105        # Compare the two lists. fromField must be a superset of fromFile. 
    105106        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) 
    107108            if args.verbosity >= 3: print 'fromField=', fromField 
    108109            if args.verbosity >= 3: print 'fromFile=', fromFile 
    109110        else: 
    110             if args.verbosity >= 1: print 'TROUBLE AHEAD with %s' % (inputFile) 
     111            if args.verbosity >= 1: print '\nTROUBLE AHEAD with %s' % (inputFile) 
    111112            if args.verbosity >= 3: print ', '.join(sorted(list(set(fromFile)-set(fromField)))) 
    112113            # Identify fields in fromFile but not in fromField 
     
    175176    except KeyboardInterrupt: 
    176177        print "Shutdown requested...exiting" 
    177     except Exception: 
    178         traceback.print_exc(file=sys.stdout) 
     178    #except Exception: 
     179    #    traceback.print_exc(file=sys.stdout) 
    179180    sys.exit(0) 
Note: See TracChangeset for help on using the changeset viewer.