From e0c991a650935564ef3c1bdb06284b6d64674d33 Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Wed, 2 Sep 2026 11:46:16 +0300 Subject: [PATCH 1/2] Fix transposed Hellmann exponent table in windspeed_powerlaw docstring The docstring table lists stability down the rows and surface type across the columns, but the nine values were laid out in the order they appear in HELLMANN_SURFACE_EXPONENTS, which groups by surface type. Four of the nine cells therefore disagree with the dict the function actually uses. The corrected table is the transpose of the printed one, which is why the five cells on the diagonal already agreed. --- pvlib/atmosphere.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvlib/atmosphere.py b/pvlib/atmosphere.py index f3b793e6b3..792148a7a8 100644 --- a/pvlib/atmosphere.py +++ b/pvlib/atmosphere.py @@ -728,11 +728,11 @@ def windspeed_powerlaw(wind_speed_reference, height_reference, +-----------+--------------------+------------------+------------------+ | Stability | Open water surface | Flat, open coast | Cities, villages | +===========+====================+==================+==================+ - | Unstable | 0.06 | 0.10 | 0.27 | + | Unstable | 0.06 | 0.11 | 0.27 | +-----------+--------------------+------------------+------------------+ - | Neutral | 0.11 | 0.16 | 0.40 | + | Neutral | 0.10 | 0.16 | 0.34 | +-----------+--------------------+------------------+------------------+ - | Stable | 0.27 | 0.34 | 0.60 | + | Stable | 0.27 | 0.40 | 0.60 | +-----------+--------------------+------------------+------------------+ In a report by Sandia [3]_, the equation was experimentally tested for a From 164cb8a5f9a354148b5640db2187c0114e17e300 Mon Sep 17 00:00:00 2001 From: Dylan Pulver Date: Wed, 2 Sep 2026 11:47:24 +0300 Subject: [PATCH 2/2] Add whatsnew entry for the Hellmann exponent table fix --- docs/sphinx/source/whatsnew/v0.16.0.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.16.0.rst b/docs/sphinx/source/whatsnew/v0.16.0.rst index 78fe64be82..21ebc8473f 100644 --- a/docs/sphinx/source/whatsnew/v0.16.0.rst +++ b/docs/sphinx/source/whatsnew/v0.16.0.rst @@ -75,6 +75,10 @@ Enhancements Documentation ~~~~~~~~~~~~~ * Remove `g_poa_effective` from the :ref:`nomenclature` page (:pull:`2704`) +* Correct the transposed table of Hellmann exponents in the + :py:func:`pvlib.atmosphere.windspeed_powerlaw` docstring, which disagreed + with :py:data:`pvlib.atmosphere.HELLMANN_SURFACE_EXPONENTS` in four of its + nine cells. (:pull:`2853`) Testing @@ -101,3 +105,4 @@ Contributors * Sai Asish Y (:ghuser:`SAY-5`) * Kevin Anderson (:ghuser:`kandersolar`) * Johann Loux (:ghuser:`JoLo90`) +* Dylan Pulver (:ghuser:`dylanpulver`)