Repository navigation
BUG: keep Open-Meteo ensemble members on the same pressure levels - #1242
Merged
Merged
Conversation
Each member drops the pressure levels that come back empty. The members were then cut to the same length by position and given one shared list of pressures, so two members missing different levels ended up with rows labelled with the wrong pressure. Keep only the levels every member has, picked by pressure, and raise when fewer than two are shared. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1242 +/- ##
========================================
Coverage 87.04% 87.04%
========================================
Files 130 130
Lines 18130 18131 +1
========================================
+ Hits 15782 15783 +1
Misses 2348 2348 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
11 tasks done
MateusStano
added a commit
that referenced
this pull request
Nov 28, 2026
* DOC: backfill the v1.14.0 changelog The changelog automation has not run since #1112, so the PRs merged into develop after it were missing from [Unreleased]. Add them, add the entries for #1225, #1226 and #1227, update the tip-off, tube-fins and parachute-seed entries to what the release ships, and drop the raw commit link, the back-merge entry and the duplicate StochasticFreeFormFins entry. Related to #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq * DOC: add a Breaking changes section to the v1.14.0 changelog List what changes for a v1.13.0 user: Monte Carlo seeding and numbering, the deprecated static_margin assignment, the parachute trigger ValueError on the rail, the shifted flight results, and the sensor default temperature. Related to #1209 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq * DOC: bring the v1.14.0 changelog up to date with develop Describe the forecast reuse and the opt-in disk cache that replaced the first cache (#1219), and add the PRs merged after the backfill: #1221, #1222, #1223, #1224, #1231, #1232, #1234, #1239 and #1242. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: MateusStano <mateusstano@usp.br>
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.
Related to #1209 (the "Open-Meteo ensemble pressure levels" item).
Pull request type
Checklist
ruff check,ruff format --check,pylint) has passed locallypytest tests/unit/environment) have passed locallyCHANGELOG.md: no entry here, it goes in with DOC: backfill the v1.14.0 changelog and add breaking changes #1228.Current behavior
set_atmospheric_model(type="open_meteo_ensemble")reads each member and skips the pressure levels that come back empty. The members are then cut to the same length by position, and all of them share one list of pressures (level_ensemble), taken from the shortest member.If two members miss different levels, rows no longer line up. Example with 19 levels, where one member has no data at 1000 hPa and another has none at 30 hPa:
select_ensemble_memberbuilds the pressure profile from that shared list, so the second member gets a pressure (and density) that is one level off, about 2.5 % near the ground. Temperature and wind are not affected, because each member keeps its own heights.New behavior
Only the pressure levels that every member has are kept, and each member's rows are picked by pressure level instead of by position. A
ValueErroris raised when the members have fewer than two levels in common.Nothing changes when all members have the same levels, which is what the live API returns today: I checked
gfs05(31 members, 3 sites) andecmwf_ifs025(51 members, 2 sites) on 2026-11-28, and in both every member had the same 13 levels. So this is a latent problem, not one seen in real data.Two tests were added. Both fail on
develop.Breaking change
Additional information
@Gui-FernandesBR, #1209 does not say what "Open-Meteo ensemble pressure levels" refers to. This is the only problem I found in that code. Is it what you meant?
🤖 Generated with Claude Code