Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Release Notes
.. ``pip install git+https://github.com/pypsa/atlite``.

* Feature: Add new onshore turbine models: eno 126 3.5 MW, eno 126 4 MW, and eno 126 4.8 MW . (turbines that match more closely the PyPSA/technologydata cost assumptions)
* Fix calls to `cdsapi` for ERA5 to be compliant with current API syntax (https://github.com/PyPSA/atlite/pull/414 and https://github.com/PyPSA/atlite/pull/454).

`v0.4.1 <https://github.com/PyPSA/atlite/releases/tag/v0.4.1>`__ (12th May 2025)
=======================================================================================
Expand Down
22 changes: 11 additions & 11 deletions atlite/datasets/era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def retrieval_times(coords, static=False, monthly_requests=False):
time = coords["time"].to_index()
if static:
return {
"year": str(time[0].year),
"month": str(time[0].month),
"day": str(time[0].day),
"year": [time[0].strftime("%Y")],
"month": [time[0].strftime("%m")],
"day": [time[0].strftime("%d")],
"time": time[0].strftime("%H:00"),
}

Expand All @@ -303,18 +303,18 @@ def retrieval_times(coords, static=False, monthly_requests=False):
if monthly_requests:
for month in t.month.unique():
query = {
"year": str(year),
"month": str(month),
"day": list(t[t.month == month].day.unique()),
"time": [f"{h:02d}:00" for h in t[t.month == month].hour.unique()],
"year": [str(year)],
"month": [t[t.month == month][0].strftime("%m")],
"day": list(t[t.month == month].strftime("%d").unique()),
"time": list(t[t.month == month].strftime("%H:00").unique()),
}
times.append(query)
else:
query = {
"year": str(year),
"month": list(t.month.unique()),
"day": list(t.day.unique()),
"time": [f"{h:02d}:00" for h in t.hour.unique()],
"year": [str(year)],
"month": list(t.strftime("%m").unique()),
"day": list(t.strftime("%d").unique()),
"time": list(t.strftime("%H:00").unique()),
}
times.append(query)
return times
Expand Down
Loading