Skip to content

feat(models): add hosted aifs_ens (additive)#82

Merged
niasie merged 4 commits into
mainfrom
feat/models-aifs-ens
Jun 26, 2026
Merged

feat(models): add hosted aifs_ens (additive)#82
niasie merged 4 commits into
mainfrom
feat/models-aifs-ens

Conversation

@niasie

@niasie niasie commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary (additive / expand phase)

  • Add Models.AIFS_ENS = "aifs_ens" in the With Grid Access block (next to AIFS), with has_grid_access=True + has_statistics=True (51-member ensemble, 0.25° 720x1440 grid, 360h, 6-hourly).
  • Keep the existing Models.ECMWF_AIFS_ENSEMBLE = "ecmwf_aifs025_ensemble" untouched.
  • Add a meta regression test for aifs_ens grid access.

This PR is purely additive so it passes all tests (incl. functional, once the backend is deployed) without depending on a coordinated removal.

Why split

The hosted aifs_ens replaces the open-meteo ecmwf_aifs025_ensemble, but doing add+remove together is un-greenable across repos (SDK functional tests hit the live API; jua-core's SDK-integration test clones SDK main). Splitting into expand (add) then contract (remove) keeps every PR green at merge.

Removal (separate, later)

Removing ECMWF_AIFS_ENSEMBLE happens in a follow-up contract-phase PR after the backend serving aifs_ens is deployed and the old open-meteo model is decommissioned in jua-core.

Merge order

  1. jua-core backend (add aifs_ens, additive) → deploy
  2. this SDK PR → release
  3. jua-core frontend (add to dashboards)
  4. later: contract-phase removals (SDK + backend)

Test plan

  • just check-commit (lint + 203 tests)
  • Functional CI green once backend deployed

@niasie niasie requested a review from a team as a code owner June 25, 2026 17:03
The open-meteo AIFS ensemble (`ecmwf_aifs025_ensemble`) has been retired in
jua-core and replaced by the hosted ClickHouse model `aifs_ens` (AIFS ENS from
ECMWF Open Data). The query engine no longer accepts the old id (returns 422
"not a valid Model"), which is why the SDK functional tests began failing for
`ecmwf_aifs025_ensemble`.

Swap the enum entry and its `_MODEL_META_INFO`:
- `Models.AIFS_ENS = "aifs_ens"` in the **With Grid Access** block (next to
  AIFS). Unlike the old open-meteo model, the hosted model is a ClickHouse grid
  model, so grid/bbox slices are supported — not point-only.
- `has_grid_access=True`, `has_statistics=True` (51-member ensemble). 0.25
  degree grid (1440x720) matches the default num_lats/num_lons.
- `has_forecast_file_access=False`: served from the query engine (ClickHouse),
  not the Jua zarr archive — same as the other externally-sourced CH models
  (ICON, NOAA GFS, EC IFS).
- 360 forecasted hours, uniform 6-hourly cadence (0-360h, 61 steps).
- Drop `forecast_name_mapping` — the enum value equals the API name.

The SDK applies no client-side restriction gating, so aifs_ens is fully
accessible (point + grid + statistics); access is governed purely by the
server-side `allowed_models` entitlement (granted in the jua-core migration).
The old id is intentionally NOT aliased: the hosted model does not serve
`geopotential_at_pressure_level_50000Pa`, so silently re-pointing would 422.

Verification:
  - jua-core config: libraries/jua-query-v2/src/jua_query_v2/configs/forecasts/models/aifs_ens.yaml
  - grid: "720x1440", is_ensemble_model: true
  - all 11 YAML variables already present in Variables enum
  - just check-commit passes (lint + 202 tests)
@niasie niasie force-pushed the feat/models-aifs-ens branch from 4b32a9b to 06c6e4e Compare June 25, 2026 17:16

@n-poulsen n-poulsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

niasie added 2 commits June 25, 2026 19:19
Lock in that the hosted aifs_ens model exposes grid access + statistics (not
point-only) and that the retired open-meteo ecmwf_aifs025_ensemble id is gone.
Make this PR purely additive (expand phase) so it can merge fully green.
Removing the old open-meteo ecmwf_aifs025_ensemble is deferred to a separate
contract-phase PR, after the backend that serves aifs_ens is deployed.

Net effect vs main: add Models.AIFS_ENS (grid access + statistics) and its
meta; the existing ECMWF_AIFS_ENSEMBLE entry is retained. Drop the
old-id-removed assertion from the test accordingly.
@niasie niasie changed the title feat(models): replace ecmwf_aifs025_ensemble with hosted aifs_ens feat(models): add hosted aifs_ens (additive) Jun 25, 2026
…t test

test_specific_forecast falls back to DEFAULT_FORECAST_DATE (2025-10-20) for
models without an override. aifs_ens (ECMWF Open Data) only has data from
mid-2025 onward and is sparse at the edges, so 2025-10-20 returns 400
"init_time does not exist". Add a MODEL_SPECIFIC_FORECAST_DATES override of
2026-03-03 (verified present in production ClickHouse), mirroring the existing
EPT2_REASONING / ICON_EU recent-model overrides.

Fixes the only failing functional test on the AIFS_ENS addition; metadata and
latest-forecast functional tests already pass against the deployed API.
@niasie niasie merged commit 363bb35 into main Jun 26, 2026
26 checks passed
@niasie niasie deleted the feat/models-aifs-ens branch June 26, 2026 08:39
niasie added a commit that referenced this pull request Jun 26, 2026
Contract-phase removal. The open-meteo AIFS ensemble has been retired backend
-side (replaced by hosted aifs_ens, added in the preceding commit). Drop the
enum member and its meta so the SDK no longer advertises an id the query engine
rejects.

BREAKING CHANGE: Models.ECMWF_AIFS_ENSEMBLE is removed. Use Models.AIFS_ENS
(hosted, grid access) instead. Note aifs_ens does not serve 500hPa geopotential.

Built on top of the AIFS_ENS addition (#82); must merge after #82 and after the
jua-core backend removal is ready, per the reverse-order contraction plan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants