Skip to content

Commit 850eb41

Browse files
author
JMGilbert
committed
Fix flake8
1 parent 7043c1b commit 850eb41

File tree

2 files changed

+4
-38
lines changed

2 files changed

+4
-38
lines changed

dscim/menu/main_recipe.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,40 +1348,6 @@ def uncollapsed_marginal_damages(self):
13481348

13491349
return md
13501350

1351-
@cachedproperty
1352-
@save("uncollapsed_discount_factors")
1353-
def uncollapsed_discount_factors(self):
1354-
pop = self.collapsed_pop.sum("region")
1355-
pop = pop.reindex(
1356-
year=range(pop.year.min().values, self.ext_end_year + 1),
1357-
method="ffill",
1358-
)
1359-
f = self.calculate_discount_factors(
1360-
self.global_consumption_no_pulse / pop
1361-
).to_dataset(name="discount_factor")
1362-
for var in f.variables:
1363-
f[var].encoding.clear()
1364-
1365-
return f
1366-
1367-
@cachedproperty
1368-
@save("uncollapsed_marginal_damages")
1369-
def uncollapsed_marginal_damages(self):
1370-
1371-
md = (
1372-
(
1373-
(self.global_consumption_no_pulse - self.global_consumption_pulse)
1374-
* self.climate.conversion
1375-
)
1376-
.rename("marginal_damages")
1377-
.to_dataset()
1378-
)
1379-
1380-
for var in md.variables:
1381-
md[var].encoding.clear()
1382-
1383-
return md
1384-
13851351
def ce(self, obj, dims):
13861352
"""Rechunk data appropriately and apply the certainty equivalence
13871353
calculation. This is done in a loop to avoid memory crashes.

dscim/preprocessing/input_damages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def calculate_labor_batch_damages(batch, ec, input_path, save_path):
242242
format_file="zarr",
243243
query=f"exists==True&batch=='batch{batch}'",
244244
)
245-
print(f"Saved!")
245+
print("Saved!")
246246

247247

248248
def calculate_labor_damages(
@@ -261,7 +261,7 @@ def calculate_labor_damages(
261261
)
262262
print("Processing batches:")
263263
print(list(range(i * 5, i * 5 + 5)))
264-
r = p_umap(partial_func, list(range(i * 5, i * 5 + 5)))
264+
p_umap(partial_func, list(range(i * 5, i * 5 + 5)))
265265

266266

267267
def compute_ag_damages(
@@ -620,7 +620,7 @@ def calculate_energy_batch_damages(batch, ec, input_path, save_path):
620620
format_file="zarr",
621621
query=f"exists==True&batch=='batch{batch}'",
622622
)
623-
print(f"Saved!")
623+
print("Saved!")
624624

625625

626626
def calculate_energy_damages(
@@ -655,7 +655,7 @@ def calculate_energy_damages(
655655
)
656656
print("Processing batches:")
657657
print(list(range(i * 5, i * 5 + 5)))
658-
r = p_umap(partial_func, list(range(i * 5, i * 5 + 5)))
658+
p_umap(partial_func, list(range(i * 5, i * 5 + 5)))
659659

660660

661661
def prep_mortality_damages(

0 commit comments

Comments
 (0)