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

Fix bug by allowing emission_scenarios to be None #46

Merged
merged 2 commits into from
Sep 21, 2022
Merged

Conversation

JMGilbert
Copy link
Contributor

Fix #45 by allowing emission_scenarios to be None without modifying its value during instantiation. This allows dscim-epa to replicate prior results and should allow for the update_dscim branch in dscim-epa to be merged.

@@ -54,10 +54,10 @@ def __init__(
ecs_mask_path=None,
ecs_mask_name=None,
base_period=(2001, 2010),
emission_scenarios=None,
emission_scenarios=(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if we want to be setting a default set of scenarios at all (then we wouldn't need to check for if == ()). Or if we should force the user to specify the scenarios, (can still be a default through the configs or something like that).

Perhaps a future adjustment to make.

Copy link
Member

@kemccusker kemccusker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please update the docstring for emission_scenarios, otherwise it looks ready to merge!

@JMGilbert JMGilbert merged commit e548a53 into main Sep 21, 2022
Copy link
Member

@brews brews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @JMGilbert. Thanks for looking at this. Interesting bug. This is starting to feel more hacky as I'm not entirely clear on the meaning when emission_scenarios is None. It was kinda unclear to begin with so I don't mean it's not just your changes here. I have an in-line comment on updating the docstr so we at least know what the None means.

@@ -37,7 +37,7 @@ class Climate:
Period for rebasing FAIR temperature anomalies. This should match the CIL projection system's base period.
emission_scenarios: list or None, optional
List of emission scenarios for which SCC will be calculated. Default
is ["ssp119", "ssp126", "ssp245", "ssp460", "ssp370", "ssp585"].
is (), which gets set to ["ssp119", "ssp126", "ssp245", "ssp460", "ssp370", "ssp585"].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JMGilbert What does "None" actually mean then? This isn't documented anywhere (or it appears unclear).

@brews
Copy link
Member

brews commented Sep 21, 2022

@JMGilbert I'd recommend adding one sentence to CHANGELOG, describing this update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError: "'rcp' is not a valid dimension or coordinate" when running with non-RCP spec
3 participants