Changeset 2705 in lmdz_wrf for trunk/tools/generic_tools.py
- Timestamp:
- Sep 18, 2019, 4:54:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2704 r2705 645 645 00 UTC) 646 646 refdateDT = reference date as datetime object 647 Tunits = origtunits647 Tunits = units of time (one of 'weeks', 'days', 'hours', 'minutes', 'seconds') 648 648 utoweeks = Factor to convert values from original temporal units to weeks 649 649 utodays = Factor to convert values from original temporal units to days … … 744 744 self.refdateDT = None 745 745 746 self.Tunits = origtunits 746 self.Tunits = origtunits.lower() 747 747 748 748 … … 10614 10614 fname = 'coincident_CFtimes' 10615 10615 10616 tunitA = tunitA.replace('_',' ') 10617 tunitB = tunitB.replace('_',' ') 10618 10619 if len(tunitA) == 4: 10620 trefA = tunitA.split(' ')[2] + ' ' + tunitA.split(' ')[3] 10621 else: 10622 print warnmsg 10623 print ' ' + fname + ": time-units without time '" + tunitA + "' !!" 10624 print " adding: '00:00:00" 10625 trefA = tunitA.split(' ')[2] + ' 00:00:00' 10626 10627 if len(tunitB) == 4: 10628 trefB = tunitB.split(' ')[2] + ' ' + tunitB.split(' ')[3] 10629 else: 10630 print warnmsg 10631 print ' ' + fname + ": time-units without time '" + tunitB + "' !!" 10632 print " adding: '00:00:00" 10633 trefB = tunitB.split(' ')[2] + ' 00:00:00' 10634 tuA = tunitA.split(' ')[0] 10635 tuB = tunitB.split(' ')[0] 10616 tinfA = CFtimeU_inf(tunitA) 10617 tinfB = CFtimeU_inf(tunitB) 10618 10619 trefA = tinfA.refdate 10620 trefB = tinfB.refdate 10621 10622 tuA = tinfA.Tunits 10623 tuB = tinfB.Tunits 10636 10624 10637 10625 # if tuB == 'months':
Note: See TracChangeset
for help on using the changeset viewer.