Changeset 2186 in lmdz_wrf


Ignore:
Timestamp:
Oct 17, 2018, 6:48:40 PM (6 years ago)
Author:
lfita
Message:

Adding management of dates in `coincident_CFtimes'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r2185 r2186  
    98099809    tunitB = tunitB.replace('_',' ')
    98109810
    9811     trefA = tunitA.split(' ')[2] + ' ' + tunitA.split(' ')[3]
    9812     trefB = tunitB.split(' ')[2] + ' ' + tunitB.split(' ')[3]
     9811    if len(tunitA) == 4:
     9812        trefA = tunitA.split(' ')[2] + ' ' + tunitA.split(' ')[3]
     9813    else:
     9814        print warnmsg
     9815        print '  ' + fname + ": time-units without time '" + tunitA + "' !!"
     9816        print "    adding: '00:00:001"
     9817        trefA = tunitA.split(' ')[2] + ' 00:00:00'
     9818
     9819    if len(tunitB) == 4:
     9820        trefB = tunitB.split(' ')[2] + ' ' + tunitB.split(' ')[3]
     9821    else:
     9822        print warnmsg
     9823        print '  ' + fname + ": time-units without time '" + tunitB + "' !!"
     9824        print "    adding: '00:00:001"
     9825        trefB = tunitB.split(' ')[2] + ' 00:00:00'
    98139826    tuA = tunitA.split(' ')[0]
    98149827    tuB = tunitB.split(' ')[0]
Note: See TracChangeset for help on using the changeset viewer.