- Timestamp:
- Apr 13, 2018, 3:22:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1900 r1906 11039 11039 11040 11040 for it in range(dt): 11041 wrfdates = datetimeStr_conversion( str(timewrfv[it]) +',minutes since ' +\11041 wrfdates = datetimeStr_conversion(gen.Nstr(timewrfv[it]) +',minutes since '+ \ 11042 11042 startdate, 'cfTime', 'matYmdHMS') 11043 11043 cftimes[it] = realdatetime1_CFcompilant(wrfdates, refdate, tunitsval) … … 14156 14156 fdates = ncf.variables[varn][:] 14157 14157 for it in range(fdates.shape[0]): 14158 datesv.append(datetimeStr_conversion( fdates[it], 'cfTime,' + tunits ,\14159 'YmdHMS'))14158 datesv.append(datetimeStr_conversion(gen.Nstr(fdates[it]), 'cfTime,'+\ 14159 tunits , 'YmdHMS')) 14160 14160 14161 14161 ncobjs[filename] = datesv … … 22865 22865 22866 22866 # Times period 22867 begTmat= gen.datetimeStr_conversion(str(timev[0]),'cfTime,'+tunits, 'matYmdHMS') 22868 endTmat= gen.datetimeStr_conversion(str(timev[dimt-1]),'cfTime,'+tunits,'matYmdHMS') 22867 begTmat=gen.datetimeStr_conversion(gen.Nstr(timev[0]),'cfTime,'+tunits,'matYmdHMS') 22868 endTmat = gen.datetimeStr_conversion(gen.Nstr(timev[dimt-1]),'cfTime,'+tunits, \ 22869 'matYmdHMS') 22869 22870 CFbeg = gen.realdatetime1_CFcompilant(begTmat, refdate, tunitsval) 22870 22871 CFend = gen.realdatetime1_CFcompilant(endTmat, refdate, tunitsval) … … 23780 23781 CFdimvalues['calendar'] = tcal 23781 23782 23782 Sinit = gen.datetimeStr_conversion( str(CFitime), 'cfTime,'+tunits,\23783 Sinit = gen.datetimeStr_conversion(gen.Nstr(CFitime), 'cfTime,'+tunits, \ 23783 23784 'Y-m-dTH:M:SZ') 23784 Sendt = gen.datetimeStr_conversion( str(CFetime), 'cfTime,'+tunits,\23785 Sendt = gen.datetimeStr_conversion(gen.Nstr(CFetime), 'cfTime,'+tunits, \ 23785 23786 'Y-m-dTH:M:SZ') 23786 23787 secfreq = gen.CFtime_freq(axisv[0], axisv[1], tunits) … … 24327 24328 mattvals = np.zeros((itvals.shape[0],6), dtype=int) 24328 24329 for it in range(len(tvals)): 24329 mattvals[it,:]= gen.datetimeStr_conversion( str(tvals[it]),\24330 mattvals[it,:]= gen.datetimeStr_conversion(gen.Nstr(tvals[it]), \ 24330 24331 'cfTime,minutes since 1949-12-01 00:00:00', 'matYmdHMS') 24331 24332 elif tkind[0:6] == 'CFtime': … … 24334 24335 mattvals = np.zeros((itvals.shape[0],6), dtype=int) 24335 24336 for it in range(len(tvals)): 24336 mattvals[it,:]= gen.datetimeStr_conversion( str(tvals[it]),\24337 mattvals[it,:]= gen.datetimeStr_conversion(gen.Nstr(tvals[it]), \ 24337 24338 'cfTime,'+utime, 'matYmdHMS') 24338 24339 elif tkind[0:6] == 'string':
Note: See TracChangeset
for help on using the changeset viewer.