diff --git a/Lib/times.py b/Lib/times.py index 9976886..f1cb7b8 100644 --- a/Lib/times.py +++ b/Lib/times.py @@ -135,12 +135,11 @@ def isMonthly(s): units=tim.units monthly=1 for i in range(len(tim)-1): - month1=cdtime.reltime(tim[i],units).torel('months since 2000').value - month2=cdtime.reltime(tim[i+1],units).torel('months since 2000').value + month1=cdtime.reltime(tim[i],units).torel('months since 2000',tim.getCalendar()).value + month2=cdtime.reltime(tim[i+1],units).torel('months since 2000',tim.getCalendar()).value if month2-month1!=1 : monthly=0 return monthly - def mergeTime(ds,statusbar=1,fill_value=1.e20): ''' Merge chronologically a bunch of slab @@ -776,7 +775,7 @@ def dayBasedSlicer(tim,arg=None): subarg='feb-29' else: t=cdtime.reltime(index,'month since 1997') - t=t.tocomp() + t=t.tocomp(tim.getCalendar()) subarg=str(t.month)+'-'+str(t.day) except: raise Exception,"Error, dayBasedSlicer args must have '-' or '/' as month/day separator" diff --git a/share/test_data_files.txt b/share/test_data_files.txt index 24fc9c9..23e6546 100644 --- a/share/test_data_files.txt +++ b/share/test_data_files.txt @@ -1,4 +1,4 @@ -http://uvcdat.llnl.gov/cdat/sample_data +https://uvcdat.llnl.gov/cdat/sample_data aa51aa896ead44019335cebec68e7955 clt.nc 332feb65b3801d7ab25845976bd23d85 vertical.nc 0f928d5cc8b80e6a509a0a00f0fc87ad tas_mo.nc