-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Closed
Copy link
Description
Describe the bug
Solar elevation values are wrong when using the default nrel_numpy method
To Reproduce
Steps to reproduce the behavior:
import pvlib
# Example usage:
latitude = 37.7749 # Replace with the desired latitude
longitude = -122.4194 # Replace with the desired longitude
# Create a sample DatetimeIndex (replace with your own datetime index)
date_index = pd.date_range(start='2023-01-01', end='2023-01-05', freq='H')
correct_results = pvlib.solarposition.get_solarposition(
time=date_index,
latitude=37.804363,
longitude=-122.271111,
method="pyephem"
)
incorrect_results = pvlib.solarposition.get_solarposition(
time=date_index,
latitude=37.804363,
longitude=-122.271111,
)
Expected behavior
solar altitude should be on a negative/positive cycle throughout a day
Screenshots
Versions:
pvlib.__version__: 0.10.2pandas.__version__: 2.1.4- python: 3.10.13
Additional context
Add any other context about the problem here.
There's obviously a workaround, but this was a surprising error, is this known?