NREL/bifacial_radiance

Reversed meaning of surf_tilt and theta using measured tracker angles?

therealmagnusmn opened this issue · 0 comments

I am running a simulation where I have measured tracker angles in the .tmy file which is at 10-minute resolution. For a N-S HSAT, I must therefore set azimuth = 90. I then get a trackerdict looking like this:

2021-12-31_0630 {'surf_azm': 90, 'surf_tilt': 10.69, 'theta': -10.69, 'ghi': 0.8083343731705099, 'dhi': 0.8083343731705099, 'temp_air': 8.460586547851562, 'wind_speed': 0.8994999930262566}
2021-12-31_0640 {'surf_azm': 90, 'surf_tilt': 7.78, 'theta': -7.78, 'ghi': 6.197442710399628, 'dhi': 6.197442710399628, 'temp_air': 8.37457275390625, 'wind_speed': 1.006500005722046}
2021-12-31_0650 {'surf_azm': 90, 'surf_tilt': 1.98, 'theta': 1.98, 'ghi': 19.69523310661316, 'dhi': 19.69523310661316, 'temp_air': 8.768499755859375, 'wind_speed': 1.3375}
2021-12-31_0700 {'surf_azm': 90, 'surf_tilt': 4.61, 'theta': 4.61, 'ghi': 43.4692681312561, 'dhi': 24.98971185684204, 'temp_air': 9.28419189453125, 'wind_speed': 1.4544999957084657}

Thus, surf_tilt is strictly positive, while theta can be both +/-. This results in a tracker not following the sun (the tracker is tilted away from the sun).

I can correct for this by reversing the meaning of the two angles, i.e., by running

for timestamp in trackerdict.keys():
theta = trackerdict[timestamp]['theta']
surf_tilt = trackerdict[timestamp]['surf_tilt']
trackerdict[timestamp]['theta'] = surf_tilt
trackerdict[timestamp]['surf_tilt'] = (-1)*theta

In this case, theta will be strictly positive while surf_tilt can be both positive and negative. In this case the tracker is tilted against the sun. This is all good, but a problem arrives when I instead of running gendaylit want to run a cumulative sky. In this case, theta is used as the key to the trackerdict, and therefore, it cannot be strictly positive. Is there a solution to this that I have not thought of or is this a problem with the software as it is?