- Timestamp:
- Aug 12, 2019, 8:09:28 PM (6 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2693 r2694 15533 15533 for it in range(dimt): 15534 15534 if mattimes[it,1] == 2 and mattimes[it,2] == 29: 15535 print ' ' + fname + ": for time section '" + times ce+ \15535 print ' ' + fname + ": for time section '" + timesec + \ 15536 15536 "' no leap date February 29 !!" 15537 15537 else: … … 15834 15834 15835 15835 # Passing to CF-times 15836 Srefdate0 = tu.split(' ')[2] 15837 Sreftime0 = tu.split(' ')[3] 15838 tunits = tu.split(' ')[0] 15839 15840 if Srefdate0.find('/') != -1: Srdate = Srefdate0.replace('/', '') 15841 elif Srefdate0.find('-') != -1: Srdate = Srefdate0.replace('-','') 15842 else: 15843 print errormsg 15844 print ' ' + fname + ": I do not know how to create a [YYYY][MM][DD] " + \ 15845 "date with '" + Srefdate0 + "' !!" 15846 print " expecting '/' or '-' splitting characters" 15847 quit(-1) 15848 15849 if Sreftime0.find(':') != -1: Srtime = Sreftime0.replace(':', '') 15850 else: 15851 print errormsg 15852 print ' ' + fname + ": I do not know how to create a [HH][MI][SS] " + \ 15853 "date with '" + Sreftime0 + "' !!" 15854 print " expecting ':' splitting character" 15855 quit(-1) 15856 15857 Srefdate = Srdate + Srtime 15836 tinf = CFtimeU_inf(tu) 15837 15838 Srefdate = tinf.refdateYmdHMS 15839 tunits = tinf.Tunits 15840 15858 15841 #print ' dates slices ________' 15859 15842 if per[0:3] == 'agg': -
trunk/tools/nc_var_tools.py
r2562 r2694 26306 26306 timec = 'standard' 26307 26307 26308 tunits = timeu.split(' ')[0] 26309 trefdate = timeu.split(' ')[2] + '_' + timeu.split(' ')[3] 26308 timeinf = gen.CFtimeU_inf(timeu) 26309 tunits = timeinf.Tunits 26310 trefdate = timeinf.refdate 26310 26311 26311 26312 # Getting periods
Note: See TracChangeset
for help on using the changeset viewer.