@@ -159,20 +159,22 @@ def test_climate_gmsl_anomalies(tmp_path):
159159 d .mkdir ()
160160 infile_path = d / "gmsl_fair.zarr"
161161 gases = ["CO2_Fossil" , "CH4" , "N2O" ]
162- # This struction might appear weird, but matches that used for initial EPA runs.
162+
163163 ds_in = xr .Dataset (
164164 {
165- "gmsl" : (
166- ["runtype" , "pulse_year" , "simulation" , "runid" , "year" , "gas" ],
167- np .ones ((2 , 1 , 1 , 2 , 1 , 3 )),
165+ "pulse_gmsl" : (
166+ ["pulse_year" , "runid" , "year" , "gas" ],
167+ np .ones ((1 , 2 , 1 , 3 )),
168+ ),
169+ "control_gmsl" : (
170+ ["runid" , "year" ],
171+ np .ones ((2 , 1 )),
168172 ),
169173 },
170174 coords = {
171175 "gas" : (["gas" ], gases ),
172176 "pulse_year" : (["pulse_year" ], [2020 ]),
173177 "runid" : (["runid" ], [1 , 2 ]),
174- "runtype" : (["runtype" ], ["control" , "pulse" ]),
175- "simulation" : (["simulation" ], [1 ]),
176178 "year" : (["year" ], [2020 ]),
177179 },
178180 )
@@ -181,19 +183,18 @@ def test_climate_gmsl_anomalies(tmp_path):
181183 expected = xr .Dataset (
182184 {
183185 "pulse_gmsl" : (
184- ["pulse_year" , "simulation" , " runid" , "year" , "gas" ],
185- np .ones ((1 , 1 , 2 , 1 , 3 )),
186+ ["pulse_year" , "runid" , "year" , "gas" ],
187+ np .ones ((1 , 2 , 1 , 3 )),
186188 ),
187189 "control_gmsl" : (
188- ["pulse_year" , "simulation" , " runid" , "year" , "gas " ],
189- np .ones ((1 , 1 , 2 , 1 , 3 )),
190+ ["runid" , "year" ],
191+ np .ones ((2 , 1 )),
190192 ),
191193 },
192194 coords = {
193195 "gas" : (["gas" ], gases ),
194196 "pulse_year" : (["pulse_year" ], [2020 ]),
195197 "runid" : (["runid" ], [1 , 2 ]),
196- "simulation" : (["simulation" ], [1 ]),
197198 "year" : (["year" ], [2020 ]),
198199 },
199200 )
@@ -358,20 +359,22 @@ def test_climate_anomalies(tmp_path):
358359 gmsl_infile_path = d / "gmsl_fair.zarr"
359360 gases_gmsl = ["CO2_Fossil" , "CH4" , "N2O" ]
360361 gmsl_infile_path = d / "gmsl_fair2.zarr"
361- # As usual, this struction might appear weird, but matches that used for initial EPA runs.
362+
362363 gmsl_in = xr .Dataset (
363364 {
364- "gmsl" : (
365- ["runtype" , "pulse_year" , "simulation" , "runid" , "year" , "gas" ],
366- np .ones ((2 , 1 , 1 , 2 , 3 , 3 )),
365+ "pulse_gmsl" : (
366+ ["pulse_year" , "runid" , "year" , "gas" ],
367+ np .ones ((1 , 2 , 3 , 3 )),
368+ ),
369+ "control_gmsl" : (
370+ ["runid" , "year" ],
371+ np .ones ((2 , 3 )),
367372 ),
368373 },
369374 coords = {
370375 "gas" : (["gas" ], gases_gmsl ),
371376 "pulse_year" : (["pulse_year" ], [2002 ]),
372377 "runid" : (["runid" ], [1 , 2 ]),
373- "runtype" : (["runtype" ], ["control" , "pulse" ]),
374- "simulation" : (["simulation" ], [1 ]),
375378 "year" : (["year" ], [2000 , 2001 , 2002 ]),
376379 },
377380 )
0 commit comments