@@ -81,7 +81,11 @@ def gmst(self):
8181 @property
8282 def gmsl (self ):
8383 """Cached GMSL anomalies"""
84- gmsl = xr .open_dataset (self .gmsl_path , engine = "zarr" ).gmsl .to_dataframe ().reset_index ()
84+ gmsl = (
85+ xr .open_dataset (self .gmsl_path , engine = "zarr" )
86+ .gmsl .to_dataframe ()
87+ .reset_index ()
88+ )
8589
8690 return gmsl
8791
@@ -273,7 +277,7 @@ def __init__(self, path_econ):
273277 def econ_vars (self ):
274278 """Economic variables"""
275279 if self .path [- 3 :] == "arr" :
276- raw = xr .open_dataset (self .path , engine = "zarr" , consolidated = True )
280+ raw = xr .open_dataset (self .path , engine = "zarr" , consolidated = True )
277281 else :
278282 raw = xr .open_dataset (self .path )
279283 return raw [["gdp" , "pop" ]]
@@ -400,7 +404,11 @@ def adding_up_damages(self):
400404 f"Adding up aggregated damages found at { mean_cc } , { mean_no_cc } . These are being loaded..."
401405 )
402406 damages = (
403- (xr .open_dataset (mean_no_cc , engine = "zarr" ).no_cc - xr .open_dataset (mean_cc , engine = "zarr" ).cc ) * self .pop
407+ (
408+ xr .open_dataset (mean_no_cc , engine = "zarr" ).no_cc
409+ - xr .open_dataset (mean_cc , engine = "zarr" ).cc
410+ )
411+ * self .pop
404412 ).sum ("region" )
405413 else :
406414 raise NotImplementedError (
@@ -429,4 +437,4 @@ def risk_aversion_damages(self, ce_type):
429437 raise NotImplementedError (
430438 "Risk-aversion CEs not found. Please run CE_calculation.ipynb for `risk_aversion`."
431439 )
432- return self .cut (xr .open_dataset (file , engine = "zarr" ))
440+ return self .cut (xr .open_dataset (file , engine = "zarr" ))
0 commit comments