feat: add temp eclipse adjustment logic - #363
Merged
Merged
Conversation
devsjc
approved these changes
Aug 10, 2026
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.
Pull Request
Description
Apply a manual multiplicative adjustment to national solar forecasts for the partial solar eclipse on the evening of 12 August 2026 (~91% UK, ~88% NL, roughly 17:30–19:30 UTC).
ECMWF include the eclipse in their irradiance, but PVNet has never seen one in training and ignores it — a test run showed no kink over the eclipse window — so every model we serve over-forecasts through it. Same problem and same fix as 29 March 2025 (openclimatefix-archives/uk-pv-national-gsp-api#404), extended to NL and v1.
Multipliers come from James' and Sukh's tables (GB half-hourly, NL quarter-hourly) and live in one new module,
internal/eclipse.py.Scope
/national/forecast,/gsp/0/forecast, live paths of/gsp/forecast/all/) and v1 (/regions/{id}/forecast,/forecasts/snapshot) for GB and NL./forecasts/periodand the pre-warmed caches need no changes: the period endpoint rejectsregion_type=national,warm_all_v1_cachesskipsNATION, and the v0/forecast/all/warm already excludes gsp 0.Testing on an ordinary day:
ECLIPSE_DATE=2026-08-10 uv run quartz-apimoves the tables to that date. It's a plain env var read with a hardcoded default — no config or Terraform changes — so leave it unset in deployed environments.Temporary. Once the stored values are corrected after the event, set
ECLIPSE_ENABLED = False, then delete the module and its call sites. Tracked in openclimatefix/client-private#581.Checklist: