-
Notifications
You must be signed in to change notification settings - Fork 33
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
Made changes to tools.costs
related to base year and first year of modeling
#186
Conversation
By default, do not allow for the growth of fixed O&M costs (per vintage) over time I also had to force the `config.fom_rate` in the equation to a float, otherwise I received this error: ``ValueError: Integers to negative integer powers are not allowed.``
Instead of projecting cost reductions starting at the model start year (`y0`), I've now changed the tool to start projecting at the base year (`base_year`). If `base_year` is greater than `y0` (which is 2020), the base year cost is held constant from `y0` to `base_year`.
We were seeing instances where the costs of certain CCS technologies were becoming lower than their non-CCS counterparts. As a fix for now, I am manually changing the input assumptions for these technologies so that: 1) the CCS and non-CCS counterparts are mapped to the same WEO technologies (and therefore use the same regional differentiation) 2) the CCS technologies follow the same cost reduction narratives as their non-CCS counterparts
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
=======================================
- Coverage 76.7% 76.7% -0.1%
=======================================
Files 112 112
Lines 7154 7154
=======================================
- Hits 5494 5491 -3
- Misses 1660 1663 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks :)
I'll approve once the docs-comments are addressed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now :)
@@ -458,8 +468,21 @@ def create_message_outputs( | |||
) | |||
.astype(dtypes) | |||
.query("year_vtg in @config.Y") | |||
.assign(first_technology_year=lambda x: x.first_technology_year.astype(float)) | |||
.assign(first_technology_year=lambda x: x.first_technology_year.astype(int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific need for these two chained calls instead of directly?
.astype({"first_technology_year": int})
If there is, it would be good to record in a comment so people maintaining the code can understand why.
.reset_index(drop=True) | ||
.drop_duplicates() | ||
.drop_duplicates()[ | ||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT the intent of this selection is to drop the added column "first_technology_year". If so, then:
.drop("first_technology_year", axis=1)
…is more explicit and less noisy. Recall we made several adjustments like this in #99.
Made a number of changes to
tools.costs
, mostly relating to the modeling of base year, first model year, and first technology yearTo summarize, the changes are:
tools.costs
projections for technologies with first years in the future #169) and remove projections for years that are before a technology's "first_technology_year"base_year
to mean the year to start modeling cost changesfom_rate
) to 0Additional details relevant to each change found below.
How to review
For @khaeru and/or @glatterf42 : Read the diff and note that the CI checks all pass.
PR checklist
Additional information
Fixed jumps in cost projections for technologies with later first technology year
Issue #169 described an issue with certain technologies that have a "first_technology_year" that's after the first model year (2020) behaving weirdly -- namely, the costs would jump up and then come back down to base year costs when it reaches its "first_technology_year". I've fixed this issue, so that the costs are projected just like other technologies (starting from the base year). Additionally, I've removed projections for years that are before the technology's "first_technology_year" completely. The "first_technology_year" refers to the first year a technology starts being deployed within MESSAGE. There's no other place this concept is used I think, so there's no other way to constrain it. So, I decided to filter out those years to avoid giving the model costs for years where the technology shouldn't even be in operation.
Using the same example as issue #169, here's how the investment cost projections for
bio_istig_ccs
looks now:Modified the usage of
base_year
in the modulePreviously, the
base_year
was mainly just used to decide what year WEO data to use. Now, I've changed the module to use 2021 WEO data no matter what, andbase_year
means the year to start projecting cost changes/reductions.base_year
does not have to equal the first model year (y0
). Ifbase_year
is aftery0
, then the technology's costs is held constant at the base year cost untily0
. Note that this means there will be no cost variance across scenarios untilbase_year
, but there will still be regional differentiation. I've changed the defaultbase_year
to 2025, holding the cost across scenarios constant fromy0
(2020) to 2025 (so forcing no scenario variance from 2020 to 2025).Example of this in action:
Updated cost assumptions for certain CCS technologies
@OFR-IIASA, @gidden, and others have noted that there are some cases with a CCS technology's costs would dip lower than its non-CCS variant. The reason for that is that based on the inputs into the cost module, since these are two different technologies, there is nothing stopping their assumptions from causing them to have completely different pathways. Using
syn_liq
andsyn_liq_ccs
as examples: for the regional differentation,syn_liq
was being mapped to IGCC in the WEO, whilesyn_liq_ccs
was mapped to IGCC with CCS. If WEO has different regional differentations for their two technologies (which they do), then that affects how our costs forsyn_liq
andsyn_liq_ccs
. Additionally,syn_liq
andsyn_liq_ccs
were following different cost reduction pathways and narratives. The combinations of these issues caused the costs ofsyn_liq_ccs
in some regions to dip lower thansyn_liq
, which doesn't make sense.The list of problematic technologies found in the cost module where this phenomenon occurs are:
For the listed technologies above, I made the following changes to their data inputs:
Here is what
syn_liq_ccs
costs look like after the changes:Longer term we are having discussions on if we want to move to component-based modeling of CCS components and adding that cost onto the original technology.
Changed the default fixed O&M reduction rate (
fom_rate
) to 0@macflo8 took a look at
solar_pv_ppl
costs over time and noted that fixed O&M costs were increasing too rapidly, causing solar to be deployed at very slow rates. This is due to the defaultfom_rate
in the module being 0.025, which is applied universally to all technologies. For now I've just changed this to zero, which means for eachyear_vtg
, the costs remain the same across allyear_act
. Longer term I need to look at making this configurable for specific technologies (some have lower or higher values) -- perhaps this can just be an input similar to the base year reference region costs.