Changeset 944 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 24, 2016, 11:27:27 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r942 r944 7962 7962 newdatev = np.zeros((len(datev)), dtype=np.float) 7963 7963 for itv in range(len(datev)): 7964 if mm + datev[itv] - refm > 12:7965 yr = yr + 17964 while mm + datev[itv] - refm > 12.: 7965 yr = int(yr + 1) 7966 7966 refm = refm + 12 7967 7967 7968 print itv, datev[itv], yr, refm, mm + datev[itv] - refm 7969 idate = dt.datetime(yr, mm + datev[itv] - refm, dd, hh, mi, ss) 7968 newmm = mm + datev[itv] - refm 7969 if newmm/int(newmm) - 1. != 0.: 7970 print errormsg 7971 print ' ' + fname + ': fractional months values', newmm, 'not ready!!' 7972 quit(-1) 7973 newmm = np.int(newmm) 7974 7975 idate = dt.datetime(yr, newmm, dd, hh, mi, ss) 7970 7976 7971 7977 diffT = idate - refT … … 7977 7983 return newdatev, newtunits 7978 7984 7979 print CFmonthU_daysU([1,2,3,4,5,6,17,18,], 'months since 1979-12-01 00:00:00')7980 7981 7985 #quit() 7982 7986
Note: See TracChangeset
for help on using the changeset viewer.