本文整理汇总了Python中pvlib.modelchain.ModelChain.complete_irradiance方法的典型用法代码示例。如果您正苦于以下问题:Python ModelChain.complete_irradiance方法的具体用法?Python ModelChain.complete_irradiance怎么用?Python ModelChain.complete_irradiance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pvlib.modelchain.ModelChain
的用法示例。
在下文中一共展示了ModelChain.complete_irradiance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_complete_irradiance_clean_run
# 需要导入模块: from pvlib.modelchain import ModelChain [as 别名]
# 或者: from pvlib.modelchain.ModelChain import complete_irradiance [as 别名]
def test_complete_irradiance_clean_run(system, location):
"""The DataFrame should not change if all columns are passed"""
mc = ModelChain(system, location)
times = pd.date_range('2010-07-05 9:00:00', periods=2, freq='H')
i = pd.DataFrame({'dni': [2, 3], 'dhi': [4, 6], 'ghi': [9, 5]}, index=times)
mc.complete_irradiance(times, weather=i)
assert_series_equal(mc.weather['dni'],
pd.Series([2, 3], index=times, name='dni'))
assert_series_equal(mc.weather['dhi'],
pd.Series([4, 6], index=times, name='dhi'))
assert_series_equal(mc.weather['ghi'],
pd.Series([9, 5], index=times, name='ghi'))
示例2: test_complete_irradiance
# 需要导入模块: from pvlib.modelchain import ModelChain [as 别名]
# 或者: from pvlib.modelchain.ModelChain import complete_irradiance [as 别名]
def test_complete_irradiance(system, location):
"""Check calculations"""
mc = ModelChain(system, location)
times = pd.date_range('2010-07-05 9:00:00', periods=2, freq='H')
i = pd.DataFrame({'dni': [30.354455, 77.22822],
'dhi': [372.103976116, 497.087579068],
'ghi': [356.543700, 465.44400]}, index=times)
mc.complete_irradiance(times, weather=i[['ghi', 'dni']])
assert_series_equal(mc.weather['dhi'],
pd.Series([372.103976116, 497.087579068],
index=times, name='dhi'))
mc.complete_irradiance(times, weather=i[['dhi', 'dni']])
assert_series_equal(mc.weather['ghi'],
pd.Series([356.543700, 465.44400],
index=times, name='ghi'))
mc.complete_irradiance(times, weather=i[['dhi', 'ghi']])
assert_series_equal(mc.weather['dni'],
pd.Series([30.354455, 77.22822],
index=times, name='dni'))