Add hourly heating and cooling degree hours
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Detailed Description
atlite provides Cutout.heat_demand() and Cutout.cooling_demand(), which compute degree days from the daily mean temperature. These work well for daily demand profiles.
I propose adding two complementary functions that compute degree hours from the hourly temperature of the cutout. This gives users an option when they need the variation within a day:
Cutout.heating_degree_hours(threshold=15, a=1, constant=0):max(0, a·(threshold − T)) + constantCutout.cooling_degree_hours(threshold=23, a=1, constant=0):max(0, a·(T − threshold)) + constant
The existing functions stay unchanged. As in the daily functions, the threshold is applied per grid cell before spatial aggregation. All convert_and_aggregate arguments (matrix, layout, shapes, aggregate_time, …) are supported. Defaults mirror the daily functions.
Context
We are planning to add space cooling to PyPSA-Eur. For this, we would need the hourly shape of cooling demand, which typically peaks in the afternoon. Hourly degree hours could be computed in PyPSA-Eur through a custom convert_func, but having them in atlite would make them available to other users and models, for heating as well.
Possible Implementation
Add convert_heating_degree_hours / heating_degree_hours and convert_cooling_degree_hours / cooling_degree_hours to atlite/convert.py, register them on Cutout, and follow the structure of the existing degree-day functions, using hourly instead of daily mean temperature.
An alternative would be a resolution argument (e.g. freq) on the existing functions. Separate functions keep the current API and results as they are.
The threshold stays a user-defined parameter, so it can differ by region or country. Users can aggregate the hourly result to a coarser resolution or smooth it for building thermal inertia afterwards.
A humidity-aware variant could be a follow-up, for example enthalpy-based degree hours using the 2 m dewpoint temperature already available in ERA5 cutouts. This would capture the latent cooling load.
I'm happy to open a PR.
- 主要言語
- Python
- スター
- 416
- フォーク
- 136
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PyPSA/atlite のほかの issue
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
Support dataset `Global climate and energy indicators from 1950 to present derived from reanalysis`対応中かも @jome1 が 47 日前に担当しました。 オープンstatus: needs classification type: enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
type: bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
Appended cutout windspeed for wind turbines yielding to premature cutoff対応中かも @maoji-y が 4 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
type: enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Rose22/openlumara#166 ·
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
enhancement feature/signals self-driving team/self-driving
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PostHog/posthog#144208 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted tests
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
LMPrado-DZ23/open_notas_br#14 ·
メンテナーはふだん 1 日以内に返信