@@ -130,6 +130,7 @@ def change_grids(self, request, config):
130
130
# all resolution=standard have h128
131
131
if request ["resolution" ] == "standard" :
132
132
res = 128
133
+ return self .change_config_grid (config , res )
133
134
134
135
# for activity CMIP6 and experiment hist, all models except ifs-nemo have h512 and ifs-nemo has h1024
135
136
if request ["activity" ] == "cmip6" and request ["experiment" ] == "hist" :
@@ -151,13 +152,17 @@ def change_grids(self, request, config):
151
152
# Only assign new resolution if it was changed here
152
153
if res :
153
154
# Find the mapper transformation
154
- for mappings in config ["options" ]["axis_config" ]:
155
- for sub_mapping in mappings ["transformations" ]:
156
- if sub_mapping ["name" ] == "mapper" :
157
- sub_mapping ["resolution" ] = res
155
+ self .change_config_grid (config , res )
158
156
159
157
return config
160
158
159
+ def change_config_grid (self , config , res ):
160
+ for mappings in config ["options" ]["axis_config" ]:
161
+ for sub_mapping in mappings ["transformations" ]:
162
+ if sub_mapping ["name" ] == "mapper" :
163
+ sub_mapping ["resolution" ] = res
164
+ return config
165
+
161
166
def result (self , request ):
162
167
logging .info ("Getting result" )
163
168
yield self .output
0 commit comments