Skip to content

Fix bug by allowing emission_scenarios to be None#46

Merged
JMGilbert merged 2 commits intomainfrom
climate_bugfix
Sep 21, 2022
Merged

Fix bug by allowing emission_scenarios to be None#46
JMGilbert merged 2 commits intomainfrom
climate_bugfix

Conversation

@JMGilbert
Copy link
Copy Markdown
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.

ecs_mask_name=None,
base_period=(2001, 2010),
emission_scenarios=None,
emission_scenarios=(),
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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