Changeset 1309 in lmdz_wrf for trunk


Ignore:
Timestamp:
Nov 10, 2016, 2:39:39 PM (8 years ago)
Author:
lfita
Message:

Adding check for existence of `total_seconds' attribute in 'coincident_CFtimes'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r1254 r1309  
    62336233
    62346234        difft = trefTB - trefTA
    6235         diffv = difft.days*24.*3600.*10.e6 + difft.seconds*10.e6 + difft.microseconds
     6235        if searchInlist(difft.keys(), 'total_seconds'):
     6236            diffv = difft.total_seconds*10.e6
     6237        else:
     6238            diffv = difft.days*24.*3600.*10.e6 + difft.seconds*10.e6 + difft.microseconds
    62366239        print '  ' + fname + ': different reference refA:',trefTA,'refB',trefTB
    62376240        print '    difference:',difft,':',diffv,'microseconds'
Note: See TracChangeset for help on using the changeset viewer.