Skip to content

Commit 363bb35

Browse files
authored
Merge pull request #82 from juaAI/feat/models-aifs-ens
feat(models): add hosted aifs_ens (additive)
2 parents d6b928d + c93ca14 commit 363bb35

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

src/jua/weather/_model_meta.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ class ModelMetaInfo:
234234
special=((1, 0, 78),),
235235
),
236236
)
237+
_MODEL_META_INFO[Models.AIFS_ENS] = ModelMetaInfo(
238+
has_grid_access=True,
239+
full_forecasted_hours=360,
240+
has_statistics=True,
241+
# 0.25 degree grid (1440x720 after south-pole drop) — matches the default
242+
# num_lats=720 / num_lons=1440, so no override needed.
243+
temporal_resolution=TemporalResolution(base=6),
244+
)
237245
_MODEL_META_INFO[Models.ECMWF_AIFS_ENSEMBLE] = ModelMetaInfo(
238246
forecast_name_mapping="ecmwf_aifs025_ensemble",
239247
full_forecasted_hours=360,

src/jua/weather/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Models(str, Enum):
3030
EPT2_HELIOS = "ept2_1_helios"
3131
EPT2_EUROPA = "ept2_1_europa"
3232
AIFS = "aifs"
33+
AIFS_ENS = "aifs_ens"
3334
AURORA = "aurora"
3435
ECMWF_IFS_SINGLE = "ecmwf_ifs_single"
3536
ICON_EU = "icon_eu"

tests/functional/test_forecasts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
MODEL_SPECIFIC_FORECAST_DATES = {
3737
Models.EPT2_REASONING: datetime(2025, 11, 23, 0, 0, 0),
3838
Models.ICON_EU: datetime(2026, 2, 9, 0, 0, 0),
39+
# AIFS ENS (ECMWF Open Data) backfill starts mid-2025 and is sparse at the
40+
# edges; the default 2025-10-20 isn't present. Use a verified mid-history
41+
# init time.
42+
Models.AIFS_ENS: datetime(2026, 3, 3, 0, 0, 0),
3943
}
4044

4145
SOLAR_ONLY_MODELS = {Models.EPT2_HELIOS}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""Regression tests for the hosted AIFS ENS model metadata.
2+
3+
The hosted ClickHouse ``aifs_ens`` model is added alongside the existing
4+
open-meteo ``ecmwf_aifs025_ensemble`` (additive / expand phase). Unlike the
5+
point-only open-meteo model, the hosted model exposes full grid access plus
6+
ensemble statistics, so it must not regress into the "point queries only"
7+
behaviour gated by ``has_grid_access``.
8+
"""
9+
10+
from jua.weather._model_meta import get_model_meta_info
11+
from jua.weather.models import Models
12+
13+
14+
def test_aifs_ens_is_fully_accessible() -> None:
15+
meta = get_model_meta_info(Models.AIFS_ENS)
16+
# Hosted ClickHouse grid model: grid/bbox slices must be allowed, not just points.
17+
assert meta.has_grid_access is True
18+
# 51-member ensemble: statistics available.
19+
assert meta.has_statistics is True
20+
# 0.25 degree global grid (1440x720 after south-pole drop).
21+
assert (meta.num_lats, meta.num_lons) == (720, 1440)
22+
# 0-360h forecast horizon.
23+
assert meta.full_forecasted_hours == 360

0 commit comments

Comments
 (0)