diff --git a/docs/sphinx/source/whatsnew/v0.9.2.rst b/docs/sphinx/source/whatsnew/v0.9.2.rst index dcce33370f..e5b10ffdd5 100644 --- a/docs/sphinx/source/whatsnew/v0.9.2.rst +++ b/docs/sphinx/source/whatsnew/v0.9.2.rst @@ -14,6 +14,9 @@ Enhancements * Add :py:func:`pvlib.tracking.calc_surface_orientation` for calculating single-axis tracker ``surface_tilt`` and ``surface_azimuth`` from rotation angles. (:issue:`1471`, :pull:`1480`) +* Improve error message about uneven time intervals for + :py:func:`~pvlib.clearsky.detect_clearsky` and :py:func:`~pvlib.temperature.prilliman` + (:issue:`1476`, :pull:`1490`) Bug fixes ~~~~~~~~~ @@ -59,3 +62,4 @@ Contributors * Cliff Hansen (:ghuser:`cwhanse`) * Jules Chéron (:ghuser:`jules-ch`) * Kurt Rhee (:ghuser:`kurt-rhee`) +* Will Hobbs (:ghuser:`williamhobbs`) diff --git a/pvlib/temperature.py b/pvlib/temperature.py index 6a4ed1fd6e..68a2869914 100644 --- a/pvlib/temperature.py +++ b/pvlib/temperature.py @@ -839,7 +839,8 @@ def prilliman(temp_cell, wind_speed, unit_mass=11.1, coefficients=None): .. warning:: This implementation requires the time series inputs to be regularly sampled in time with frequency less than 20 minutes. Data with - irregular time steps should be resampled prior to using this function. + irregular time steps (including from data gaps, missing leap days, + etc) should be resampled prior to using this function. Parameters ---------- diff --git a/pvlib/tools.py b/pvlib/tools.py index 61e6d170c4..dd5730ee6f 100644 --- a/pvlib/tools.py +++ b/pvlib/tools.py @@ -406,5 +406,9 @@ def _get_sample_intervals(times, win_length): samples_per_window = int(win_length / sample_interval) return sample_interval, samples_per_window else: - raise NotImplementedError('algorithm does not yet support unequal ' - 'times. consider resampling your data.') + message = ( + 'algorithm does not yet support unequal time intervals. consider ' + 'resampling your data and checking for gaps from missing ' + 'periods, leap days, etc.' + ) + raise NotImplementedError(message)