-
Notifications
You must be signed in to change notification settings - Fork 10
Implement daily temperature-based gas price adjustments #65
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
Draft
SoLaraS2
wants to merge
96
commits into
main
Choose a base branch
from
ko/temp_based_natgas_prices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
e46c710
Add inputs for temperature-based natural gas price functionality
kodiobika c116165
Added annual degree days files
ee3aa8c
Added first working instance of get_degree_days
a3f0d2b
Added both hourly_formula option to get_degree_days
23889f3
Correct natgas temperature-price regression parameters
kodiobika d3fd142
Fixed timestamp issue in get_degree_days(), added preliminary step to…
72f2cf1
Added step in fuelcostprep now outputs an h5 for price modifiers
1929fb4
Added get_natgas_price_diffs function to hourly_writetimeseries
edaf2c2
Added degree day files to copied files, changed names and placement o…
f51d2e7
Fixed runfiles.csv call for dd files
6800c28
Fixed futurefiles.csv call for DD
eb85d75
Fixed futurefiles.csv call for DD again
3442087
Changed fuelcostprep to read DD files from inputs_case
5421aaa
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika 6ba7f78
Remove duplicate ngreg_cdd/hdd inputs
kodiobika 64b1067
Revert extra blank line
kodiobika f05a822
Fixing 2060 extension in fuelcostprep
40ce439
Added nat_gas_price_diffs.h5 to be copied, removed 2060 from fuelcost…
77f11f6
Fixed h5 call in runfiles
4f8ec6e
Changed years looped over
28c6e03
Rename weather-gas price regression parameters file
kodiobika 2543e8b
Add base temperature for degree day calculations to scalars.csv
kodiobika fdb4243
Apply hourly chunk lengths to gas price multipliers and export multip…
kodiobika 30db774
Fix get_county2zone function and add get_county_populations function
kodiobika 54b701b
Split degree day functionalities into different functions and export …
kodiobika 67679be
Add gasreg column to all hierarchy_from134.csv files
kodiobika bd51109
Add gasreg handling and gas_price_multipliers parameters
kodiobika 92f425d
Add val_gasreg.csv to runfiles.csv
kodiobika 143e4ef
Remove unused import
kodiobika 9937295
Bugfixes
kodiobika 0754128
Apply daily price multipliers to gas prices in model
kodiobika 60ec903
Add r and cendiv-level daily gas price multipliers
kodiobika 2a539ed
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika 09180ca
Combine gasreg_hdd.csv and gasreg_cdd.csv into gasreg_degree_days.csv
kodiobika d39bb49
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika 2f56821
fixing rep of szn_adj_gas in temporal params
f310545
Add GSw_GasPriceTimestep switch
kodiobika 5dd6075
Remove gasprice_ref_frac_adder scalar
kodiobika 8f6ea7c
Cleanup
kodiobika 5c33c46
Bugfix
kodiobika 1451eb4
Apply GSw_GasPriceTimestep conditionals
kodiobika 4d9f394
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika 90c353e
Delete references to szn_adj_gas
kodiobika 6692142
Write gasreg set
kodiobika 4c9b46e
Bugfixes
kodiobika 14afcdc
Revert change
kodiobika 450f129
Revert change
kodiobika 5099c4e
General cleanup
kodiobika df12742
Bugfix
kodiobika 9e0d82d
Bugfixes
kodiobika 5335414
Variable renaming
kodiobika 637c75c
Formatting
kodiobika 1d43c39
Cleanup
kodiobika fb97bdd
Merge branch 'main' into ko/temp_based_natgas_prices
88a1622
Update cendivs for four BAs to match the cendivs of their states
kodiobika bbc75d7
Merge branch 'ko/temp_based_natgas_prices' of github.com:ReEDS-Model/…
kodiobika 8cfc304
Renormalize szn_adj_gas so hour-weighted average is 1
kodiobika e1ed961
Bugfix
kodiobika 88cc16b
Bugfixes
kodiobika 862450a
Bugfix
kodiobika f57db4c
Bugfixes
kodiobika f6cea53
Misc. cleanup
kodiobika ee59b2a
Misc. cleanup
kodiobika 8ff0ed3
Cleanup + added docstrings
kodiobika 3878bad
Rename regression parameters file
kodiobika 8fd5662
Cleanup + bugfixes
kodiobika 0e5d136
Bugfix
kodiobika 52514d3
Bugfix
kodiobika a58f5e1
bugfixes
kodiobika 6204f34
Shorten name of regression params file
kodiobika d294cc3
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika f3024a1
Move renormalization of daily gas price multipliers to hourly_writeti…
kodiobika 092d113
Cleanup
kodiobika 78c1478
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika 185a410
Cleanup
kodiobika 03e1c79
Cleanup
kodiobika 29959e3
Cleanup
kodiobika c64471a
Update model documentation
kodiobika c8c8ec5
Update model documentation
kodiobika 8e50aa6
Add new gasreg inputs to sources documentation
kodiobika 8832088
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika 0f1c4a5
docs: hierarchy.png -> spatial_layers_states.png, spatial_layers_zone…
patrickbrown4 c0e91a3
Merge branch 'main' into ko/temp_based_natgas_prices
kodiobika ca37f8f
Update reeds/core/terminus/report.gms
kodiobika 0131b0a
Update reeds/core/solve/6_data_dump.gms
kodiobika 2eb6178
Add 'no price adjustment' option (GSw_GasPriceAdjMethod=0)
kodiobika af335cf
Merge branch 'ko/temp_based_natgas_prices' of github.com:ReEDS-Model/…
kodiobika 4730244
Generalize naming of weighted average function
kodiobika 6ecd312
Add pointer to input processing repo
kodiobika 8f80452
Bugfix
kodiobika 650b173
Add example natural gas price adjustment plots
kodiobika 9b79ec0
Add gasreg description to zones README.md
kodiobika c374525
Fix typo
kodiobika 4bf4e48
Update reeds/input_processing/fuelcostprep.py
kodiobika afcc544
Update reeds/input_processing/fuelcostprep.py
kodiobika e97fc89
Update reeds/input_processing/fuelcostprep.py
kodiobika File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
inputs/fuelprices/gasreg_degree_day_price_mult_regression_params.csv
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| param,California,East_North_Central,East_South_Central,Mid_Atlantic,Mountain,New_England,Northwest,South_Atlantic,Southwest,West_North_Central,West_South_Central | ||
| beta_CDD,0.03,0.009,0.01,0.035,0.029,0.05,0.031,0.019,0.02,0.01,0.011 | ||
| beta_HDD,0.016,0.011,0.011,0.029,0.012,0.036,0.02,0.022,0.015,0.015,0.014 | ||
| alpha,-0.321,-0.208,-0.092,-0.448,-0.383,-0.844,-0.554,-0.227,-0.436,-0.273,-0.18 | ||
| alpha_JAN,0.122,-0.214,-0.072,-0.201,0.046,-0.01,0.054,-0.05,0.227,-0.351,-0.066 | ||
| alpha_FEB,0.094,-0.156,-0.047,-0.354,0.049,-0.122,0.029,-0.06,0.22,-0.277,-0.028 | ||
| alpha_MAR,-0.03,-0.193,-0.075,-0.481,-0.085,-0.308,-0.089,-0.114,0.037,-0.267,-0.072 | ||
| alpha_APR,-0.015,-0.113,-0.002,-0.224,-0.059,-0.159,-0.08,-0.026,0.045,-0.159,-0.022 | ||
| alpha_MAY,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| alpha_JUN,-0.044,0.046,-0.077,0.029,0.015,0.143,0.099,-0.064,-0.08,0.045,-0.056 | ||
| alpha_JUL,-0.045,0.059,-0.113,-0.088,-0.001,0.04,0.222,-0.083,-0.002,0.069,-0.056 | ||
| alpha_AUG,0.05,0.117,-0.12,-0.066,0.104,0.08,0.318,-0.077,0.111,0.133,-0.006 | ||
| alpha_SEP,0.079,0.118,-0.134,-0.076,0.153,0.144,0.296,-0.062,0.121,0.12,0.051 | ||
| alpha_OCT,0.182,0.01,-0.205,-0.271,0.093,-0.032,0.208,-0.086,0.203,-0.018,0.071 | ||
| alpha_NOV,0.19,-0.083,-0.078,-0.319,0.095,-0.147,0.213,-0.043,0.262,-0.156,0.045 | ||
| alpha_DEC,0.247,-0.197,-0.098,-0.367,0.105,-0.102,0.16,-0.066,0.315,-0.31,-0.056 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| t,ddtype,California,East_North_Central,East_South_Central,Mid_Atlantic,Mountain,New_England,Northwest,South_Atlantic,Southwest,West_North_Central,West_South_Central | ||
| 2010,CDD,757,963,1974,913,700,634,137,2271,2202,1095,2754 | ||
| 2010,HDD,2706,6188,3954,5539,6173,5935,5599,3163,2693,6570,2450 | ||
| 2011,CDD,830,858,1725,840,724,553,112,2260,2335,1074,3112 | ||
| 2011,HDD,2791,6173,3347,5471,6430,6113,6106,2564,2737,6570,2113 | ||
| 2012,CDD,1047,974,1760,819,932,563,154,2163,2428,1221,2913 | ||
| 2012,HDD,2401,5356,2880,4960,5520,5563,5675,2305,2309,5520,1648 | ||
| 2013,CDD,1011,689,1438,685,888,540,245,2001,2296,892,2535 | ||
| 2013,HDD,2309,6623,3651,5827,6392,6425,5527,2736,2663,7140,2325 | ||
| 2014,CDD,1201,609,1491,600,731,420,254,2000,2207,812,2474 | ||
| 2014,HDD,1765,7196,3935,6190,5776,6676,5073,2961,2162,7309,2421 | ||
| 2015,CDD,1195,729,1717,809,788,556,304,2397,2262,941,2742 | ||
| 2015,HDD,2000,6165,3224,5762,5469,6520,4832,2496,2339,6093,2085 | ||
| 2016,CDD,1073,958,1956,891,852,625,186,2404,2370,1072,2882 | ||
| 2016,HDD,2110,5701,3095,5338,5551,5928,5082,2464,2129,5792,1750 | ||
| 2017,CDD,1171,708,1585,665,855,451,279,2247,2390,910,2718 | ||
| 2017,HDD,2204,5684,2837,5318,5682,6037,5790,2239,1964,6004,1580 | ||
| 2018,CDD,1044,972,1928,890,878,668,235,2411,2362,1134,2855 | ||
| 2018,HDD,2281,6434,3479,5769,6000,6323,5547,2638,2486,6975,2252 | ||
| 2019,CDD,913,832,1886,787,774,536,130,2503,2275,951,2759 | ||
| 2019,HDD,2636,6427,3181,5736,6422,6538,5696,2392,2571,7082,2143 | ||
| 2020,CDD,1141,831,1636,848,782,645,193,2335,2502,964,2735 | ||
| 2020,HDD,2472,5855,3064,5198,6204,5822,5484,2263,2665,6326,1812 | ||
| 2021,CDD,1050,911,1611,837,818,604,318,2226,2099,1093,2644 | ||
| 2021,HDD,2567,5747,3166,5261,6097,5799,5610,2366,2506,6061,1911 | ||
| 2022,CDD,1117,816,1728,838,791,647,283,2302,2186,1050,2992 | ||
| 2022,HDD,2521,6344,3438,5635,6683,6019,5869,2523,2872,6905,2200 | ||
| 2023,CDD,782,713,1669,683,583,518,209,2258,2157,1042,3117 | ||
| 2023,HDD,2956,5417,2826,4954,6642,5564,5710,2150,2963,5929,1725 | ||
| 2024,CDD,1081,899,1859,867,766,620,235,2399,2371,1046,3073 | ||
| 2024,HDD,2655,5306,3024,4981,6108,5643,5740,2271,2798,5716,1844 | ||
| 2025,CDD,814,851,1773,845,710,609,246,2400,2131,1046,2901 | ||
| 2025,HDD,2383,5952,3161,5319,5867,5924,5487,2344,2453,6383,1949 | ||
| 2026,CDD,1104,856,1781,853,789,615,240,2415,2160,1051,2915 | ||
| 2026,HDD,2431,5937,3148,5298,6120,5901,5753,2329,2592,6376,1942 | ||
| 2027,CDD,1112,861,1788,860,789,621,242,2430,2142,1056,2928 | ||
| 2027,HDD,2427,5923,3136,5277,6120,5879,5771,2313,2598,6369,1935 | ||
| 2028,CDD,1120,866,1796,868,789,627,244,2445,2124,1061,2942 | ||
| 2028,HDD,2424,5908,3123,5256,6119,5856,5789,2298,2605,6362,1928 | ||
| 2029,CDD,1128,871,1803,876,789,633,246,2460,2106,1066,2955 | ||
| 2029,HDD,2420,5894,3111,5235,6118,5833,5808,2283,2612,6355,1921 | ||
| 2030,CDD,1137,876,1811,884,788,640,248,2476,2088,1071,2969 | ||
| 2030,HDD,2417,5879,3098,5214,6117,5810,5826,2267,2619,6348,1914 | ||
| 2031,CDD,1145,881,1818,892,788,646,250,2491,2072,1076,2982 | ||
| 2031,HDD,2413,5864,3086,5193,6117,5787,5844,2251,2623,6341,1907 | ||
| 2032,CDD,1153,886,1826,900,788,652,252,2507,2056,1081,2996 | ||
| 2032,HDD,2410,5850,3073,5172,6117,5764,5863,2235,2627,6334,1900 | ||
| 2033,CDD,1161,890,1834,908,788,659,254,2522,2040,1086,3010 | ||
| 2033,HDD,2406,5835,3060,5151,6117,5741,5881,2220,2631,6327,1893 | ||
| 2034,CDD,1169,895,1841,915,787,665,255,2538,2024,1092,3023 | ||
| 2034,HDD,2403,5820,3048,5130,6117,5718,5900,2204,2635,6319,1886 | ||
| 2035,CDD,1177,900,1849,923,787,671,257,2553,2008,1097,3037 | ||
| 2035,HDD,2399,5806,3035,5109,6117,5695,5918,2188,2639,6312,1879 | ||
| 2036,CDD,1185,905,1857,931,787,678,259,2569,1991,1102,3050 | ||
| 2036,HDD,2396,5791,3022,5088,6117,5672,5937,2173,2644,6304,1872 | ||
| 2037,CDD,1193,910,1864,939,786,684,261,2585,1975,1107,3064 | ||
| 2037,HDD,2392,5776,3009,5068,6117,5649,5955,2157,2648,6297,1865 | ||
| 2038,CDD,1202,915,1872,947,786,690,263,2600,1958,1112,3077 | ||
| 2038,HDD,2389,5762,2996,5047,6117,5626,5974,2141,2653,6289,1858 | ||
| 2039,CDD,1210,920,1879,955,786,697,265,2616,1942,1117,3091 | ||
| 2039,HDD,2385,5747,2984,5026,6118,5603,5992,2125,2657,6282,1852 | ||
| 2040,CDD,1218,925,1887,963,785,703,267,2632,1925,1122,3104 | ||
| 2040,HDD,2382,5732,2971,5005,6118,5579,6011,2110,2662,6274,1845 | ||
| 2041,CDD,1226,930,1895,971,785,710,269,2648,1908,1128,3118 | ||
| 2041,HDD,2378,5717,2958,4984,6118,5556,6029,2094,2667,6267,1838 | ||
| 2042,CDD,1234,935,1902,978,785,716,271,2663,1892,1133,3131 | ||
| 2042,HDD,2374,5703,2945,4963,6118,5533,6048,2079,2671,6259,1831 | ||
| 2043,CDD,1242,940,1910,986,784,722,273,2679,1875,1138,3145 | ||
| 2043,HDD,2371,5688,2933,4943,6119,5510,6066,2063,2676,6252,1825 | ||
| 2044,CDD,1250,945,1918,994,784,729,275,2695,1858,1143,3158 | ||
| 2044,HDD,2367,5673,2920,4922,6119,5487,6085,2047,2681,6244,1818 | ||
| 2045,CDD,1258,950,1925,1002,784,735,277,2711,1841,1148,3172 | ||
| 2045,HDD,2364,5658,2907,4901,6119,5464,6103,2032,2686,6236,1811 | ||
| 2046,CDD,1267,955,1933,1010,783,741,278,2727,1824,1153,3185 | ||
| 2046,HDD,2360,5644,2894,4880,6120,5440,6122,2016,2690,6229,1805 | ||
| 2047,CDD,1275,960,1940,1018,783,748,280,2742,1807,1159,3199 | ||
| 2047,HDD,2357,5629,2881,4859,6120,5417,6140,2001,2695,6221,1798 | ||
| 2048,CDD,1283,965,1948,1026,783,754,282,2758,1790,1164,3212 | ||
| 2048,HDD,2353,5614,2869,4838,6121,5394,6159,1985,2700,6213,1791 | ||
| 2049,CDD,1291,970,1956,1033,782,760,284,2774,1772,1169,3226 | ||
| 2049,HDD,2350,5599,2856,4818,6121,5371,6177,1970,2706,6206,1785 | ||
| 2050,CDD,1299,975,1963,1041,782,767,286,2790,1755,1174,3239 | ||
| 2050,HDD,2346,5585,2843,4797,6122,5348,6196,1955,2711,6198,1778 |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Do you think it'd be worthwhile to add a test case for the new daily adjustment method to
cases_test.csv? If there's a lot of processing that only runs whenGSw_GasPriceAdjMethod = 2, having a test case might help to keep it working. If the differences are relatively minor and/or you don't think the feature will be used often, it's ok to leave it out.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.
The daily adjustment processing gets run in every case and then the multipliers are overwritten if
GSw_GasPriceAdjMethod != 2, so I think we should be okay