Skip to content

Commit 068b02b

Browse files
committed
Add testing and whatsnew
1 parent f376314 commit 068b02b

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

docs/sphinx/source/whatsnew/v0.13.1.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ v0.13.1 (Anticipated September, 2025)
66

77
Breaking Changes
88
~~~~~~~~~~~~~~~~
9+
* Change refraction for solar elevation angles between 85 and 90
10+
degrees to be calculated rather than set to 0 in
11+
:py:func:`~pvlib.solarposition.ephemeris`. (:pull:`2524`)
912

1013

1114
Deprecations

tests/test_solarposition.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,3 +964,15 @@ def test_spa_python_numba_physical_dst(expected_solpos, golden):
964964
temperature=11, delta_t=67,
965965
atmos_refract=0.5667,
966966
how='numpy', numthreads=1)
967+
968+
969+
def test_ephmeris_refraction_85_90_degrees():
970+
# Test that refraction is calculated rather than set to zero
971+
# for solar elevatoin angles between 85 and 90 degrees
972+
# PR#2524
973+
# The below example has a solar elevation angle of 87.9
974+
result = solarposition.ephemeris(
975+
time=pd.date_range('2020-03-23 12', periods=1, tz='UTC'),
976+
latitude=0, longitude=0)
977+
refraction = (result['apparent_zenith'] - result['zenith']).iloc[0]
978+
assert refraction == -0.0005818446332597205

0 commit comments

Comments
 (0)