@@ -993,7 +993,7 @@ def test_calculate_energy_damages(
993993 xr .testing .assert_equal (ds_out_expected , ds_out_actual )
994994
995995
996- @pytest .mark .parametrize ("version_test" , [0 , 1 , 4 , 5 ])
996+ @pytest .mark .parametrize ("version_test" , [0 , 1 , 4 , 5 , 9 ])
997997def test_prep_mortality_damages (
998998 tmp_path ,
999999 version_test ,
@@ -1050,7 +1050,7 @@ def test_prep_mortality_damages(
10501050 ),
10511051 },
10521052 coords = {
1053- "batch" : (["batch" ], [b ]),
1053+ "batch" : (["batch" ], [f" { b } " ]),
10541054 "gcm" : (["gcm" ], ["ACCESS1-0" , "GFDL-CM3" ]),
10551055 "model" : (["model" ], ["IIASA GDP" , "OECD Env-Growth" ]),
10561056 "rcp" : (["rcp" ], ["rcp45" , "rcp85" ]),
@@ -1063,7 +1063,7 @@ def test_prep_mortality_damages(
10631063 "valuation" : (["valuation" ], ["vsl" , "vly" ]),
10641064 "year" : (["year" ], [2010 , 2099 ]),
10651065 },
1066- )
1066+ ). expand_dims ( 'mortality' )
10671067
10681068 d = os .path .join (tmp_path , "mortality_in" )
10691069 if not os .path .exists (d ):
@@ -1076,7 +1076,7 @@ def test_prep_mortality_damages(
10761076 gcms = ["ACCESS1-0" , "GFDL-CM3" ],
10771077 paths = str (
10781078 os .path .join (
1079- tmp_path , f "mortality_in/mortality_damages_batch{ b } _eta{ e } .zarr"
1079+ tmp_path , "mortality_in/mortality_damages_batch{0 }_eta{1 }.zarr"
10801080 )
10811081 ),
10821082 vars = {
@@ -1102,15 +1102,15 @@ def test_prep_mortality_damages(
11021102 {
11031103 "delta" : (
11041104 ["gcm" , "batch" , "ssp" , "rcp" , "model" , "year" , "region" , "eta" ],
1105- np .float32 (np .full ((2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ), - 0.90681089 )),
1105+ np .float32 (np .full ((2 , 15 , 2 , 2 , 2 , 2 , 2 , 2 ), - 0.90681089 )),
11061106 ),
11071107 "histclim" : (
11081108 ["gcm" , "batch" , "ssp" , "rcp" , "model" , "year" , "region" , "eta" ],
1109- np .float32 (np .full ((2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 ), 2 * 0.90681089 )),
1109+ np .float32 (np .full ((2 , 15 , 2 , 2 , 2 , 2 , 2 , 2 ), 2 * 0.90681089 )),
11101110 ),
11111111 },
11121112 coords = {
1113- "batch" : (["batch" ], ["batch6" , "batch9" ]),
1113+ "batch" : (["batch" ], ["batch" + str ( i ) for i in [ 0 , 1 , 10 , 11 , 12 , 13 , 14 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ,] ]),
11141114 "gcm" : (["gcm" ], ["ACCESS1-0" , "GFDL-CM3" ]),
11151115 "model" : (["model" ], ["IIASA GDP" , "OECD Env-Growth" ]),
11161116 "rcp" : (["rcp" ], ["rcp45" , "rcp85" ]),
0 commit comments