- Timestamp:
- Apr 4, 2018, 5:26:36 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1890 r1891 24303 24303 24304 24304 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' 24306 24306 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' 24308 24308 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' 24310 24310 elif np.mod(secfreq, 24 * 3600.) == 0.: 24311 Sfreq = str(int(secfreq/(24.*3600.))) + ' D'24311 Sfreq = str(int(secfreq/(24.*3600.))) + ',D' 24312 24312 elif np.mod(secfreq,3600.) == 0.: 24313 Sfreq = str(int(secfreq/3600.)) + ' H'24313 Sfreq = str(int(secfreq/3600.)) + ',H' 24314 24314 elif np.mod(secfreq,60.) == 0.: 24315 Sfreq = str(int(secfreq/60.)) + ' M'24315 Sfreq = str(int(secfreq/60.)) + ',M' 24316 24316 else: 24317 24317 print ' ' + fname + ": data from file does not conform "+\
Note: See TracChangeset
for help on using the changeset viewer.