Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop over 'vars' in prep_mortality_damages() is unused? #81

Closed
davidrzhdu opened this issue Apr 14, 2023 · 2 comments
Closed

Loop over 'vars' in prep_mortality_damages() is unused? #81

davidrzhdu opened this issue Apr 14, 2023 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@davidrzhdu
Copy link
Contributor

davidrzhdu commented Apr 14, 2023

for var, name in vars.items():

This loop seems to be a leftover from the old version of dscim.preprocessing.input_damages.prep_mortality_damages() and is unused here. Related to that, prep() in line 702 takes name as an arg, but it is unused.
def prep(
ds,
gcm=gcm,
scaling_deaths=scaling_deaths,
scaling_costs=scaling_costs,
valuation=valuation,
name=name,
):

@davidrzhdu davidrzhdu added bug Something isn't working help wanted Extra attention is needed labels Apr 14, 2023
@davidrzhdu
Copy link
Contributor Author

davidrzhdu commented Apr 14, 2023

We might also want to fix the file name when saving the output (e.g., f"outpath/impacts-darwin-montecarlo-damages-v{mortality_version}.zarr")

if i == 0:
damages.to_zarr(
outpath,
consolidated=True,
mode="w",
)
else:
damages.to_zarr(
outpath,
consolidated=True,
append_dim="gcm",
)

@JMGilbert
Copy link
Contributor

Fixed in 5ebe7de.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants