Pvlib/Bird1984 : North-facing element shows negative Irradiance

标签 pvlib

当使用 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()


Negative irradiance obtained by setting panel orientation north

最佳答案

不,这不是预期的行为。我怀疑这个问题是由于对大于 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/

相关文章:

unidata - pvlib-python 如何从全局模型(GFS)中检索长达一年的存档天气预报?

python - pvmismatch 的语法。如何更改特定单元格?

python - 无法协调 PVLIB 输出与 NREL SAM

python - 使用 python 中的 pvlib 将总辐照度预测从云量预测转换

python - 将参数传递给使用 pvmismatch : Why is this not working? 的此函数

python - 如何使用 pydap 库收集 THREDDS 数据?

pvlib - 如何在 pvmismatch 中使用 pvlib 模块?

PVLIB:如何添加 CEC 和 SAM 库中不存在的模块和逆变器规范?