- Timestamp:
- Jun 16, 2016, 6:04:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r840 r843 609 609 610 610 if len(MODvars) == 0: 611 print errormsg612 print ' ' + fname + ": variable '" + varn + "' not defined !!!"611 # print errormsg 612 # print ' ' + fname + ": variable '" + varn + "' not defined !!!" 613 613 ncf.close() 614 614 return None … … 652 652 for line in ncf: 653 653 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('@')) 657 656 658 657 if len(MODvars) == 0: 659 print errormsg660 print ' ' + fname + ": variable '" + varn + "' not defined !!!"658 # print errormsg 659 # print ' ' + fname + ": variable '" + varn + "' not defined !!!" 661 660 ncf.close() 662 661 return None 663 662 else: 664 663 return MODvars 665 666 print CFvar_DIAGvar('pr')667 print CFvar_DIAGvar('hurs')668 669 quit()670 664 671 665 def variables_values_old(varName):
Note: See TracChangeset
for help on using the changeset viewer.