From cc7a94f18548c6ba30b74c374fae5c138c7ea8e3 Mon Sep 17 00:00:00 2001 From: mathleur Date: Tue, 17 Feb 2026 09:33:41 +0100 Subject: [PATCH 1/4] change resolution of climate dt according to rules --- polytope_server/common/datasource/polytope.py | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/polytope_server/common/datasource/polytope.py b/polytope_server/common/datasource/polytope.py index 377afe7..82fb6ba 100644 --- a/polytope_server/common/datasource/polytope.py +++ b/polytope_server/common/datasource/polytope.py @@ -162,36 +162,28 @@ def change_grids(request, config): # This only holds for climate dt data elif request.get("dataset", None) == "climate-dt": - # all resolution=standard have h128 if request["resolution"] == "standard": res = 128 - return change_config_grid_res(config, res) - if request["generation"] == "1": - # for activity CMIP6 and experiment hist, all models except ifs-nemo have h512 and ifs-nemo has h1024 - if request["activity"] == "cmip6" and request["experiment"] == "hist": - # if request["model"] == "ifs-nemo": - # res = 1024 - # else: - # res = 512 - res = 1024 - - if request["activity"] == "story-nudging": + else: + # activity scenariomip is only used in generation 1 so don't need to specify generation 1 here + # This is the nextgems under class d1 run in generation 1 + # In generation 2, runs with realization 2,3,4 used H512. + if request["realization"] != "1": res = 512 - if request["activity"] in ["baseline", "projections", "scenariomip"]: - res = 1024 - - if request["realization"] == "2" and request["model"] == "ifs-fesom": + # IFS-FESOM under generation 1 highresmip is H512 + elif request["activity"] == "highresmip" and request["model"] == "ifs-fesom": res = 512 - if ( - request["activity"] == "highresmip" - and request["experiment"] == "cont" - and request["model"] == "ifs-fesom" - ): + # All story nudging runs here are H512 + elif request["activity"] == "story-nudging": res = 512 + # Catch all for others that don't fit into exception cases above + elif request["activity"] in ["baseline", "cmip6", "highresmip", "projections", "scenariomip"]: + res = 1024 + elif request.get("dataset", None) == "extremes-dt": if request["stream"] == "wave": for mappings in config["options"]["axis_config"]: From d091947b16d635d53ecd93034125ee8e37595a2f Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 20 Feb 2026 12:10:09 +0100 Subject: [PATCH 2/4] update fe reqs to allow switching grids for on-demands dt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1b40fe0..36b9445 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,8 +26,8 @@ opentelemetry-instrumentation-logging==0.59b0 opentelemetry-instrumentation-flask==0.59b0 opentelemetry-sdk==1.38.0 pika==1.3.2 -polytope-mars==0.3.7 -polytope-python==2.1.2 +polytope-mars==0.3.8 +polytope-python==2.1.4 qubed==0.3.0 prometheus-client==0.21.0 py-bcrypt==0.4 From fa947b4c7ef59060ddd584a08411cc51f52066a6 Mon Sep 17 00:00:00 2001 From: mathleur Date: Fri, 20 Feb 2026 12:16:26 +0100 Subject: [PATCH 3/4] add optional switching grids deps of polytope fe --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 36b9445..299f691 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ opentelemetry-instrumentation-flask==0.59b0 opentelemetry-sdk==1.38.0 pika==1.3.2 polytope-mars==0.3.8 -polytope-python==2.1.4 +polytope-python[switching_grids]==2.1.4 qubed==0.3.0 prometheus-client==0.21.0 py-bcrypt==0.4 From 66a1a315a26df958e0f0fbb508a6a7d68b70fb13 Mon Sep 17 00:00:00 2001 From: mathleur Date: Thu, 26 Feb 2026 10:36:06 +0100 Subject: [PATCH 4/4] update polytope fe v --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8eb266a..6e35534 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ attrdict==2.0.1 boto3==1.35.19 -covjsonkit==0.2.10 +covjsonkit==0.2.9 deepmerge==2.0 docker==7.1.0 ecmwf-api-client==1.6.3 @@ -27,7 +27,7 @@ opentelemetry-instrumentation-flask==0.59b0 opentelemetry-sdk==1.38.0 pika==1.3.2 polytope-mars==0.3.8 -polytope-python[switching_grids]==2.1.4 +polytope-python[switching_grids]==2.1.6 qubed==0.3.0 prometheus-client==0.21.0 py-bcrypt==0.4 @@ -45,4 +45,4 @@ redis==5.0.8 requests==2.32.3 Werkzeug==3.0.6 uvicorn==0.32.0 -fastapi==0.115.5 +fastapi==0.115.5 \ No newline at end of file