Skip to content

Commit b5994c6

Browse files
Uwe Krienuvchik
authored andcommitted
replace equation with new function for test purposes
1 parent 7d54462 commit b5994c6

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
@@ -677,9 +677,9 @@ def complete_irradiance(self, times=None, weather=None):
677677
warnings.warn(wrn_txt, UserWarning)
678678
if {'ghi', 'dhi'} <= icolumns and 'dni' not in icolumns:
679679
logging.debug('Estimate dni from ghi and dhi')
680-
self.weather.loc[:, 'dni'] = (
681-
(self.weather.loc[:, 'ghi'] - self.weather.loc[:, 'dhi']) /
682-
tools.cosd(self.solar_position.loc[:, 'zenith']))
680+
self.weather.loc[:, 'dni'] = pvlib.irradiance.dni(
681+
self.weather.loc[:, 'ghi'], self.weather.loc[:, 'dhi'],
682+
self.solar_position.loc[:, 'zenith'])
683683
elif {'dni', 'dhi'} <= icolumns and 'ghi' not in icolumns:
684684
logging.debug('Estimate ghi from dni and dhi')
685685
self.weather.loc[:, 'ghi'] = (

0 commit comments

Comments
 (0)