- Timestamp:
- Feb 27, 2015, 3:48:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/create_OBSnetcdf.py
r259 r332 69 69 attr = varobj.setncattr('long_name', vlname) 70 70 attr = varobj.setncattr('units', vunits) 71 72 return 71 73 72 74 def remove_NONascii(string): … … 92 94 for ichar in range(Nchars): 93 95 foundchar = string.find(RTFchar[ichar]) 94 if foundchar != 0:96 if foundchar != -1: 95 97 newstring = newstring.replace(RTFchar[ichar], ASCchar[ichar]) 96 98 … … 691 693 if opts.obsfile is None: 692 694 print errormsg 693 print ' ' + main + ': No observ tions file provided!!'695 print ' ' + main + ': No observations file provided!!' 694 696 quit(-1) 695 697 … … 828 830 # Time variable in CF format 829 831 ## 830 print description['FMTtime'], 'CFtime'831 832 if description['FMTtime'] == 'CFtime': 832 833 timevals = datavalues[description['NAMEtime']] … … 840 841 # Time as a composition of different columns 841 842 tcomposite = description['NAMEtime'].find('@') 842 if tcomposite != 0:843 if tcomposite != -1: 843 844 timevars = description['NAMEtime'].split('@') 844 845
Note: See TracChangeset
for help on using the changeset viewer.