Changeset 843 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jun 16, 2016, 6:04:15 PM (8 years ago)
Author:
lfita
Message:

Fixing tiny issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r840 r843  
    609609
    610610    if len(MODvars) == 0:
    611         print errormsg
    612         print '  ' + fname + ": variable '" + varn + "' not defined !!!"
     611#        print errormsg
     612#        print '  ' + fname + ": variable '" + varn + "' not defined !!!"
    613613        ncf.close()
    614614        return None
     
    652652    for line in ncf:
    653653        if line[0:1] != '#':
    654             values = line.replace('\n','').split(',')
    655             varvals = [values[0], values[1], values[2]]
    656             if varvals[0] == varn: MODvars.append(values[2].split('@'))
     654            values = line.replace('\n','').replace(' ','').split(',')
     655            if values[0] == varn: MODvars.append(values[2].split('@'))
    657656
    658657    if len(MODvars) == 0:
    659         print errormsg
    660         print '  ' + fname + ": variable '" + varn + "' not defined !!!"
     658#        print errormsg
     659#        print '  ' + fname + ": variable '" + varn + "' not defined !!!"
    661660        ncf.close()
    662661        return None
    663662    else:
    664663        return MODvars
    665 
    666 print CFvar_DIAGvar('pr')
    667 print CFvar_DIAGvar('hurs')
    668 
    669 quit()
    670664
    671665def variables_values_old(varName):
Note: See TracChangeset for help on using the changeset viewer.