ProjectDrawdown / solutions

The mission of Project Drawdown is to help the world reach “Drawdown”— the point in the future when levels of greenhouse gases in the atmosphere stop climbing and start to steadily decline, thereby stopping catastrophic climate change — as quickly, safely, and equitably as possible.
https://www.drawdown.org/
Other
216 stars 91 forks source link

Set global variables globally #449

Open denised opened 3 years ago

denised commented 3 years ago

A few of the parameters (VMAs) are not specific to an individual solution: fuel cost and discount rate are two and there may be more. Scenarios each have their own individual settings for these parameters, which is fine when looking at one solution at a time. But when comparing across solutions, or doing multi-solution analysis, the value should be set consistently. We currently don't have a convenient mechanism to accomplish this.

(Observed from a presentation on electricity integration)

denised commented 3 years ago

Assumed population model, assumed CO2 model.

denised commented 3 years ago

For greenhouse gas model, this is actually a required part of the overall integration process. In Excel it is done by manually setting all the parameters to the right value, but in Python it makes more sense to have a set of "global parameters" which can be enforced.

denised commented 3 years ago

I realize that I need to have this to make elc integration work. So I'm going to start working on it now.

@eethann @sutjin I believe you have to ideas about this --- lets coordinate. @colleenskemp FYI

My starting idea is that there will be a way to set certain AC values globally, and the effective AC used by scenarios will be the merge of the global with their own (global wins).

Historical testing can continue to use the "as saved" values, but in most contexts, at least some variables (fuel cost, discount rate, which CC model to use, ...) will be set globally. The base code in solutions doesn't have to limit which values are considered global---we should probably start with a standard set(?), but it should be possible to add or remove (set or unset) variables from the global values dynamically without requiring code changes.