-
-
Notifications
You must be signed in to change notification settings - Fork 120
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 bugs in allocate_gen_fuel #3690
Conversation
@cmgosnell not sure who would be best to review this so added you for now. |
hey @grgmiller !! I'm so sorry that it's taken me absolutely forever to get to this PR!! I will commit to making sure we get this merged in quickly now that my attention is turned to it. two intentions are:
For the first one, the simple drop dupes make sense np. The desire for the second fix makes a lot of sense. But what I interpret from what you have done here doesn't exactly make sense to me. It looks like you are trying to include any records ever from a generator that says its retired but reported producing mwh. Which I believe means if a generator retired in January 2001 but reported MWh in February, all subsequent months of that generator would be included. That seems incorrect to me. I'd propose two different alternative solutions:
If either of these options sounds okay to you I'm happy to try to implement and use your example plant |
Thanks @cmgosnell. I think what you proposed makes sense, and I think aligns with what I was thinking, although maybe I didn't explain clearly. In my original example, I said:
In this case, by "current year" I meant the year in which it retired (2022), not the actual current year today (2024). So for this plant, if it retired in 2022-09-01, we'd only keep records through 2022-12-01 (which I think is consistent with what you were proposing?). I think some of the confusion might be because in OGE we only run the pipeline a single year at a time, rather than for all years, so the code as I proposed, while compatible with our use case, might not work as intended when running all years. I also think that adding non-null fuel (in addition to MWh) also makes sense. |
hey @grgmiller ! Thanks for your response! Yea i was wondering/fuzzily remembering that in OGE you are working with only one year. So yes I think I understand your need here and will tweak your pr a bit to enable retiring generator (status=retired but either burning fuel or making MWh) records to show up for every month in the report year which they are retiring. |
* Include more retiring generators in the net generation and fuel consumption | ||
allocation. Thanks to :user:`grgmiller` for this contirbution :pr:`3690`. | ||
|
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.
Non-blocking, could update this to specifically call out the inclusion of mid-year retirement cases.
Overview
This PR fixes several issues that we identified in the
analysis.allocate_gen_fuel
module and had fixed in our fork of pudl for OGE. We are now trying to get rid of our dependency on the pudl code, so want to migrate all of our changes over to pudl so that we can directly use the output table from this module.This is part of work we are tracking in OGE here: singularity-energy/open-grid-emissions#369
First, this addresses an issue where some retiring generators were incorrectly identified and being dropped: singularity-energy#1
Second, this addresses issues with duplicate generators, as described in this PR: singularity-energy#3
Testing
We have successfully run this after importing pudl and running it in the OGE pipeline. However, we had previously been testing this with an older release of pudl (v2023.12.01).
I have a Windows machine so there are not great instructions on getting the pudl dev environment set up on Windows. This is a pretty small amount of code change, so I'm hoping that someone with the dev environment already set up may be able to help test this.
To-do list