CZ: Add pumped storage pumping to hydro storage - #8777
Open
oldrobotdev wants to merge 1 commit into
Open
Conversation
Fetch the CEPS Load data alongside Generation in fetch_production and derive pumping as the difference between the Load including pumping and Load series, so net hydro storage becomes pumping minus pumped storage generation. Load failures degrade to production without pumping instead of aborting the fetch. Also raise the previously-unraised ParserException when the Generation response has no data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #5426
Description
The CZ parser only reported the generation side of pumped storage, so hydro storage was always negative and pumping never showed up. fetch_production now requests the Load method alongside Generation on the same CepsData endpoint and window, derives pumping per interval as the difference between the Load including pumping and Load series, and adds it to hydro storage. Net storage becomes pumping minus PsPP generation, the approach outlined in the issue. Supersedes #5473 and #7530, which both closed for inactivity.
A failing Load request only costs the pumping enrichment: production still returns with generation-side storage, plus a warning. While in here I also added the raise that fetch_production's no-data branch was missing (the exchange twin got the same fix in #8464).
Preview
Live run over the default 48h window: 192 events, 54 intervals with pumping (max 487.9 MW today at 10:45 local), 56 with discharge (max 478.0 MW). Example event at 2026-07-02 10:45: storage {'hydro': 487.933} with PsPP at 0, and at 2026-06-30 20:00: storage {'hydro': -478.0} while pumping was 0.
Double check
uv run test_parser "CZ"pnpx prettier@2 --write .anduv run formatin the top level directory to format my changes.