当使用 pvlib(以及 NREL 提供的 spectrl2 实现)时,我获得朝北面板的负辐照度。 这是预期的行为吗?频谱是否应该简单地削减为零?
根据以下教程添加了示例代码:
## Using PV Lib
from pvlib import spectrum, solarposition, irradiance, atmosphere
import pandas as pd
import matplotlib.pyplot as plt
# assumptions from the technical report:
lat = 49.88
lon = 8.63
tilt = 45
azimuth = 0 # North = 0
pressure = 101300 # sea level, roughly
water_vapor_content = 0.5 # cm
tau500 = 0.1
ozone = 0.31 # atm-cm
albedo = 0.2
times = pd.date_range('2021-11-30 8:00', freq='h', periods=6, tz="Europe/Berlin") # , tz='Etc/GMT+9'
solpos = solarposition.get_solarposition(times, lat, lon)
aoi = irradiance.aoi(tilt, azimuth, solpos.apparent_zenith, solpos.azimuth)
# The technical report uses the 'kasten1966' airmass model, but later
# versions of SPECTRL2 use 'kastenyoung1989'. Here we use 'kasten1966'
# for consistency with the technical report.
relative_airmass = atmosphere.get_relative_airmass(solpos.apparent_zenith,
model='kasten1966')
spectra = spectrum.spectrl2(
apparent_zenith=solpos.apparent_zenith,
aoi=aoi,
surface_tilt=tilt,
ground_albedo=albedo,
surface_pressure=pressure,
relative_airmass=relative_airmass,
precipitable_water=water_vapor_content,
ozone=ozone,
aerosol_turbidity_500nm=tau500,
)
plt.figure()
plt.plot(spectra['wavelength'], spectra['poa_global'])
plt.xlim(200, 2700)
# plt.ylim(0, 1.8)
plt.title(r"2021-11-30, Darmstadt, $\tau=0.1$, Wv=0.5 cm")
plt.ylabel(r"Irradiance ($W m^{-2} nm^{-1}$)")
plt.xlabel(r"Wavelength ($nm$)")
time_labels = times.strftime("%H:%M %p")
labels = [
"AM {:0.02f}, Z{:0.02f}, {}".format(*vals)
for vals in zip(relative_airmass, solpos.apparent_zenith, time_labels)
]
plt.legend(labels)
plt.show()
最佳答案
不,这不是预期的行为。我怀疑这个问题是由于对大于 90 度的入射角值处理不当引起的,本质上是这里讨论的相同问题(针对不同的功能):https://github.com/pvlib/pvlib-python/issues/526
不幸的是,NREL 的引用实现也存在问题(也许模型最初设计时,没有人能想象出背向太阳的面板!),但我认为 pvlib 实现无论如何都应该修复。我鼓励您在这里提交错误报告:https://github.com/pvlib/pvlib-python/issues
同时,我认为您可以通过在将其传递给 spectrum.spectrl2< 之前添加诸如
,但如果您最终在脚本稍后将 aoi[aoi > 90] = 90
之类的行来解决您自己的代码中的问题aoi
用于其他目的,请小心这一点。我很想知道结果光谱是否符合您的期望。
为后代进行编辑:github问题已在此处打开:https://github.com/pvlib/pvlib-python/issues/1348
关于Pvlib/Bird1984 : North-facing element shows negative Irradiance,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70172766/