Changeset 1891 in lmdz_wrf for trunk


Ignore:
Timestamp:
Apr 4, 2018, 5:26:36 PM (7 years ago)
Author:
lfita
Message:

Adding comma for better parsing... in 'itime' on conforming frequency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1890 r1891  
    2430324303
    2430424304    if np.mod(secfreq, 100 * 365 * 24 * 3600.) == 0.:
    24305         Sfreq = str(int(secfreq/(100 * 365 * 24 * 3600.))) + 'C'
     24305        Sfreq = str(int(secfreq/(100 * 365 * 24 * 3600.))) + ',C'
    2430624306    elif np.mod(secfreq, 365 * 24 * 3600.) == 0.:
    24307         Sfreq = str(int(secfreq/(365 * 24 * 3600.))) + 'Y'
     24307        Sfreq = str(int(secfreq/(365 * 24 * 3600.))) + ',Y'
    2430824308    elif np.mod(secfreq, 7 * 24 * 3600.) == 0.:
    24309         Sfreq = str(int(secfreq/(7 * 24 * 3600.))) + 'W'
     24309        Sfreq = str(int(secfreq/(7 * 24 * 3600.))) + ',W'
    2431024310    elif np.mod(secfreq, 24 * 3600.) == 0.:
    24311         Sfreq = str(int(secfreq/(24.*3600.))) + 'D'
     24311        Sfreq = str(int(secfreq/(24.*3600.))) + ',D'
    2431224312    elif np.mod(secfreq,3600.) == 0.:
    24313         Sfreq = str(int(secfreq/3600.)) + 'H'
     24313        Sfreq = str(int(secfreq/3600.)) + ',H'
    2431424314    elif np.mod(secfreq,60.) == 0.:
    24315         Sfreq = str(int(secfreq/60.)) + 'M'
     24315        Sfreq = str(int(secfreq/60.)) + ',M'
    2431624316    else:
    2431724317        print '  ' + fname + ": data from file does not conform "+\
Note: See TracChangeset for help on using the changeset viewer.