GSoC 2026 work product: Standardizing Diffuse Irradiance Components and Extending `ModelChain` Optical Loss Modeling
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 20/100
調査の方向性
This issue is a retrospective of completed GSoC work, and it does not identify a remaining code change, file, or test to work on. Read the project summary and linked issues for context; there is no defined completion criterion here, so choose an active issue that describes unfinished work instead.
索引モデルが issue の本文から書いたものです。
説明
This issue summarizes my Google Summer of Code 2026 project: its goals, what was accomplished, what remains to be done, and what I learned along the way. This project was carried out under the supervision of @AdamRJensen and @ramaroesilva.
Throughout this process, I posted some reflections and updates in my blog. The official project description can be read on the GSoC website.
Project summary
This project was first introduced in #2750.
Phase 1: Sky diffuse irradiance transposition models and components
Diffuse transposition models calculate diffuse irradiance in the plane of array. This can be total sky diffuse irradiance, or it can be split into different components (sky isotropic, circumsolar, and horizon), which is useful for taking into account the direction from which the irradiance is coming.
In the past, some functions - perez, perez_driesse, and haydavies - supported returning individual components if the user set return_components=True, while the others returned only total diffuse irradiance.
This functionality was therefore extended to all existing transposition models except for klucher, which inherently does not support separation into individual components. After some debate, it was decided that it would be better to keep this as an exception than to force an interpretation of the model that was not intended by its original author.
For the remaining models, it was decided that each should return only the components included by the model. Previously, haydavies included an empty poa_horizon component (all zeros, since it is not supported by the model itself). This component was removed. return_components was also added to isotropic, which supports only the poa_isotropic component, and to reindl, which supports all three: poa_isotropic, poa_circumsolar, and poa_horizon.
king, on the other hand, was set for deprecation, as decided by the community.
This functionality was then expanded to the wrapper functions within pvlib.irradiance: get_sky_diffuse, poa_components, and get_total_irradiance. All three now also include a boolean parameter which, when set to True, ensures that the output includes sky diffuse components. This means that users can access the diffuse components without having to use the individual transposition models directly.
Issues and PRs for this phase:
Main steps:
- #2775
- #2787
- #2788
- #2794
- #2800
Smaller details:
- #2776
- #2783
- #2789
- #2801
- #2827
Phase 2: Extending ModelChain for component-specific IAM
The ModelChain is a high-level class providing a streamlined way for users to model PV systems from weather data down to AC power without having to explicitly model each step of the process.
Previously, the effective irradiance (after transposition and optical as well as spectral losses) was modeled as:
spect_mod * (total_irrad['poa_direct'] * aoi_mod + fd * total_irrad['poa_diffuse'])
While optical losses were well represented for direct irradiance (through aoi_mod, the angle of incidence modifier), the same did not happen for diffuse irradiance. fd , which stands for diffuse fraction, was essentially always 1, meaning that no optical losses were applied to diffuse irradiance.
IAM (incidence angle modifier) functions describe the dependence of optical losses on angle of incidence. This is why the work from Phase 1 was important: by separating diffuse irradiance into components, each component can be treated differently according to the direction from which it reaches the array. In addition to having access to the different diffuse irradiance components, it is necessary to have access to the IAM for each component.
Therefore, before tackling this within ModelChain directly, it was necessary to address it within the Array and PVSystem classes, on which ModelChain depends. These classes had no previous support for accessing the IAM of different diffuse components.
After this functionality was added, it could then be integrated into ModelChain. In simplified form, the effective irradiance calculation now becomes:
spect_mod * (
(poa_direct + poa_circumsolar) * aoi_mod
+ poa_isotropic * iam_isotropic
+ poa_horizon * iam_horizon
+ poa_ground_diffuse * iam_ground_diffuse
)
Side quests
During this phase, I also found myself involved in two related tasks: integrating iam.schlick into ModelChain, and creating a new version of the marion_diffuse IAM function optimized for trackers.
iam.schlick in ModelChain
iam.schlick is a direct IAM function, and previously the only one in pvlib which could not be used within ModelChain. Now, it too has been integrated into this class.
marion_diffuse optimized for trackers
marion_diffuse computes diffuse IAM values by integrating over a solid angle for a given surface tilt. This works well for fixed-tilt systems, but becomes computationally expensive for trackers, where the surface tilt is a timeseries of values rather than a single value.
The existing implementation effectively performs a new integration for every tilt angle, including repeated tilt angles. For long simulations, this can become both memory- and time-intensive.
To address this, I implemented a new function, marion_diffuse_tracking, specifically designed with tracker systems in mind. Instead of integrating for every individual tilt angle, it:
- precomputes the diffuse IAM values over a range of tilt angles,
- performs the numerical integration only once for each sampled angle, and
- interpolates those results to obtain IAM values for the actual tracker tilt time series.
The performance improvements are substantial. For one example using an 8760-point time series, the new implementation led to a 96% reduction in peak memory and 98% reduction in execution time.
Some implementation details of this are still under discussion.
Issues and PRs for this phase:
Main steps:
- #2811
- #2812
- #2845
- #2846
- #2847
Smaller details:
- #2837
- #2842
Side quests:
- #2824
- Previous discussion of this in #1402
- #2828
- #2832
Lessons learned
All in all, the most challenging part of this process has not been the coding itself, but everything else around it: testing, GitHub issues and PRs, GitHub checks, ensuring everything remains consistent across different parts of pvlib, handling breaking changes and deprecations, and most of all, managing inter-dependent PRs on a short timeline :)
While I was not new to coding, I was new to most of these things. It has been a very positive experience, and I now feel more comfortable with the idea of contributing not only to this community but also other open-source projects I may be interested in.
I absolutely intend to stick around here, help ensure that every loose thread left by my GSoC project is dealt with, and find some other ways to contribute every now and then - and hopefully continue learning!
Finally, a big thank you to my mentors, as well as to everyone who contributed to my project by reviewing my PRs or participating in discussions :)
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 1.2k
- 平均マージ
- 3日 18時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pvlib/pvlib-python のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pvlib/pvlib-python#2903 · コメント 2 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
pvlib/pvlib-python#2902 ·
メンテナーはふだん 1 日以内に返信
-
Add an example or documentation on using 'bhi' from ERA5再び着手できるかも @anshurajbisoyi98-ctrl が 14 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
pvlib/pvlib-python#2880 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Use "long-wave" rather than "infra-red" to refer to thermal radiation.再び着手できるかも @Rahi-padwal が 251 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンapi easy
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pvlib/pvlib-python#2653 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
pvlib/pvlib-python#2637 · コメント 10 件 ·
メンテナーはふだん 1 日以内に返信
pvlib/pvlib-python の issue をすべて見る
似ている issue
-
Deferred from #1869: Complete the companion pytest guardrail update noted in the PR description...オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#140958 ·
メンテナーはふだん 1 日以内に返信
-
Bug triage/confirmed
難易度 2/5 半日 初心者へのやさしさ 85/100
agentscope-ai/agentscope#3355 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
ethereum/execution-specs#3859 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信