Changeset 602 in lmdz_wrf for trunk/tools/validation_sim.py


Ignore:
Timestamp:
Jul 16, 2015, 3:25:23 PM (9 years ago)
Author:
lfita
Message:

Changing reference units on `coincident_CFtimes' to seconds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/validation_sim.py

    r601 r602  
    795795
    796796        difft = trefTB - trefTA
    797         diffv = difft.days*24.*3600.*10.e6 + difft.seconds*10.e6 + difft.microseconds
     797        diffv = difft.days*24.*3600. + difft.seconds + difft.microseconds/1.e6
    798798        print '  ' + fname + ': different reference refA:',trefTA,'refB',trefTB
    799         print '    difference:',difft,':',diffv,'microseconds'
     799        print '    difference:',difft,':',diffv,'(in seconds)'
    800800
    801801        if tuA == 'microseconds':
     802            tB = tB + diffv*1.e6
     803        elif tuA == 'seconds':
    802804            tB = tB + diffv
    803         elif tuA == 'seconds':
    804             tB = tB + diffv/10.e6
    805805        elif tuA == 'minutes':
    806             tB = tB + diffv/(60.*10.e6)
     806            tB = tB + diffv/(60.)
    807807        elif tuA == 'hours':
    808             tB = tB + diffv/(3600.*10.e6)
    809         elif tuA == 'dayss':
    810             tB = tB + diffv/(24.*3600.*10.e6)
     808            tB = tB + diffv/(3600.)
     809        elif tuA == 'days':
     810            tB = tB + diffv/(24.*3600.)
    811811        else:
    812812            print errormsg
     
    19371937iobst = CFtimes_datetime_NOfile([valdimobs['T'][0]], obstunits, 'standard')
    19381938fobst = CFtimes_datetime_NOfile([valdimobs['T'][dimtobs-1]], obstunits, 'standard')
     1939print 'Lluis:', simobstimes[0],'tobs:',obstunits
    19391940isimt = CFtimes_datetime_NOfile([simobstimes[0]], obstunits, 'standard')
    19401941fsimt = CFtimes_datetime_NOfile([simobstimes[dimtsim-1]], obstunits, 'standard')
Note: See TracChangeset for help on using the changeset viewer.