对于给定的位置X,我有一组总部天气预报,并且针对我的国家进行了优化。这包括给定时间戳记的预测的全球辐照度值(单位:瓦/米^ 2)。
此外,我在位置X处具有以下太阳能电池板信息:坐标(纬度,经度,时区,高度,方位角,倾斜)。
现在,我要计算太阳能板上的校正辐照度,即考虑方位角+倾斜度的太阳能板上的辐照度。一位同事将我指向PVLib。然后,我研究了intro examples,在其中他们展示了如何计算几个给定位置的校正辐照度。完全是我想要的
但是,他们使用自己模型中的辐照度值并定义了太阳能模块的详细信息。我只想计算校正后的辐照度值,但是无法从天气预报中找到如何使用自己的辐照度预测。
有什么建议可以实现我的目标吗? (我是这个话题的新手,很抱歉我提出一个过于琐碎的问题。)
到目前为止我所拥有的:
naive_times = pd.DatetimeIndex(start='2018', end='2019', freq='1h')
coordinates = [(sol_loc_lat, sol_loc_lng, sol_loc_desc, sol_loc_alt, sol_loc_tz),]
my_irradiance = df_meteo_raw_all[[m_datetime, m_irradiance]].set_index(m_datetime)[m_irradiance]
# get the module and inverter specifications from SAM
sandia_modules = pvlib.pvsystem.retrieve_sam('SandiaMod')
sapm_inverters = pvlib.pvsystem.retrieve_sam('cecinverter')
module = sandia_modules['Canadian_Solar_CS5P_220M___2009_']
inverter = sapm_inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_']
# specify constant ambient air temp and wind for simplicity
temp_air = 20 # todo get from meteo data
wind_speed = 0 # todo get from meteo data
for latitude, longitude, name, altitude, timezone in coordinates:
localized_system = LocalizedPVSystem(module_parameters=module,
inverter_parameters=inverter,
surface_tilt=sol_tilt, # or latitude as in example?
surface_azimuth=sol_azimuth, # or 180 as in example?
latitude=latitude,
longitude=longitude,
name=name,
altitude=altitude,
tz=timezone)
times = naive_times.tz_localize(timezone)
#clearsky = localized_system.get_clearsky(times)
solar_position = localized_system.get_solarposition(times)
#total_irrad = localized_system.get_irradiance(solar_position['apparent_zenith'],
# solar_position['azimuth'],
# clearsky['dni'],
# clearsky['ghi'],
# clearsky['dhi'])
temps = localized_system.sapm_celltemp(my_irradiance, # was: total_irrad['poa_global'],
wind_speed, temp_air)
aoi = localized_system.get_aoi(solar_position['apparent_zenith'],
solar_position['azimuth'])
airmass = localized_system.get_airmass(solar_position=solar_position)
effective_irradiance = localized_system.sapm_effective_irradiance(total_irrad['poa_direct'], # update change here too, how?
total_irrad['poa_diffuse'], # update change here too, how?
airmass['airmass_absolute'], aoi)
dc = localized_system.sapm(effective_irradiance, temps['temp_cell'])
ac = localized_system.snlinverter(dc['v_mp'], dc['p_mp'])
annual_energy = ac.sum()
energies[name] = annual_energy
请注意,我已将total_irrad['poa_global']
替换为my_irradiance
,以后也需要替换它,但不知道如何。真的有必要指定太阳能电池组件的规格,只是为了计算校正后的辐照度吗?