Skip to content

Commit a5acebd

Browse files
Uwe KrienUwe Krien
Uwe Krien
authored and
Uwe Krien
committed
replace equation with new function for test purposes
1 parent 6907b6c commit a5acebd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pvlib/modelchain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,9 @@ def complete_irradiance(self, times=None, weather=None):
645645
warnings.warn(wrn_txt, UserWarning)
646646
if {'ghi', 'dhi'} <= icolumns and 'dni' not in icolumns:
647647
logging.debug('Estimate dni from ghi and dhi')
648-
self.weather.loc[:, 'dni'] = (
649-
(self.weather.loc[:, 'ghi'] - self.weather.loc[:, 'dhi']) /
650-
tools.cosd(self.solar_position.loc[:, 'zenith']))
648+
self.weather.loc[:, 'dni'] = pvlib.irradiance.dni(
649+
self.weather.loc[:, 'ghi'], self.weather.loc[:, 'dhi'],
650+
self.solar_position.loc[:, 'zenith'])
651651
elif {'dni', 'dhi'} <= icolumns and 'ghi' not in icolumns:
652652
logging.debug('Estimate ghi from dni and dhi')
653653
self.weather.loc[:, 'ghi'] = (

0 commit comments

Comments
 (0)