Reorganize emissions info #121#136
Open
urwahah wants to merge 3 commits into
Open
Conversation
urwahah
commented
Jul 10, 2026
| results.append(df) | ||
|
|
||
| total_emissions_kg = sum(r[Col.TOTAL_EMISSIONS_KG_CO2E.value].sum() for r in results) | ||
| total_emissions_kg = df[Col.TOTAL_EMISSIONS_KG_CO2E.value].sum() |
Collaborator
Author
There was a problem hiding this comment.
unrelated but i changed this because it was doing a cumulative sum of all emissions scenarios which didn't seem helpful to me. now it outputs the total emissions for each scenario - still summed up for all equipment scenarios, but better for a high level check i suppose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fuel switching (and maybe load shifting later on) requires the grid emissions data to be available for loads to site energy calculations. This is a fairly significant revision to the architecture of
energy.pyso it would be better to review and implement this before I start changing the calculations :-)To summarize the changes:
Currently:
run_loads_to_sitecallsloads_to_site_energy, which iterates through the equipment scenarios, and saves the site energy results as a temporary filerun_site_to_sourcepasses those results tosite_to_source, which iterates through the emissions scenarios for final source emissionsProposed:
run_loads_to_sitecallsloads_to_site_energya.
loads_to_site_energycallsgrid_emissions, which iterates through the emissions scenarios to return a dataframe containing grid emissions datab.
loads_to_site_energyiterates over both emissions and equipment scenarios (nested) to calculate site energyrun_site_to_sourcepasses the site energy results file (same as before) tosite_to_source, which iterates through the emissions scenarios for final source emissions