Implement daily temperature-based gas price adjustments #65
Draft
SoLaraS2 wants to merge 71 commits into
Draft
Conversation
| WI,USA,East_North_Central,lake-states,Midwest | ||
| WV,USA,South_Atlantic,appalachia,MidAtlantic | ||
| WY,USA,Mountain,mountain,Mountain | ||
| st,country,cendiv,usda_region,h2ptcreg,ngreg |
Contributor
There was a problem hiding this comment.
- How about
gasreginstead ofngreg, since the techs aregas-cc/gas-ctand we don't usengmuch throughout the code? - We'll need to add the new region level to https://reeds-model.github.io/ReEDS/model_documentation.html#figure-hierarchy (and describe the new method in the docs). If the regions are finalized, let me know and I can remake the figure.
Contributor
There was a problem hiding this comment.
gasreg SGTM and thanks for the heads up on the docs. The regions are finalized so if you could remake the figure that'd be great, thanks! Here's the charge code if needed: OOSP >-> 10291 - 05.18.01
| return load_in, load_out | ||
|
|
||
|
|
||
| def get_natgas_price_diffs(sw, hmap_myr, hmap_allyrs, inputs_case, periodtype='rep'): |
Contributor
There was a problem hiding this comment.
Since this file is modified, can you run all the temporal tests from cases_test.csv and make sure they still work?
- Pacific_CC
- Pacific_weks
- Pacific_full_year
- Interday_storage
- Pacific_rep7
…f get_degree_days
kodiobika
requested changes
Apr 30, 2026
Contributor
kodiobika
left a comment
There was a problem hiding this comment.
Thanks for your work on this! It's looking great so far -- mostly just some stylistic suggestions
kodiobika
reviewed
Apr 30, 2026
…ReEDS into ko/temp_based_natgas_prices
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.
Summary
This PR calculates daily gas price multipliers based on a linear regression fitting heating and cooling degree days on daily deviations from an annual regional gas prices (
inputs/fuelprices/degree_day_gas_price_regression_parameters.csv). The user can choose between these daily regional multipliers and the existing uniform wintertime markup.Technical details
gasreghierarchy level, which represents the regions at which the degree day / price regressions were fitted. These are mostly just census divisions, with the exceptions being "California" and "Northwest", which are components of the "Pacific" cendiv, and "Southwest" and "Mountain", which are components of the "Mountain" cendiv.gasreg-level gas price multipliers are calculated inreeds/input_processing/fuelcostprep.pyby calculating historical daily degree days for the weather years of the given run and then rescaling them to match annual degree days projected across the run's solve years. To create multipliers at therlevel (needed whenGSw_GasCurve = 2), thegasreg-level multipliers are copied to their constituent zones. To create multipliers at thecendivlevel (needed whenGSw_GasCurve != 2), thegasreg-level multipliers are combined via population-weighted average.get_daily_gas_price_multipliersfunction to hourly_writetimeseries.py to get a GAMS compatible csv with representative hourly NG price multipliersAdditional changes
GSw_GasPriceAdjMethodwhich controls whether the daily price multipliers are applied or the uniform wintertime markup is applied.main, the wintertime multiplier of 1.054 (szn_adj_gas_winterinscalars.csv) mentioned in the model documentation is only being applied whenGSw_GasCurve = 1. A separate wintertime multiplier of 1.004 (gasprice_ref_frac_adderinscalars.csv) is being applied whenGSw_GasCurve = 3. No multiplier is applied whenGSw_GasCurve $\in$ [0, 2]. In this PR, thegasprice_ref_frac_addermultiplier is deleted and theszn_adj_gasmultiplier is applied in everyGSw_GasCurvescenario (assumingGSw_GasPriceAdjMethod = 0).main, the wintertime markup only increases the wintertime price but doesn't make corresponding adjustments to maintain the pre-markup year-round average price. As a result, the year-round natural gas price is being erroneously inflated. In this PR, the adjustments are made so that wintertime prices are higher than nonwinter prices while the year-round average price is unchanged.main, there are four legacy zones (p32, p35, p47, and p59) that are assigned to census divisions that don't match their state's census division (according to https://www.eia.gov/consumption/commercial/maps.php#census:~:text=CBECS%20climate%20zones-,U.S.%20census%20regions,-and%20divisions%3A). This was initially done to remedy a supply curve related issue that is now fixed, so this PR reassigns those zones to their states' census divisions for consistency with those zones' assignedgasregs.Switches added/removed/changed
GSw_GasPriceAdjMethod(0 = uniform wintertime markup, 1 = daily adjustments based on regional temperatures)Relevant sources or documentation
Scripts for creating annual
gasreg-level degree day projections and associated sources are at ReEDS-Model/ReEDS_Input_Processing@main...regional_degree_daysValidation, testing, and comparison report(s)
(in progress)
Checklist for author
Details to double-check
General information to guide review
Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how
Tag points of contact here if you would like additional review of the relevant parts of the model