Skip to content

Commit b9f6365

Browse files
committed
remove warning if new function is used
1 parent abf02af commit b9f6365

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pvlib/modelchain.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,18 +674,20 @@ def complete_irradiance(self, times=None, weather=None):
674674
"Results can be too high or negative.\n" +
675675
"Help to improve this function on github:\n" +
676676
"https://github.com/pvlib/pvlib-python \n")
677-
warnings.warn(wrn_txt, UserWarning)
677+
678678
if {'ghi', 'dhi'} <= icolumns and 'dni' not in icolumns:
679679
logging.debug('Estimate dni from ghi and dhi')
680680
self.weather.loc[:, 'dni'] = pvlib.irradiance.dni(
681681
self.weather.loc[:, 'ghi'], self.weather.loc[:, 'dhi'],
682682
self.solar_position.loc[:, 'zenith'])
683683
elif {'dni', 'dhi'} <= icolumns and 'ghi' not in icolumns:
684+
warnings.warn(wrn_txt, UserWarning)
684685
logging.debug('Estimate ghi from dni and dhi')
685686
self.weather.loc[:, 'ghi'] = (
686687
self.weather.dni * tools.cosd(self.solar_position.zenith) +
687688
self.weather.dhi)
688689
elif {'dni', 'ghi'} <= icolumns and 'dhi' not in icolumns:
690+
warnings.warn(wrn_txt, UserWarning)
689691
logging.debug('Estimate dhi from dni and ghi')
690692
self.weather.loc[:, 'dhi'] = (
691693
self.weather.ghi - self.weather.dni *

0 commit comments

Comments
 (0)