Changeset 1310 in lmdz_wrf for trunk


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

Fixing the reference date issue on `LMDZ_toCF'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1308 r1310  
    1760517605    # Fixing 0000 year issue...
    1760617606    Stunits = tunits.split(' ')
    17607     Utunits = tunits[0]
     17607    Utunits = Stunits[0]
    1760817608    if len(Stunits) == 4:
    1760917609        datetunits = Stunits[2] + ' ' + Stunits[3]
     
    1761317613    if int(datetunits[0:4]) == 0:
    1761417614        print warnmsg
     17615        newdatetunits = datetunits.replace('0000', '1900')
     17616        tunits = Utunits + ' since ' + newdatetunits
    1761517617        print '  ' + fname + ": Imposing a new units year for dates on '1900' !!"
    17616         datetunits[0:4] = '1900'
    17617         tunits = Utunits + ' since ' + datetunits
     17618        print '    new time units reference: ' + tunits
    1761817619
    1761917620    RefDate = CFT.split(' ')[2]
Note: See TracChangeset for help on using the changeset viewer.