Changeset 798 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 1, 2016, 6:37:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing_tools.py
r797 r798 804 804 if len(values) != 8: 805 805 print errormsg 806 print "problem in varibale: '", values[0],\807 'it should have 8 values and it has',len(values)806 print "problem in varibale: '", values[0], \ 807 "' it should have 8 values and it has:", len(values) 808 808 quit(-1) 809 809 … … 1963 1963 if trefu == 's': timev = timev - secs0001_1901 1964 1964 if trefu == 'l': timev = timev - secs0001_1901*1000. 1965 1966 if refdate.year < 1901: 1967 print warnmsg 1968 print ' ' + fname + ': changing reference date: ',refdate, \ 1969 'to 1901-01-01_00:00:00 !!!' 1970 diffrefs = dt.datetime(1901,1,1,0,0,0) - refdate 1971 if gen.searchInlist(dir(diffrefs), 'total_seconds'): 1972 secsref_1901 = diffrefs.total_seconds() 1973 else: 1974 secsref_1901 = diffrefs.days()*3600*24. + diffrefs.seconds()*1. 1975 refdate = datetimeStr_datetime('1901-01-01_00:00:00') 1976 print 'time 0 :', timev[0] 1977 if trefu == 'w': timev = timev - secsref_1901/(7.*24.*3600.) 1978 if trefu == 'd': timev = timev - secsref_1901/(24.*3600.) 1979 if trefu == 'h': timev = timev - secsref_1901/(3600.) 1980 if trefu == 'm': timev = timev - secsref_1901/(60.) 1981 if trefu == 's': timev = timev - secsref_1901 1982 if trefu == 'l': timev = timev - secsref_1901*1000. 1983 print 'time 0 after:', timev[0] 1965 1984 1966 1985 firstT = timev[0]
Note: See TracChangeset
for help on using the changeset viewer.