Changeset 2693 in lmdz_wrf for trunk


Ignore:
Timestamp:
Aug 12, 2019, 5:52:44 PM (5 years ago)
Author:
lfita
Message:

Using `CFtimeU_inf' in 'CFtimesvar_datetime'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r2687 r2693  
    730730        self.refdate = origSrefdate + ' ' + horrefS + ':' + minrefS + ':' + secrefS
    731731        self.refdateYmdHMS = origSrefdate[0:4] + origSrefdate[5:7] +                 \
    732           origSrefdate[8:10] + horrefS + ':' + minrefS + ':' + secrefS
     732          origSrefdate[8:10] + horrefS + minrefS + secrefS
    733733        self.refdatemat = [yrref, monref, dayref, horref, minref, secref]
    734734        self.refdatejuliand = juliandate(yrref,monref,dayref,horref,minref,secref)
     
    28982898    fname = 'CFtimesvar_datetime'
    28992899
     2900    timeinf = CFtimeU_inf(units)
     2901   
     2902    tunits = timeinf.Tunits
     2903    Srefdate = timeinf.refdate
     2904    refdate = timeinf.refdateDT
     2905
    29002906    availtunits = ['weeks', 'days', 'hours', 'minutes', 'seconds', 'miliseconds']
    29012907
    29022908    txtunits = units.split(' ')
    2903     tunits = txtunits[0]
    2904     Srefdate = txtunits[len(txtunits) - 1]
    2905 # Does reference date contain a time value [YYYY]-[MM]-[DD] [HH]:[MI]:[SS]
    2906 ##
    2907     timeval = Srefdate.find(':')
    2908     if not timeval == -1:
    2909 #        print '  refdate with time!'
    2910         refdate = datetimeStr_datetime(txtunits[len(txtunits) - 2] + '_' + Srefdate)
    2911     else:
    2912         refdate = dateStr_date(Srefdate)
    29132909
    29142910    dimt = len(times)
Note: See TracChangeset for help on using the changeset viewer.