Changeset 2694 in lmdz_wrf for trunk


Ignore:
Timestamp:
Aug 12, 2019, 8:09:28 PM (6 years ago)
Author:
lfita
Message:

Making use in different places of `CFtimeU_inf'

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r2693 r2694  
    1553315533            for it in range(dimt):
    1553415534                if mattimes[it,1] == 2 and mattimes[it,2] == 29:
    15535                     print '  ' + fname + ": for time section '" + timesce +          \
     15535                    print '  ' + fname + ": for time section '" + timesec +          \
    1553615536                      "' no leap date February 29 !!"
    1553715537                else:
     
    1583415834
    1583515835    # 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
    1585815841    #print '  dates slices ________'
    1585915842    if per[0:3] == 'agg':
  • trunk/tools/nc_var_tools.py

    r2562 r2694  
    2630626306        timec = 'standard'
    2630726307
    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
    2631026311
    2631126312    # Getting periods
Note: See TracChangeset for help on using the changeset viewer.