-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spa_python
with numba
fails with array input
#2166
Comments
I'm inclined to consider this a feature request rather than a bug report since It seems possible to modify the numba code to allow arrays for lat/lon, although the code might be a little ugly. @markveillette do you need specifically the SPA for your application, or would a faster (but somewhat less accurate) solar position algorithm be acceptable? |
fair enough! That makes total sense, appreciate you looking at this so quickly. For my use case, yes, I am okay with fast-but-not-perfectly-accurate. e.g. <1 degree error. I've found a some repos online that offer this, e.g. https://github.com/david-salac/Fast-SZA-and-SAA-computation/tree/master |
SG2 was developed for a mesh of latitudes and longitudes: https://github.com/gschwind/sg2 Works for python < 3.12 |
Another option in pvlib is A future version of pvlib may have even better alternatives. |
Describe the bug
I'm trying to call
pvlib.solarposition.spa_python
with arrays for time, latitudes and longitudes. It works fine by default, but I get an error if I usehow='numba'
with the same inputs.To Reproduce
The following reproduces my error:
The error I get is
Expected behavior
Both calls to
spa_python
should give same result, given the inputs are identical.Versions:
pvlib.__version__
: 0.11.0pandas.__version__
: 2.2.2The text was updated successfully, but these errors were encountered: