From 35c2bff67a61e1927359a8fa74a0cfac9947b2c1 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 21 Feb 2020 14:32:24 -0700 Subject: [PATCH 1/3] compat for cftime 1.1 --- pvlib/forecast.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 9533b9535b..79ec8e9135 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -406,7 +406,8 @@ def set_time(self, time): ------- pandas.DatetimeIndex ''' - times = num2date(time[:].squeeze(), time.units) + times = num2date(time[:].squeeze(), time.units, + only_use_cftime_datetimes=False) self.time = pd.DatetimeIndex(pd.Series(times), tz=self.location.tz) def cloud_cover_to_ghi_linear(self, cloud_cover, ghi_clear, offset=35, From 4d1b3d156edbee212c8d3c9a791f3fbe271a6395 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 21 Feb 2020 14:33:35 -0700 Subject: [PATCH 2/3] unused import --- pvlib/forecast.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 79ec8e9135..e760b18c10 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -2,7 +2,6 @@ The 'forecast' module contains class definitions for retreiving forecasted data from UNIDATA Thredd servers. ''' -import datetime from netCDF4 import num2date import numpy as np import pandas as pd From 4061e9225e135be09426cf36459862513dc41b5c Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 21 Feb 2020 14:37:30 -0700 Subject: [PATCH 3/3] whats new --- docs/sphinx/source/whatsnew/v0.7.2.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sphinx/source/whatsnew/v0.7.2.rst b/docs/sphinx/source/whatsnew/v0.7.2.rst index d57a2062cd..7df2550d9d 100644 --- a/docs/sphinx/source/whatsnew/v0.7.2.rst +++ b/docs/sphinx/source/whatsnew/v0.7.2.rst @@ -29,6 +29,7 @@ Bug fixes `0.7.0 what's new `_ entries about changes to ``PVSystem.pvwatts_ac``. Delete unreleased 0.6.4 what's new file. (:issue:`898`) +* Compatibility with cftime 1.1. (:issue:`895`) Documentation ~~~~~~~~~~~~~