Skip to content

Commit

Permalink
Delete drop_broken_stuff auxiliary function
Browse files Browse the repository at this point in the history
This function now actually throws an error, and does not seem to be necessary anymore?

@znicholls probably wrote this bit, so might want to double-check.
  • Loading branch information
jkikstra committed Nov 30, 2023
1 parent 7051e32 commit 5975037
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/climate_assessment/harmonization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,17 +314,6 @@ def run_harmonization(df, instance, prefix):
for _, msdf in scenarios.groupby(["model", "scenario"])
)

LOGGER.info("Hacking around some regression in aneris - pyam stack")

def drop_broken_stuff(indf):
out = indf.copy()
idx_length = len(out.index.names)
drop_levels = list(range(idx_length // 2, idx_length))
out.index = out.index.droplevel(drop_levels)

return out

scenarios_harmonized = [drop_broken_stuff(s) for s in scenarios_harmonized]

LOGGER.info("Combining results")
scenarios_harmonized = pd.concat(scenarios_harmonized).reset_index()
Expand Down

0 comments on commit 5975037

Please sign in to comment.