Changeset 950 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jun 24, 2016, 5:30:20 PM (8 years ago)
Author:
lfita
Message:

Fixing `CFUmonths_Udays'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r949 r950  
    79727972            mmdec = newmm - int(newmm)*1.
    79737973            newmm = np.int(newmm)
    7974             daysnextmon = days_month(yr,newmm+1)
     7974            if newmm + 1 > 12:
     7975                daysnextmon = 31
     7976            else:
     7977                daysnextmon = days_month(yr,newmm+1)
    79757978            newdd = daysnextmon*mmdec
    79767979            dddec = newdd - int(newdd)*1.
     
    79887991        else:
    79897992            newmm = np.int(newmm)
    7990             newdd = np.int(newdd)
    7991             newhh = np.int(newhh)
    7992             newmi = np.int(newmi)
    7993             newss = np.int(newss)
     7993            newdd = np.int(dd)
     7994            newhh = np.int(hh)
     7995            newmi = np.int(mi)
     7996            newss = np.int(ss)
    79947997
    79957998        idate = dt.datetime(yr, newmm, newdd, newhh, newmi, newss)
Note: See TracChangeset for help on using the changeset viewer.