[英]Pvlib / Bird1984: North-facing element shows negative Irradiance
When using pvlib (but also the spectrl2 implementation provided by NREL), I obtain negative Irradiance for a north-facing panel.当使用 pvlib(还有 NREL 提供的 spectrl2 实现)时,我获得了朝北面板的负辐照度。 Is this expected behaviour?
这是预期的行为吗? Should the spectrum simply be cut at zero?
频谱是否应该简单地被削减为零?
Added example code based on the tutorial below:根据以下教程添加了示例代码:
## 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()
No, this is not expected behavior.不,这不是预期的行为。 I suspect the issue is caused by improper handling of angle-of-incidence values greater than 90 degrees, and essentially the same problem (for a different function) discussed here: https://github.com/pvlib/pvlib-python/issues/526
我怀疑这个问题是由于对大于 90 度的入射角值的处理不当引起的,这里讨论的问题基本相同(针对不同的函数): https://github.com/pvlib/pvlib-python/issues /526
It's unfortunate that the reference implementation from NREL has the problem too (perhaps when the model was originally designed, nobody could conceive of a panel facing away from the sun,).不幸的是,来自 NREL 的参考实现也存在问题(也许在最初设计 model 时,没有人能想到面板背向太阳)。 but I think the pvlib implementation should be fixed regardless: I encourage you to file a bug report here: https://github.com/pvlib/pvlib-python/issues
但我认为无论如何都应该修复 pvlib 实现:我鼓励您在此处提交错误报告: https://github.com/pvlib/pvlib-python/issues
In the meantime, I think you can resolve the issue in your own code by adding a line like aoi[aoi > 90] = 90
prior to passing it to spectrum.spectrl2
, although be careful about this if you end up using aoi
for other purposes later in the script.同时,我认为您可以通过在将 aoi[aoi > 90] = 90 传递给
spectrum.spectrl2
之前添加一行像aoi
aoi[aoi > 90] = 90
来解决问题稍后在脚本中的用途。 I would be interested to hear if the resulting spectra are consistent with your expectations.我很想知道得到的光谱是否与您的期望一致。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.