Runtime warning in singleaxis tracker
See original GitHub issueDescribe the bug ~\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pvlib\tracking.py:555: RuntimeWarning: invalid value encountered in remainder surface_azimuth = surface_azimuth % 360
To Reproduce
I used this code :
import pandas as pd
import numpy as np
import pvlib
azimuth = pd.read_csv("Azimuth.csv")
zenith = pd.read_csv("solar2.csv")
Plib = pvlib.tracking.SingleAxisTracker()
data=Plib.singleaxis(apparent_zenith=zenith['SolarZenithAngle'],apparent_azimuth=azimuth['Azimuth'])
print(data)
Expected behavior
Should have got the tracking values
Screenshots If applicable, add screenshots to help explain your problem.
Versions:
pvlib.__version__: 0.7.1pandas.__version__: 1.0.1- python: 3.8.1
Additional context solar2.csv and Azimuth.csv are normal csv files with Irradiance and angle data Similar to issue #622 Didnt find a solution there or anywhere else
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
Sure Thanks a lot for your help!
@HrushikeshBodas, we frequently see issues when the datetime series is not timezone aware. Can you make sure that the timezone is correct? You can use either the
tzargument inpandas.DatetimeIndexor the.tz_localizemethod to convert a naive datetime series to timezone aware. A quick way to tell is to check the solar position, if the solar zenith is less than 90° during the day and a minimum near noon.If you find you have now resolved this issue, perhaps you can close it? Thanks!
Also I encourage you and others to read through and/or post on the pvlib Google Group or with the
[pvlib]tag on StackOverflow before posting an issue. For more information, please see the documentation section on getting help.Cheers!