message stringlengths 5 481 | model_input stringlengths 47 2.9k | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|
Update PUDL db link (v2 includes ATB 2020 data) | MODIFY
README.md
README.md
@@ -55,7 +55,7 @@ conda activate powergenome
pip install -e .
```
-5. Download a [modifed version of the PUDL database](https://drive.google.com/open?id=17hTZUKweDMqUi2wvBdubaqVhMRgnN5o5) that includes NREL ATB cost data and is not yet included in PUDL.
+5. Download a [modifed version of the ... | [
1,
6720,
12096,
203,
6949,
958,
18,
1264,
203,
6949,
958,
18,
1264,
203,
30989,
300,
2539,
16,
27,
397,
2539,
16,
27,
22175,
356,
2414,
10235,
7212,
23220,
203,
16104,
3799,
300,
73,
263,
203,
10335,
68,
203,
17,
25,
18,
13059,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
20790,
8914,
1319,
1692,
261,
90,
22,
6104,
14464,
38,
26599,
20,
501,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Change to master DOI for all versions
Stick with mater DOI rather than version specific DOI | MODIFY
README.md
README.md
[](https://travis-ci.com/gschivley/PowerGenome)
[](https://codecov.io/gh/gschivley/Pow... | [
1,
6720,
12096,
203,
6949,
958,
18,
1264,
203,
6949,
958,
18,
1264,
203,
63,
5,
63,
3116,
2685,
29955,
4528,
2207,
313,
842,
291,
17,
8450,
18,
832,
19,
564,
343,
427,
30678,
19,
13788,
7642,
1742,
18,
11451,
35,
2316,
33,
93,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3043,
358,
4171,
5467,
45,
364,
777,
5244,
203,
510,
1200,
598,
312,
2045,
5467,
45,
9178,
2353,
1177,
2923,
5467,
45,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Update README.md
Fix old link to modified PUDL database | MODIFY
README.md
README.md
@@ -22,7 +22,7 @@ The goal of PowerGenome is to let a user make all of these choices in a settings
## Data
-PowerGenome uses data from a number of different sources, including EIA, NREL, and EPA. Most of the data are already compiled into a [single sqlite database](https://drive.google.com/op... | [
1,
6720,
12096,
203,
6949,
958,
18,
1264,
203,
6949,
958,
18,
1264,
203,
30989,
300,
3787,
16,
27,
397,
3787,
16,
27,
22175,
1021,
17683,
434,
23783,
7642,
1742,
353,
358,
2231,
279,
729,
1221,
777,
434,
4259,
7246,
316,
279,
1947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
10746,
958,
18,
1264,
203,
8585,
1592,
1692,
358,
4358,
20790,
8914,
2063,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Fix km to mile conversion | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -282,7 +282,7 @@ def fetch_atb_offshore_spur_costs(
)
# ATB assumes a 30km distance for offshore spur. Normalize to per mile
- spur_costs["capex_mw_mile"] = spur_costs["capex_mw"] / 30 * 1.60934
+ spur_costs["capex_mw_mile"] = spur_costs["capex_mw"] / 30 / 1.60934... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
6030,
22,
16,
27,
397,
6030,
22,
16,
27,
22175,
1652,
2158,
67,
270,
70,
67,
3674,
674,
479... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
18952,
358,
312,
398,
4105,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Read 860m with flexible number of header/footer rows | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1358,7 +1358,19 @@ def clean_860m_sheet(
"""
df = eia_860m.parse(
- sheet_name=sheet_name, skiprows=1, skipfooter=1, na_values=[" "]
+ sheet_name=sheet_name, na_values=[" "]
+ )
+ for idx, row in df.iterrows():
+ if row.iloc[0] == "Entity ID":
+ sr = idx + ... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
3437,
8204,
16,
27,
397,
3437,
8204,
16,
3657,
22175,
1652,
2721,
67,
28,
4848,
81,
67,
8118,
12,
203,
8395,
203,
2180,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1994,
1725,
4848,
81,
598,
16600,
1523,
1300,
434,
1446,
19,
14723,
2595,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Version bump to 0.4.1 | MODIFY
setup.py
setup.py
@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
setup(
name="powergenome",
packages=find_packages(),
- version="0.4.0",
+ version="0.4.1",
description="Extract PUDL data for use in power system models",
author="Greg Schivley",
entry_points={
| [
1,
6720,
12096,
203,
8401,
18,
2074,
203,
8401,
18,
2074,
203,
30989,
300,
23,
16,
27,
397,
23,
16,
27,
22175,
628,
444,
30693,
1930,
1104,
67,
10308,
16,
3875,
203,
8401,
12,
203,
529,
1546,
12238,
23220,
3113,
203,
10308,
33,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1444,
23559,
358,
374,
18,
24,
18,
21,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Add a parameter for AEO load growth scenario | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -952,6 +952,7 @@ additional_planned: ~
# historical data
default_load_year: 2012
regular_load_growth_start_year: 2019
+growth_scenario: REF2020
historical_load_region_maps:
TRE: [ERC_PHDL, ERC_REST, ERC_WEST]
MODIFY
powergenome/load_profiles.... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
8778,
22,
16,
26,
397,
8778,
22,
16,
27,
22175,
3312,
67,
412,
10041,
30,
4871,
203,
7,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
279,
1569,
364,
432,
41,
51,
1262,
13334,
451,
10766,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Remove units retiring in planning year
Previously kept units retiring in the planning year. Decided to change
so that the model will plan for a system without those resources. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -471,7 +471,7 @@ def label_retirement_year(
logger.info("Changing retirement dates based on settings file")
model_year = settings["model_year"]
start_ret_cap = df.loc[
- df["retirement_year"] < model_year, settings["capacity_col"]
+ df["retirement_year"] <= ... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
9462,
21,
16,
27,
397,
9462,
21,
16,
27,
22175,
1652,
1433,
67,
1349,
577,
475,
67,
6874,
12,
203,
4901,
18,
1376,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3288,
4971,
325,
11256,
316,
886,
10903,
3286,
203,
8351,
715,
16555,
4971,
325,
11256,
316,
326,
886,
10903,
3286,
18,
3416,
13898,
358,
2549,
203,
2048,
716,
326,
938,
903,
4995,
364,
279,
2619,
2887,
5348,
2703,
18,
2,
-100,
-... |
Fix user-supplied regional cost multipliers
This isn't advertised, but users can supply multipliers for regional
cost factors. | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -1017,11 +1017,12 @@ def atb_new_generators(atb_costs, atb_hr, settings):
)
if settings.get("user_regional_cost_multiplier_fn"):
user_cost_multipliers = pd.read_csv(
- Path(settings["extra_inputs"])
- / settings["user_regional_cost_multiplier_fn"]
+ Path(settings[... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
15168,
27,
16,
2499,
397,
15168,
27,
16,
2138,
22175,
1652,
622,
70,
67,
2704,
67,
25959,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
729,
17,
2859,
3110,
29734,
6991,
3309,
8127,
414,
203,
2503,
5177,
1404,
16738,
5918,
16,
1496,
3677,
848,
14467,
3309,
8127,
414,
364,
29734,
203,
12398,
14490,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Bug fix when no regional tags
If the parameter is in settings file with value of ~ (None), .get returns
"None". Should be an empty dict instead. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1229,7 +1229,7 @@ def add_genx_model_tags(df, settings):
logger.warning(f"No model tag values found for {tag_col} ({e})")
# Change tags with specific regional values for a technology
- flat_regional_tags = flatten(settings.get("regional_tag_values", {}))
+ ... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
2138,
5540,
16,
27,
397,
2138,
5540,
16,
27,
22175,
1652,
527,
67,
4507,
92,
67,
2284,
67,
4156,
12,
2180,
16,
1947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
1347,
1158,
29734,
2342,
203,
2047,
326,
1569,
353,
316,
1947,
585,
598,
460,
434,
4871,
261,
7036,
3631,
263,
588,
1135,
203,
6,
7036,
9654,
9363,
506,
392,
1008,
2065,
3560,
18,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
Make RPS/CES optional in network file | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -430,7 +430,10 @@ def main():
network_max_reinforcement, settings=_settings
).pipe(network_reinforcement_cost, settings=_settings)
+ if _settings.get("emission_policies_fn"):
network = add_emission_policies... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
24,
5082,
16,
27,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
6464,
534,
5857,
19,
1441,
55,
3129,
316,
2483,
585,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Specify numpy 1.19 to avoid pandas conflict.
Also remove defaults channel. | MODIFY
environment.yml
environment.yml
name: powergenome
channels:
- conda-forge
- - defaults
+ # - defaults
dependencies:
- python=3.7 # Remove for tox.ini & setup.py
- pip
- conda-forge::catalystcoop.pudl=0.3
+ - conda-forge::numpy=1.19
- jupyterlab
- black
- pytest
@@ -17,6 +18,7 @@ dependencies:
- pre-commit
- cond... | [
1,
6720,
12096,
203,
10274,
18,
10865,
203,
10274,
18,
10865,
203,
529,
30,
7212,
23220,
203,
9114,
30,
203,
17,
356,
2414,
17,
1884,
908,
203,
17,
300,
3467,
203,
15,
468,
300,
3467,
203,
11037,
30,
203,
17,
5790,
33,
23,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19302,
3972,
404,
18,
3657,
358,
4543,
12037,
7546,
18,
203,
1067,
2048,
1206,
3467,
1904,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Whitespace formatting | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -208,7 +208,7 @@ def main():
alt_method = True
Total_Load = MakeLoadProfiles(scenario_settings, out_folder)
- breakpoint()
+ # breakpoint()
i = 0
model_regions_gdf = None
for year in scenario_settings:
| [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
26825,
16,
27,
397,
268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
9431,
10407,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Add "Network_zones" col required by GenX | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -440,7 +440,10 @@ def main():
transmission = transmission.pipe(
network_max_reinforcement, settings=_settings
).pipe(network_reinforcement_cost, settings=_settings)
+ zones = settings["model_regions"]
+ net... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
6334,
20,
16,
27,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
315,
3906,
67,
14203,
6,
645,
1931,
635,
10938,
60,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Make network/gen_data files match GenX format
Add the Network_zones column to network file
Add all requested cols to gen_data | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -268,6 +268,9 @@ def main():
gens = calculate_partial_CES_values(
gen_clusters, fuels, _settings
).pipe(fix_min_power_values, gen_variability)
+ for col in _settings["generator_columns"]:
+ if col not in ge... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
5558,
28,
16,
26,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
6464,
2483,
19,
4507,
67,
892,
1390,
845,
10938,
60,
740,
203,
986,
326,
5128,
67,
14203,
1057,
358,
2483,
585,
203,
986,
777,
3764,
5347,
358,
3157,
67,
892,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Change param default to match new GenX name | MODIFY
powergenome/GenX.py
powergenome/GenX.py
@@ -636,7 +636,7 @@ def calc_emissions_ces_level(network_df, load_df, settings):
def fix_min_power_values(
resource_df: pd.DataFrame,
gen_profile_df: pd.DataFrame,
- min_power_col: str = "Min_power",
+ min_power_col: str = "Min_Power",
) -> pd.DataFrame:
"""Fix potentially... | [
1,
6720,
12096,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
30989,
300,
4449,
26,
16,
27,
397,
4449,
26,
16,
27,
22175,
1652,
7029,
67,
351,
1054,
1115,
67,
764,
67,
2815,
12,
5185,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3043,
579,
805,
358,
845,
394,
10938,
60,
508,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Network file fixes
Move column formatting functions up
Remove incorrect code | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -440,9 +440,12 @@ def main():
# transmission = agg_transmission_constraints(
# pudl_engine=pudl_engine, settings=_settings
# )
- transmission = transmission.pipe(
- network_max_reinforcement, settings=_sett... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
6334,
20,
16,
29,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3906,
585,
24436,
203,
7607,
1057,
10407,
4186,
731,
203,
3288,
11332,
981,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Reconcile gen ids in fgd csv and PUDL
PUDL has several gen ids with leading 0's, which aren't present in the
CSV of FGD data. | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -321,7 +321,7 @@ def atb_fixed_var_om_existing(
atb_hr_df: pd.DataFrame,
settings: dict,
pudl_engine: sqlalchemy.engine.base.Engine,
- coal_fgd_df: pd.DataFrame
+ coal_fgd_df: pd.DataFrame,
) -> pd.DataFrame:
"""Add fixed and variable O&M for existing power plants... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
1578,
21,
16,
27,
397,
1578,
21,
16,
27,
22175,
1652,
622,
70,
67,
12429,
67,
1401,
67,
362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
426,
11504,
398,
3157,
3258,
316,
10186,
72,
6101,
471,
20790,
8914,
203,
18061,
8914,
711,
11392,
3157,
3258,
598,
7676,
374,
1807,
16,
1492,
11526,
1404,
3430,
316,
326,
203,
16570,
434,
478,
27338,
501,
18,
2,
-100,
-100,
-100,
... |
Compatability with pudl 0.4
Use new clean_merge_asof function in place of old merge_on_date_year
Specify series name after groupby, fixes error from pandas upgrade | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1028,13 +1028,11 @@ def calculate_weighted_heat_rate(heat_rate_df):
)
return weighted_hr
- weighted_unit_hr = (
- heat_rate_df.groupby(["plant_id_eia", "unit_id_pudl"], as_index=False)
- .apply(w_hr)
- .reset_index()
+ weighted_unit_hr = heat_rate_df.groupb... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
2163,
6030,
16,
3437,
397,
2163,
6030,
16,
2499,
22175,
1652,
4604,
67,
30890,
67,
580,
270,
67,
5141,
12,
580,
270,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
13322,
2967,
598,
293,
1100,
80,
374,
18,
24,
203,
3727,
394,
2721,
67,
2702,
67,
345,
792,
445,
316,
3166,
434,
1592,
2691,
67,
265,
67,
712,
67,
6874,
203,
19302,
4166,
508,
1839,
13126,
16,
24436,
555,
628,
12037,
8400,
2,
... |
Update env to use pudl 0.4 | MODIFY
environment.yml
environment.yml
-name: powergenome
+name: pg_pudl_update
channels:
- conda-forge
- defaults
dependencies:
- - python=3.7 # Remove for tox.ini & setup.py
+ - python>=3.8 # Remove for tox.ini & setup.py
- pip
- - conda-forge::catalystcoop.pudl=0.3
+ - conda-forge::catalystcoop.pudl=0.4
- jupyterlab... | [
1,
6720,
12096,
203,
10274,
18,
10865,
203,
10274,
18,
10865,
203,
17,
529,
30,
7212,
23220,
203,
15,
529,
30,
7184,
67,
84,
1100,
80,
67,
2725,
203,
9114,
30,
203,
17,
356,
2414,
17,
1884,
908,
203,
17,
3467,
203,
11037,
30,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
1550,
358,
999,
293,
1100,
80,
374,
18,
24,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Copy reserves CSV file from extra_inputs to case folder
The reserves file is simple and unlikely to change much across cases.
Just put a version of in extra_inputs and copy it. Other files can be
used by changing the "reserves_fn" parameter. | ADD
example_system/extra_inputs/Reserves.csv
+Reg_Req_Percent_Load,Reg_Req_Percent_VRE,Rsv_Req_Percent_Load,Rsv_Req_Percent_VRE,Unmet_Rsv_Penalty_Dollar_per_MW,Dynamic_Contingency,Static_Contingency_MW
+0.01,0.0032,0.033,0.0795,1000,0,0
\ No newline at end of file
MODIFY
example_system/test_settings.yml
example_syst... | [
1,
8355,
203,
203,
8236,
67,
4299,
19,
7763,
67,
10029,
19,
607,
264,
3324,
18,
6715,
203,
15,
1617,
67,
6113,
67,
8410,
67,
2563,
16,
1617,
67,
6113,
67,
8410,
67,
58,
862,
16,
54,
5751,
67,
6113,
67,
8410,
67,
2563,
16,
54,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
2951,
400,
264,
3324,
10381,
585,
628,
2870,
67,
10029,
358,
648,
3009,
203,
1986,
400,
264,
3324,
585,
353,
4143,
471,
29372,
358,
2549,
9816,
10279,
6088,
18,
203,
19642,
1378,
279,
1177,
434,
316,
2870,
67,
10029,
471,
1610,
5... |
Update atb_modifiers col names in settings docs | MODIFY
example_system/settings_documentation.md
example_system/settings_documentation.md
@@ -414,13 +414,13 @@ type: Dict[str, Dict[str, Union[str, list]]]
description: This parameter modifies parameters for ATB technologies in-place (keeping the same name). Top-level keys are user names for each resource and are not u... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
4272,
67,
26941,
18,
1264,
203,
8236,
67,
4299,
19,
4272,
67,
26941,
18,
1264,
203,
30989,
300,
24,
3461,
16,
3437,
397,
24,
3461,
16,
3437,
22175,
618,
30,
9696,
63,
701,
16,
9696,
63,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
622,
70,
67,
15432,
645,
1257,
316,
1947,
3270,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Add tag cols to Generator_data file
If they are not included in the settings file, add them now. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1225,6 +1225,10 @@ def add_genx_model_tags(df, settings):
default = settings.get("default_model_tag", 0)
for tag_col in settings.get("model_tag_names", []):
df[tag_col] = default
+ if tag_col not in settings.get("generator_columns", []) and isinstance(
+ se... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
2138,
2947,
16,
26,
397,
2138,
2947,
16,
2163,
22175,
1652,
527,
67,
4507,
92,
67,
2284,
67,
4156,
12,
2180,
16,
1947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
1047,
5347,
358,
10159,
67,
892,
585,
203,
2047,
2898,
854,
486,
5849,
316,
326,
1947,
585,
16,
527,
2182,
2037,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Add new model tags Reg_Max and Rsv_Max | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -558,6 +558,8 @@ model_tag_names:
- Hydro_Energy_to_Power_Ratio
- MinCapTag_1
- MinCapTag_2
+ - Reg_Max
+ - Rsv_Max
default_model_tag: 0
@@ -1284,10 +1286,8 @@ generator_columns: [
"Down_Time",
"NACC_Eff",
"NACC_Peak_to_Base",
- "Reg_Up",
- "Re... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
2539,
28,
16,
26,
397,
2539,
28,
16,
28,
22175,
938,
67,
2692,
67,
1973,
30,
203,
17,
14881... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
394,
938,
2342,
2526,
67,
2747,
471,
534,
5751,
67,
2747,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Update README for version bump and fix env name | MODIFY
environment.yml
environment.yml
-name: pg_pudl_update
+name: powergenome
channels:
- conda-forge
- defaults
@@ -16,7 +16,7 @@ dependencies:
- isort
- pre-commit
- conda-forge::nb_conda_kernels
- # - xlrd=1.2
+ - fastparquet
# GIS dependencies from conda-forge
- conda-forge::fiona
| [
1,
6720,
12096,
203,
10274,
18,
10865,
203,
10274,
18,
10865,
203,
17,
529,
30,
7184,
67,
84,
1100,
80,
67,
2725,
203,
15,
529,
30,
7212,
23220,
203,
9114,
30,
203,
17,
356,
2414,
17,
1884,
908,
203,
17,
3467,
203,
30989,
300,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
10746,
958,
364,
1177,
23559,
471,
2917,
1550,
508,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Fix bug where num units < num clusters
sklearn raises an error if the number of operating units is less than the
number of clusters. Change the number of clusters and alert the user. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -2345,6 +2345,16 @@ class GeneratorClusters:
# "minimum_load_mw",
"heat_rate_mmbtu_mwh",
]
+ if len(grouped) < num_clusters[region][tech]:
+ s = f"""
+ *****************************
+ The technology {tech} in region {region} has only {len(grouped)} operating... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
4366,
7950,
16,
26,
397,
4366,
7950,
16,
2313,
22175,
667,
10159,
13698,
30,
203,
7,
315,
15903,
67,
945,
67,
81,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
7934,
1625,
818,
4971,
411,
818,
9566,
203,
7771,
21346,
14183,
392,
555,
309,
326,
1300,
434,
16929,
4971,
353,
5242,
2353,
326,
203,
2696,
434,
9566,
18,
7576,
326,
1300,
434,
9566,
471,
6881,
326,
729,
18,
2,
-100,
-100,... |
Pushed via gitpush | MODIFY
powergenome/util.py
powergenome/util.py
@@ -57,6 +57,33 @@ def check_settings(settings: dict, pudl_engine: sa.engine) -> None:
itertools.chain.from_iterable(settings["aeo_fuel_region_map"].values())
)
+ techs = settings["atb_new_gen"]
+
+ for tech in techs:
+ tech, tech_detail, cost_case, _ = tech
+
+ s = f"""
+... | [
1,
6720,
12096,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
30989,
300,
10321,
16,
26,
397,
10321,
16,
3707,
22175,
1652,
866,
67,
4272,
12,
4272,
30,
2065,
16,
293,
1100,
80,
67,
8944,
30,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
7621,
329,
3970,
5071,
6206,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Fix for missing fgd values
The fgd data file I'm using has some missing plants. | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -606,6 +606,9 @@ def atb_fixed_var_om_existing(
fgd = coal_fgd_df.query(
"plant_id_eia == @plant_id & generator_id in @gen_ids"
)["fgd"].values
+ if not np.any(fgd):
+ # If FGD isn't found, use average of with/without FGD
+ fgd = np.ones_like(age) * 0.5
# https://... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
4848,
26,
16,
26,
397,
4848,
26,
16,
29,
22175,
1652,
622,
70,
67,
12429,
67,
1401,
67,
362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
364,
3315,
10186,
72,
924,
203,
1986,
10186,
72,
501,
585,
467,
17784,
1450,
711,
2690,
3315,
886,
4388,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Fix when external wind/solar cap values are missing | MODIFY
powergenome/external_data.py
powergenome/external_data.py
@@ -428,12 +428,15 @@ def overwrite_wind_pv_capacity(df, settings):
for region in df["region"].unique():
for tech in ["Solar Photovoltaic", "Onshore Wind Turbine"]:
if tech in df.query("region == @region")["technology"].to_list():
+ try:
df.loc[
(df["regi... | [
1,
6720,
12096,
203,
12238,
23220,
19,
9375,
67,
892,
18,
2074,
203,
12238,
23220,
19,
9375,
67,
892,
18,
2074,
203,
30989,
300,
24,
6030,
16,
2138,
397,
24,
6030,
16,
3600,
22175,
1652,
6156,
67,
10094,
67,
25224,
67,
16017,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
1347,
3903,
17064,
19,
18281,
297,
3523,
924,
854,
3315,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Check object type before dropna | MODIFY
powergenome/GenX.py
powergenome/GenX.py
@@ -50,9 +50,17 @@ def create_policy_req(settings: dict, col_str_match: str) -> pd.DataFrame:
if len(policy_cols) == 0:
return None
- year_case_policy = policies.loc[
- (case_id, model_year), ["region"] + policy_cols
- ].dropna(subset=policy_cols)
+ year_case_policy = poli... | [
1,
6720,
12096,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
30989,
300,
3361,
16,
29,
397,
3361,
16,
4033,
22175,
1652,
752,
67,
5086,
67,
3658,
12,
4272,
30,
2065,
16,
645,
67,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1564,
733,
618,
1865,
26190,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Copy whole genx settings folder | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -533,6 +533,12 @@ def main():
if _settings.get("genx_settings_fn"):
shutil.copy(cwd / _settings["genx_settings_fn"], case_folder / "Inputs")
+ if _settings.get("genx_settings_folder"):
+ genx_settings_folde... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
25,
3707,
16,
26,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
2951,
7339,
3157,
92,
1947,
3009,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
modified cli | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -463,12 +463,9 @@ def main():
energy_share_req = create_policy_req(_settings, col_str_match="ESR")
co2_cap = create_policy_req(_settings, col_str_match="CO_2")
min_cap = min_cap_req(_settings)
-<<<<<<< HEAD... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
24,
4449,
16,
2138,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
7342,
4942,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Add omitted MIS_D_MS to historical load regions | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -979,7 +979,7 @@ historical_load_region_maps:
RFCET: [PJM_WMAC, PJM_EMAC, PJM_SMAC, PJM_PENE, PJM_Dom]
RFCMI: [MIS_LMI]
RFCWT: [PJM_West, PJM_AP, PJM_ATSI, PJM_COMD]
- SERCDLT: [MIS_WOTA, MIS_LA, MIS_AMSO, MIS_AR]
+ SERCDLT: [MIS_WOTA, MIS_LA, ... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
29,
7235,
16,
27,
397,
29,
7235,
16,
27,
22175,
23922,
67,
945,
67,
6858,
67,
10711,
30,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
16195,
490,
5127,
67,
40,
67,
3537,
358,
23922,
1262,
10085,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Add all geothermal techs for reginal multiplier | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -1000,7 +1000,7 @@ cost_multiplier_technology_map:
Solar thermal: [CSP]
Solar PV - tracking: [UtilityPV, CommPV, ResPV]
Battery storage: [Battery_*]
- Geothermal: [Geothermal]
+ Geothermal: [Geothermal_HydroBinary, Geothermal_HydroFlash, Geothe... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
18088,
16,
27,
397,
18088,
16,
27,
22175,
6991,
67,
20538,
67,
28012,
82,
4676,
67,
1458,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
777,
8244,
10370,
25301,
13878,
87,
364,
960,
1490,
15027,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Bug fix and data update
The +1 ends up skipping a year. | MODIFY
powergenome/price_adjustment.py
powergenome/price_adjustment.py
@@ -97,7 +97,7 @@ def get_cpi_data(start_year: int = 1980, end_year: int = None) -> pd.DataFrame:
)
a_cpi_df = a_cpi_df.query("period == 12")
df_list.append(a_cpi_df)
- start_year = e_y + 1
+ start_year = e_y
e_y = start_year + 10
annual_cpi = pd.co... | [
1,
6720,
12096,
203,
12238,
23220,
19,
8694,
67,
13362,
475,
18,
2074,
203,
12238,
23220,
19,
8694,
67,
13362,
475,
18,
2074,
203,
30989,
300,
10580,
16,
27,
397,
10580,
16,
27,
22175,
1652,
336,
67,
4057,
77,
67,
892,
12,
1937,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
471,
501,
1089,
203,
1986,
397,
21,
3930,
731,
14195,
279,
3286,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Calc demand ratio using full IPM load
I made a change before to only include states in the model regions.
This caused ratio_A to be very large, increading demand. | MODIFY
powergenome/load_construction.py
powergenome/load_construction.py
@@ -205,6 +205,8 @@ def CreateBaseLoad(
}
model_states = pop.loc[pop["GenX.Region"].isin(regions), "State"]
EFS_2020_LoadProf = pd.read_parquet(path_in / "EFS_REF_load_2020.parquet")
+ total_efs_2020_load = EFS_2020_LoadProf["LoadMW"].sum()
+
EFS_... | [
1,
6720,
12096,
203,
12238,
23220,
19,
945,
67,
591,
4549,
18,
2074,
203,
12238,
23220,
19,
945,
67,
591,
4549,
18,
2074,
203,
30989,
300,
31777,
16,
26,
397,
31777,
16,
28,
22175,
1652,
1788,
2171,
2563,
12,
203,
97,
203,
2284,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
25779,
23653,
7169,
1450,
1983,
2971,
49,
1262,
203,
45,
7165,
279,
2549,
1865,
358,
1338,
2341,
5493,
316,
326,
938,
10085,
18,
203,
2503,
15848,
7169,
67,
37,
358,
506,
8572,
7876,
16,
7290,
21803,
23653,
18,
2,
-100,
-100,
-10... |
Uncomment NZA_electrification param | MODIFY
example_system/test_settings2.yml
example_system/test_settings2.yml
@@ -73,7 +73,7 @@ distributed_gen_values:
avg_distribution_loss: 0.0453
# NZA electrifications scenarios: current_policy, deep_decarbonization, moderate_decarbonization, stated_policy
-# NZA_electrification: current_policy
+NZA_electrification: ... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
22,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
22,
18,
10865,
203,
30989,
300,
9036,
16,
27,
397,
9036,
16,
27,
22175,
16859,
67,
4507,
67,
2372,
30,
203,
14141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
984,
3469,
423,
62,
37,
67,
13759,
86,
1480,
579,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Wrap warning message string | MODIFY
powergenome/util.py
powergenome/util.py
@@ -69,17 +69,12 @@ def check_settings(settings: dict, pudl_engine: sa.engine) -> None:
technology == "{tech}"
AND tech_detail == "{tech_detail}"
"""
- if (
- len(
- pudl_engine.execute(
- s,
- ).fetchall()
- )
- == 0
- ):
+ if len(pudl_engine.execute(s).fetchall()) == 0:
... | [
1,
6720,
12096,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
30989,
300,
8148,
16,
4033,
397,
8148,
16,
2138,
22175,
1652,
866,
67,
4272,
12,
4272,
30,
2065,
16,
293,
1100,
80,
67,
8944,
30,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
2964,
3436,
883,
533,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Link zenodo badge to the DOI for all versions | MODIFY
README.md
README.md
[](https://travis-ci.com/gschivley/PowerGenome)
[](https://codecov.io/gh/gschivley/Pow... | [
1,
6720,
12096,
203,
6949,
958,
18,
1264,
203,
6949,
958,
18,
1264,
203,
63,
5,
63,
3116,
2685,
29955,
4528,
2207,
313,
842,
291,
17,
8450,
18,
832,
19,
564,
343,
427,
30678,
19,
13788,
7642,
1742,
18,
11451,
35,
2316,
33,
93,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
2098,
22759,
7370,
15654,
358,
326,
5467,
45,
364,
777,
5244,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Very minor version bump | MODIFY
setup.py
setup.py
@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
setup(
name="powergenome",
packages=find_packages(),
- version="0.4.3",
+ version="0.4.3.1",
description="Extract PUDL data for use in power system models",
author="Greg Schivley",
entry_points={
| [
1,
6720,
12096,
203,
8401,
18,
2074,
203,
8401,
18,
2074,
203,
30989,
300,
23,
16,
27,
397,
23,
16,
27,
22175,
628,
444,
30693,
1930,
1104,
67,
10308,
16,
3875,
203,
8401,
12,
203,
529,
1546,
12238,
23220,
3113,
203,
10308,
33,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
58,
627,
8439,
1177,
23559,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Update precommit hook versions | MODIFY
.pre-commit-config.yaml
.pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v2.3.0
+ rev: v4.0.1
hooks:
- id: check-yaml
# - id: end-of-file-fixer
@@ -8,6 +8,6 @@ repos:
- id: check-added-large-files
args: ['--maxkb=80000']
- repo: https://github.com/psf/black
- rev: 19.3... | [
1,
6720,
12096,
203,
18,
1484,
17,
7371,
17,
1425,
18,
9522,
203,
18,
1484,
17,
7371,
17,
1425,
18,
9522,
203,
15564,
30,
203,
17,
3538,
30,
2333,
2207,
6662,
18,
832,
19,
1484,
17,
7371,
19,
1484,
17,
7371,
17,
10468,
203,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
675,
7371,
3953,
5244,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Discard HRs below 5 mmbtu/MWh
Replace with median for technology. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -2266,9 +2266,9 @@ class GeneratorClusters:
self.prime_mover_hr_map
)
- # Set negative heat rates to nan
+ # Set heat rates < 5 or > 35 mmbtu/MWh to nan
self.units_model.loc[
- (self.units_model.heat_rate_mmbtu_mwh < 0)
+ (self.units_model.heat_rate_mmbtu_mw... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
3787,
6028,
16,
29,
397,
3787,
6028,
16,
29,
22175,
667,
10159,
13698,
30,
203,
2890,
18,
16382,
67,
81,
1643,
67,
7256... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
14185,
670,
18880,
5712,
1381,
312,
1627,
88,
89,
19,
49,
2888,
203,
5729,
598,
12644,
364,
17734,
4676,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Add nuclear HR if not in data
Nuclear heat rates are nan with PUDL v3 (software 0.5). Fill them with
values from ATB so VOM is calculated correctly. | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -671,8 +671,13 @@ def atb_fixed_var_om_existing(
_df["Fixed_OM_Cost_per_MWyr"] = inflation_price_adjustment(
fixed, 2015, target_usd_year
)
+
+ # If nuclear heat rates are NaN, set them to new build value
+ _df.loc[
+ _df["heat_rate_mmbtu_mwh"].isna(), "heat_rate_... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
9599,
21,
16,
28,
397,
9599,
21,
16,
3437,
22175,
1652,
622,
70,
67,
12429,
67,
1401,
67,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
9244,
8507,
670,
54,
309,
486,
316,
501,
203,
50,
89,
8507,
19347,
17544,
854,
6468,
598,
20790,
8914,
331,
23,
261,
9269,
2726,
374,
18,
25,
2934,
14192,
2182,
598,
203,
2372,
628,
14464,
38,
1427,
776,
1872,
353,
8894,
8... |
Get cost mult filename from settings | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -1058,7 +1058,8 @@ def atb_new_generators(atb_costs, atb_hr, settings):
new_gen_df["Max_Cap_MW"] = -1
regional_cost_multipliers = pd.read_csv(
- DATA_PATHS["cost_multipliers"] / "AEO_2020_regional_cost_corrections.csv",
+ DATA_PATHS["cost_multipliers"]
+ / setting... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
2163,
8204,
16,
27,
397,
2163,
8204,
16,
28,
22175,
1652,
622,
70,
67,
2704,
67,
25959,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
967,
6991,
1778,
1544,
628,
1947,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Version bump, readme updates | MODIFY
environment.yml
environment.yml
@@ -5,7 +5,7 @@ channels:
dependencies:
- python>=3.8 # Remove for tox.ini & setup.py
- pip
- - conda-forge::catalystcoop.pudl=0.4
+ - conda-forge::catalystcoop.pudl=0.5
- jupyterlab
- black
- pytest
MODIFY
setup.py
setup.py
@@ -3,7 +3,7 @@ from setuptools import find_packages, ... | [
1,
6720,
12096,
203,
10274,
18,
10865,
203,
10274,
18,
10865,
203,
30989,
300,
25,
16,
27,
397,
25,
16,
27,
22175,
5750,
30,
203,
11037,
30,
203,
17,
5790,
34,
33,
23,
18,
28,
468,
3581,
364,
358,
92,
18,
8767,
473,
3875,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1444,
23559,
16,
24778,
4533,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Update notebook descriptions | MODIFY
notebooks/Existing and new generators.ipynb
notebooks/Existing and new generators.ipynb
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Import settings\n",
- "This assumes that the settings file is set up for multiple scenarios/planning periods. If you are using a settings file with only a single scen... | [
1,
6720,
12096,
203,
7652,
12567,
19,
9895,
471,
394,
13327,
18,
625,
878,
70,
203,
7652,
12567,
19,
9895,
471,
394,
13327,
18,
625,
878,
70,
203,
6,
3855,
67,
723,
6877,
315,
20090,
3113,
203,
6,
4165,
6877,
10615,
203,
6,
3168,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
14718,
15550,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Bug fixes
Wrong sql engine connection
Need to create the open_data folder if it doesn't exist. | MODIFY
powergenome/eia_opendata.py
powergenome/eia_opendata.py
@@ -36,6 +36,7 @@ def load_aeo_series(series_id: str, api_key: str, columns: list = None) -> pd.Da
Data from EIA's AEO via their open data API.
"""
data_dir = DATA_PATHS["eia"] / "open_data"
+ data_dir.mkdir(exist_ok=True)
if not (data_dir / f"{series_id}.c... | [
1,
6720,
12096,
203,
12238,
23220,
19,
73,
1155,
67,
556,
409,
396,
18,
2074,
203,
12238,
23220,
19,
73,
1155,
67,
556,
409,
396,
18,
2074,
203,
30989,
300,
5718,
16,
26,
397,
5718,
16,
27,
22175,
1652,
1262,
67,
69,
4361,
67,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
24436,
203,
13634,
1847,
4073,
1459,
203,
14112,
358,
752,
326,
1696,
67,
892,
3009,
309,
518,
3302,
1404,
1005,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Don't set heat rate of 0 to NaN
Pumped storage has a heat rate of 0. Setting to NaN leads to an
error when clustering. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -2402,9 +2402,13 @@ class GeneratorClusters:
self.prime_mover_hr_map
)
- # Set heat rates < 5 or > 35 mmbtu/MWh to nan
+ # Set heat rates < 5 or > 35 mmbtu/MWh to nan. Don't change heat rates of 0,
+ # which is when there is positive generation and no fuel u... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
3247,
3103,
16,
29,
397,
3247,
3103,
16,
3437,
22175,
667,
10159,
13698,
30,
203,
2890,
18,
16382,
67,
81,
1643,
67,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
22293,
1404,
444,
19347,
4993,
434,
374,
358,
10180,
203,
52,
379,
1845,
2502,
711,
279,
19347,
4993,
434,
374,
18,
13274,
358,
10180,
5871,
87,
358,
392,
203,
1636,
1347,
18743,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Drop rows with all NaN in 860m sheets
EIA added a blank row before the footer comment.
Set default values for sr and sf incase EIA drops headers/footers in the
future. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1414,11 +1414,15 @@ def clean_860m_sheet(
"""
df = eia_860m.parse(sheet_name=sheet_name, na_values=[" "])
+
+ # Find skiprows and skipfooters, which changes across 860m versions.
+ # NEW: drop rows with all NaN because EIA added a blank row before the foote... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
3461,
3461,
16,
2499,
397,
3461,
3461,
16,
3600,
22175,
1652,
2721,
67,
28,
4848,
81,
67,
8118,
12,
203,
8395,
203,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
7544,
2595,
598,
777,
10180,
316,
1725,
4848,
81,
25273,
203,
41,
15188,
3096,
279,
7052,
1027,
1865,
326,
9860,
2879,
18,
203,
694,
805,
924,
364,
9133,
471,
9033,
316,
3593,
512,
15188,
29535,
1607,
19,
10923,
414,
316,
326,
20... |
GenX network file bug fix
CapResExcl calculation was over-complicated. Simplified, should
fix the issue. | MODIFY
powergenome/GenX.py
powergenome/GenX.py
@@ -233,9 +233,7 @@ def add_cap_res_network(tx_df: pd.DataFrame, settings: dict) -> pd.DataFrame:
excl_list = []
for idx, row in tx_df.iterrows():
- if ((row[dest_zone_nums] != 0).all() and len(dest_zone_nums) > 1) or (
- row[dest_zone_nums] == 0
- ).sum() == len(dest_zone... | [
1,
6720,
12096,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
30989,
300,
31026,
16,
29,
397,
31026,
16,
27,
22175,
1652,
527,
67,
5909,
67,
455,
67,
5185,
12,
978,
67,
2180,
30,
4863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
7642,
60,
2483,
585,
7934,
2917,
203,
4664,
607,
424,
830,
11096,
1703,
1879,
17,
832,
20140,
18,
9587,
412,
939,
16,
1410,
203,
904,
326,
5672,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Add PUDL doc image | MODIFY
.gitignore
.gitignore
@@ -117,7 +117,7 @@ data/transformed_data/*
*.code-workspace
# Ignore figures
-*.png
+# *.png
*.pdf
# Ignore notebooks, but not examples
ADD
docs/_static/pudl_version.png
docs/_static/pudl_version.png
Binary files /dev/null and b/docs/_static/pudl_version.png differ
| [
1,
6720,
12096,
203,
18,
6845,
6185,
203,
18,
6845,
6185,
203,
30989,
300,
23454,
16,
27,
397,
23454,
16,
27,
22175,
501,
19,
6547,
329,
67,
892,
20308,
203,
11146,
710,
17,
14915,
203,
7,
8049,
4291,
1823,
203,
17,
11146,
6446,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
20790,
8914,
997,
1316,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Change DG name and add model tags
The name dg_generation doesn't make much sense.
Add as MUST_RUN based on feedback from | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -764,6 +764,7 @@ model_tag_values:
Geothermal: 1
Wood/Wood Waste Biomass: 1
Biomass: 1
+ distributed_generation: 1
# Tags for a technology in a specific region
# Format should be regional_tag_values: <region>: <tag name>: <technology>: <tag val... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
27,
1105,
16,
26,
397,
27,
1105,
16,
27,
22175,
938,
67,
2692,
67,
2372,
30,
203,
18809,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3043,
463,
43,
508,
471,
527,
938,
2342,
203,
1986,
508,
14938,
67,
25514,
3302,
1404,
1221,
9816,
12764,
18,
203,
986,
487,
10685,
67,
15238,
2511,
603,
10762,
628,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Bug fix DG profiles to gen variability df
The function make_generator_variability expected generation profiles to
be numpy arrays but they were saved as lists. Save as arrays, and also
fix the function so it can accept lists and correctly convert them to
arrays. | MODIFY
powergenome/external_data.py
powergenome/external_data.py
@@ -224,6 +224,8 @@ def make_generator_variability(
if remove_feb_29:
return np.delete(x, slice(1416, 1440))
return x
+ if isinstance(x, list):
+ return format_profile(np.array(x), remove_feb_29, hours)
# Fill missing with default [1, ...]
return np.ones(... | [
1,
6720,
12096,
203,
12238,
23220,
19,
9375,
67,
892,
18,
2074,
203,
12238,
23220,
19,
9375,
67,
892,
18,
2074,
203,
30989,
300,
23622,
16,
26,
397,
23622,
16,
28,
22175,
1652,
1221,
67,
8812,
67,
4093,
2967,
12,
203,
430,
1206,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
463,
43,
11788,
358,
3157,
1394,
2967,
3013,
203,
1986,
445,
1221,
67,
8812,
67,
4093,
2967,
2665,
9377,
11788,
358,
203,
2196,
3972,
5352,
1496,
2898,
4591,
5198,
487,
6035,
18,
7074,
487,
5352,
16,
471,
2546,
203,
... |
Update func example to show lists as an input type | MODIFY
powergenome/external_data.py
powergenome/external_data.py
@@ -190,7 +190,7 @@ def make_generator_variability(
Examples
--------
- >>> df = pd.DataFrame({'profile': [np.zeros(8760), np.ones(8784) / 2, None]})
+ >>> df = pd.DataFrame({'profile': [[0] * 8760, np.ones(8784) / 2, None]})
>>> make_generator_variabilit... | [
1,
6720,
12096,
203,
12238,
23220,
19,
9375,
67,
892,
18,
2074,
203,
12238,
23220,
19,
9375,
67,
892,
18,
2074,
203,
30989,
300,
30454,
16,
27,
397,
30454,
16,
27,
22175,
1652,
1221,
67,
8812,
67,
4093,
2967,
12,
203,
23905,
203,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
1326,
3454,
358,
2405,
6035,
487,
392,
810,
618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Bug fix: set default load growth start year
The default year is set to 2019 just above, use the same value here. | MODIFY
powergenome/load_profiles.py
powergenome/load_profiles.py
@@ -7,11 +7,7 @@ from pathlib import Path
import pandas as pd
import numpy as np
-from powergenome.util import (
- regions_to_keep,
- reverse_dict_of_lists,
- remove_feb_29,
-)
+from powergenome.util import regions_to_keep, reverse_dict_of_lists, remove_f... | [
1,
6720,
12096,
203,
12238,
23220,
19,
945,
67,
18314,
18,
2074,
203,
12238,
23220,
19,
945,
67,
18314,
18,
2074,
203,
30989,
300,
27,
16,
2499,
397,
27,
16,
27,
22175,
628,
31440,
1930,
2666,
203,
5666,
12037,
487,
4863,
203,
5666,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
30,
444,
805,
1262,
13334,
451,
787,
3286,
203,
1986,
805,
3286,
353,
444,
358,
30562,
2537,
5721,
16,
999,
326,
1967,
460,
2674,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Add efs flex demand params (commented out) | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -69,6 +69,9 @@ distributed_gen_values:
# Distribution loss used when subtracting distributed generation from total load.
avg_distribution_loss: 0.0453
+
+# electrification_stock_fn: SCENARIO_STOCK.parquet
+# electrification_scenario: current_po... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
8148,
16,
26,
397,
8148,
16,
29,
22175,
16859,
67,
4507,
67,
2372,
30,
203,
7,
17547,
8324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
425,
2556,
16600,
23653,
859,
261,
3469,
329,
596,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Bug fix
Flexible resources weren't being created with other new gens | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -2557,7 +2557,6 @@ class GeneratorClusters:
self.units_model.rename(columns={"technology_description": "technology"})
.query("technology.isin(@techs).values")
.pipe(
-
atb_fixed_var_om_existing,
self.atb_hr,
self.settings,
@@ -2865,7 +2864,9 @@ class Generat... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
10395,
27,
16,
27,
397,
10395,
27,
16,
26,
22175,
667,
10159,
13698,
30,
203,
2890,
18,
7705,
67,
2284,
18,
18539,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
203,
19667,
1523,
2703,
22646,
275,
1404,
3832,
2522,
598,
1308,
394,
314,
773,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Mod EFS example settings
Use stock from NREL EFS rather than Princeton NZA study | MODIFY
example_system_efs/test_settings.yml
example_system_efs/test_settings.yml
@@ -71,8 +71,8 @@ distributed_gen_values:
avg_distribution_loss: 0.0453
-electrification_stock_fn: SCENARIO_STOCK.parquet
-electrification_scenario: current_policy
+electrification_stock_fn: EFS_STOCK_AGG.parquet # SCENARIO_STOCK.parquet
+... | [
1,
6720,
12096,
203,
8236,
67,
4299,
67,
73,
2556,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
67,
73,
2556,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
11212,
16,
28,
397,
11212,
16,
28,
22175,
16859,
67,
4507,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1739,
512,
4931,
3454,
1947,
203,
3727,
12480,
628,
423,
15868,
512,
4931,
9178,
2353,
2301,
9523,
278,
265,
423,
62,
37,
17078,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Strongly recommend using mamba for env creation | MODIFY
README.md
README.md
@@ -52,12 +52,18 @@ Either way, you will need to download the new database files in steps 5/6 below
1. Clone this repository to your local machine and navigate to the top level (PowerGenome) folder.
-2. Create a conda environment named `powergenome` using the provided `environment.yml` file. ... | [
1,
6720,
12096,
203,
6949,
958,
18,
1264,
203,
6949,
958,
18,
1264,
203,
30989,
300,
9401,
16,
2138,
397,
9401,
16,
2643,
22175,
14635,
4031,
16,
1846,
903,
1608,
358,
4224,
326,
394,
2063,
1390,
316,
6075,
1381,
19,
26,
5712,
203,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1585,
932,
715,
22867,
1450,
312,
2536,
69,
364,
1550,
6710,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Fix find_newest_860m bug
EIA changed their HTML format slightly. Changed the table class in bs4 to fix.
Now raising an error when the table of file names can't be found by scraping.
Also discovered that the lxml library was no longer installed as a
dependency. Added lxml to the environment file to fix. | MODIFY
environment.yml
environment.yml
@@ -11,6 +11,7 @@ dependencies:
- pytest
- requests
- beautifulsoup4
+ - lxml
- pyyaml
- conda-forge::pre-commit
- isort
MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1402,7 +1402,13 @@ def find_newest_860m() -> str:
site_url = "https://www.eia.gov/electricity/d... | [
1,
6720,
12096,
203,
10274,
18,
10865,
203,
10274,
18,
10865,
203,
30989,
300,
2499,
16,
26,
397,
2499,
16,
27,
22175,
5030,
30,
203,
17,
2395,
3813,
203,
17,
3285,
203,
17,
506,
25432,
2048,
416,
24,
203,
15,
300,
328,
2902,
203,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
1104,
67,
2704,
395,
67,
28,
4848,
81,
7934,
203,
41,
15188,
3550,
3675,
3982,
740,
21980,
18,
27707,
326,
1014,
667,
316,
7081,
24,
358,
2917,
18,
203,
8674,
28014,
392,
555,
1347,
326,
1014,
434,
585,
1257,
848,
1404,
5... |
Initial commit of GH action file | ADD
.github/workflows/python-package-mamba.yml
+name: Python Package using mamba
+
+on: [push]
+
+jobs:
+ build-linux:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ shell: bash
+ strategy:
+ max-parallel: 5
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v2
+ with:
+ ... | [
1,
8355,
203,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
15,
529,
30,
6600,
7508,
1450,
312,
2536,
69,
203,
15,
203,
15,
265,
30,
306,
6206,
65,
203,
15,
203,
15,
10088,
30,
203,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
4435,
3294,
434,
611,
44,
1301,
585,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Fix pip install PG error | MODIFY
.github/workflows/python-package-mamba.yml
.github/workflows/python-package-mamba.yml
@@ -29,7 +29,7 @@ jobs:
mamba env update --file environment.yml --name base
- name: install powergenome
run: |
- pip install . -e
+ pip install -e .
- name: Lint with flake8
run: |
conda install flake8
| [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
30989,
300,
5540,
16,
27,
397,
5540,
16,
27,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
8341,
3799,
22116,
555,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Use test settings for 860m test
Needed additional parameters like "proposed_status_included". | MODIFY
tests/generation_test.py
tests/generation_test.py
@@ -183,6 +183,7 @@ def test_unit_generator_heat_rates(data_years=[2016, 2017]):
)
-def test_load_860m():
- eia_860m = load_860m({"eia_860m_fn": None})
- eia_860m = load_860m({"eia_860m_fn": "september_generator2021.xlsx"})
+def test_load_860m(test_settings):
+ e... | [
1,
6720,
12096,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
30989,
300,
31672,
16,
26,
397,
31672,
16,
27,
22175,
1652,
1842,
67,
4873,
67,
8812,
67,
580,
270,
67,
24285,
12,
892,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3727,
1842,
1947,
364,
1725,
4848,
81,
1842,
203,
11449,
3312,
1472,
3007,
315,
685,
7423,
67,
2327,
67,
20405,
9654,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Use mamba install instead of conda | MODIFY
.github/workflows/python-package-mamba.yml
.github/workflows/python-package-mamba.yml
@@ -32,12 +32,12 @@ jobs:
pip install -e .
- name: Lint with flake8
run: |
- conda install flake8
+ mamba install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
30989,
300,
1578,
16,
2138,
397,
1578,
16,
2138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3727,
312,
2536,
69,
3799,
3560,
434,
356,
2414,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Replace zipped sqlite with smaller version
Couldn't get a working version of the file to unzip within the test script. | RENAME
tests/data/pg_misc_tables.sqlite.zip
tests/data/pg_misc_tables.sqlite3
Binary files a/tests/data/pg_misc_tables.sqlite.zip and b/tests/data/pg_misc_tables.sqlite3 differ
MODIFY
tests/generation_test.py
tests/generation_test.py
@@ -33,7 +33,7 @@ logger.addHandler(handler)
PUDL_DB_CONN = sqlite3.connect(DATA_PAT... | [
1,
862,
1985,
203,
16341,
19,
892,
19,
8365,
67,
23667,
67,
9373,
18,
19460,
18,
4450,
203,
16341,
19,
892,
19,
8365,
67,
23667,
67,
9373,
18,
19460,
23,
203,
5905,
1390,
279,
19,
16341,
19,
892,
19,
8365,
67,
23667,
67,
9373,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
5729,
3144,
1845,
16184,
598,
10648,
1177,
203,
16342,
1404,
336,
279,
5960,
1177,
434,
326,
585,
358,
20259,
3470,
326,
1842,
2728,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Test load curve creation and api key in env | MODIFY
.github/workflows/python-package-mamba.yml
.github/workflows/python-package-mamba.yml
@@ -38,6 +38,8 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
+ env:
+ EIA_AP... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
30989,
300,
7414,
16,
26,
397,
7414,
16,
28,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
4709,
1262,
8882,
6710,
471,
1536,
498,
316,
1550,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Don't fail check settings if some params are missing | MODIFY
powergenome/util.py
powergenome/util.py
@@ -50,11 +50,13 @@ def check_settings(settings: dict, pg_engine: sa.engine) -> None:
].to_list()
cost_mult_regions = list(
- itertools.chain.from_iterable(settings["cost_multiplier_region_map"].values())
+ itertools.chain.from_iterable(
+ settings.get("cost_multiplier_reg... | [
1,
6720,
12096,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
30989,
300,
3361,
16,
2499,
397,
3361,
16,
3437,
22175,
1652,
866,
67,
4272,
12,
4272,
30,
2065,
16,
7184,
67,
8944,
30,
7864,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
22293,
1404,
2321,
866,
1947,
309,
2690,
859,
854,
3315,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Bug fix when tx expansion is 0 | MODIFY
powergenome/GenX.py
powergenome/GenX.py
@@ -535,7 +535,7 @@ def network_max_reinforcement(
max_expansion = settings.get("tx_expansion_per_period")
- if not max_expansion:
+ if not max_expansion and max_expansion != 0:
raise KeyError(
"No value for the transmission expansion allowed in this model period is "
"inc... | [
1,
6720,
12096,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
12238,
23220,
19,
7642,
60,
18,
2074,
203,
30989,
300,
25,
4763,
16,
27,
397,
25,
4763,
16,
27,
22175,
1652,
2483,
67,
1896,
67,
266,
267,
5734,
475,
12,
203,
1896,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
1347,
2229,
17965,
353,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Fix model tags in ISONE example | MODIFY
example_system_ISONE/test_settings.yml
example_system_ISONE/test_settings.yml
@@ -322,6 +322,7 @@ model_tag_names:
- STOR
- FLEX
- HYDRO
+ - LDS
- Commit
- ESR_1
- ESR_2
@@ -366,6 +367,7 @@ model_tag_values:
LandbasedWind: 1
OffshoreWind: 1
Onshore Wind: 1
+ Offshore Wind: 1
Solar Photovoltaic: 1
Solar Thermal w... | [
1,
6720,
12096,
203,
8236,
67,
4299,
67,
45,
1413,
41,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
67,
45,
1413,
41,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
1578,
22,
16,
26,
397,
1578,
22,
16,
27,
22175,
938,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
938,
2342,
316,
467,
1413,
41,
3454,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Add more eia:atb tech mappings | MODIFY
example_system/test_settings.yml
example_system/test_settings.yml
@@ -859,6 +859,12 @@ eia_atb_tech_map:
Natural Gas Fired Combined Cycle: NaturalGas_CCAvgCF #[NaturalGas_CCAvgCF, NETL_NGCC]
Natural Gas Fired Combustion Turbine: NaturalGas_CTAvgCF
Peaker: NaturalGas_CTAvgCF
+ Natural Gas Internal Combustion Engi... | [
1,
6720,
12096,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
28,
6162,
16,
26,
397,
28,
6162,
16,
2138,
22175,
425,
1155,
67,
270,
70,
67,
28012,
67,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
1898,
425,
1155,
30,
270,
70,
13878,
7990,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Add region maps for wiki | MODIFY
.gitignore
.gitignore
@@ -117,7 +117,7 @@ data/transformed_data/*
*.code-workspace
# Ignore figures
-*.png
+# *.png
*.pdf
# Ignore notebooks, but not examples
ADD
docs/_static/census_divisions.png
docs/_static/census_divisions.png
Binary files /dev/null and b/docs/_static/census_divisions.png differ
ADD
docs... | [
1,
6720,
12096,
203,
18,
6845,
6185,
203,
18,
6845,
6185,
203,
30989,
300,
23454,
16,
27,
397,
23454,
16,
27,
22175,
501,
19,
6547,
329,
67,
892,
20308,
203,
11146,
710,
17,
14915,
203,
7,
8049,
4291,
1823,
203,
17,
11146,
6446,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
3020,
7565,
364,
9050,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Bug fix parameter name | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1613,7 +1613,7 @@ def import_new_generators(
new_operating = group_technologies(
new_operating,
settings["group_technologies"],
- settings.get("tech_group", {}) or {},
+ settings.get("tech_groups", {}) or {},
settings.get("regional_no_grouping", {}) or {},
... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
2313,
3437,
16,
27,
397,
2313,
3437,
16,
27,
22175,
1652,
1930,
67,
2704,
67,
25959,
12,
203,
2704,
67,
4063,
1776,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
1569,
508,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Change GH action name, add on PR | RENAME
.github/workflows/python-package-mamba.yml
.github/workflows/pytest.yml
-name: Python Package using mamba
+name: pytest
-on: [push]
+on: [push, pull_request]
jobs:
build-linux:
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Set up Python 3.10
+ - name: Set up Python 3.9
uses: actions/setup-... | [
1,
862,
1985,
203,
18,
6662,
19,
13815,
87,
19,
8103,
17,
5610,
17,
81,
2536,
69,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
17,
529,
30,
6600,
7508,
1450,
312,
2536,
69,
203,
15,
529,
30,
2395,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3043,
611,
44,
1301,
508,
16,
527,
603,
11770,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Add codecov and python version matrix | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -10,6 +10,8 @@ jobs:
shell: bash
strategy:
max-parallel: 5
+ matrix:
+ python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
@@ -41,5 +43,7 @@ jobs:
env:
EIA_API_KEY: ${{ secrets.EIA_API_KEY }}
run: |
- mamba install pytest
- pytest... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
2163,
16,
26,
397,
2163,
16,
28,
22175,
6550,
30,
203,
10304,
30,
24817,
203,
14914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
9196,
1527,
471,
5790,
1177,
3148,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Change cov report to xml format | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -44,6 +44,6 @@ jobs:
EIA_API_KEY: ${{ secrets.EIA_API_KEY }}
run: |
pip install pytest-cov
- pytest --cov=powergenome tests/
+ pytest --cov=powergenome tests/ --cov-report=xml
- name: Upload test coverage report to CodeCov
uses: codecov/codecov-action@... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
6334,
16,
26,
397,
6334,
16,
26,
22175,
6550,
30,
203,
41,
15188,
67,
2557,
67,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3043,
10613,
2605,
358,
2025,
740,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Add pytest and codecov badges | MODIFY
README.md
README.md
[](https://www.repostatus.org/#active)
[](https://github.com/psf/black)
[![DOI]... | [
1,
6720,
12096,
203,
6949,
958,
18,
1264,
203,
6949,
958,
18,
1264,
203,
63,
5,
63,
1986,
1984,
711,
8675,
279,
14114,
16,
15603,
919,
471,
353,
3832,
1328,
4492,
17196,
329,
18,
29955,
4528,
2207,
5591,
18,
266,
2767,
996,
18,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
2395,
3813,
471,
9196,
1527,
5570,
2852,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Don't check atb scenarios if no data year | MODIFY
powergenome/util.py
powergenome/util.py
@@ -114,6 +114,7 @@ def check_settings(settings: dict, pg_engine: sa.engine) -> None:
pg_engine : sa.engine
Connection to the PG sqlite database.
"""
+ if settings.get("atb_data_year"):
check_atb_scenario(settings, pg_engine)
ipm_region_list = pd.read_sql_table("regions_en... | [
1,
6720,
12096,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
12238,
23220,
19,
1367,
18,
2074,
203,
30989,
300,
22214,
16,
26,
397,
22214,
16,
27,
22175,
1652,
866,
67,
4272,
12,
4272,
30,
2065,
16,
7184,
67,
8944,
30,
7864,
18,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
22293,
1404,
866,
622,
70,
22456,
309,
1158,
501,
3286,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Minor example settings fixes | MODIFY
example_systems/CA_AZ/test_settings.yml
example_systems/CA_AZ/test_settings.yml
@@ -66,6 +66,9 @@ distributed_gen_values:
CA_N: 9788
CA_S: 12618
+# Set this parameter to "true" if existing distributed generation in each region should
+# be represented as a resource rather than being subtracted from demand.
+dg_a... | [
1,
6720,
12096,
203,
8236,
67,
4299,
87,
19,
3587,
67,
26315,
19,
3813,
67,
4272,
18,
10865,
203,
8236,
67,
4299,
87,
19,
3587,
67,
26315,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
6028,
16,
26,
397,
6028,
16,
29,
22175,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19549,
3454,
1947,
24436,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Add description of settings parameters | MODIFY
example_systems/settings_documentation.md
example_systems/settings_documentation.md
@@ -28,6 +28,19 @@ description: A dictionary with list values, used to aggregate IPM regions into g
- `alt_growth_rate`
- `aeo_fuel_region_map`
+### regional_capacity_reserves
+
+type: Dict[str, Dict[str, float]]
+
+description: ... | [
1,
6720,
12096,
203,
8236,
67,
4299,
87,
19,
4272,
67,
26941,
18,
1264,
203,
8236,
67,
4299,
87,
19,
4272,
67,
26941,
18,
1264,
203,
30989,
300,
6030,
16,
26,
397,
6030,
16,
3657,
22175,
2477,
30,
432,
3880,
598,
666,
924,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
2477,
434,
1947,
1472,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Fix bug when no subregions | MODIFY
powergenome/resource_clusters.py
powergenome/resource_clusters.py
@@ -591,9 +591,12 @@ class ResourceGroup:
raise ValueError(f"No resources found or selected")
if tree:
# Only keep trees with one ore more base resources
+ if isinstance(tree, list):
df["tree"] = ""
for t in tree:
df["tree"] += df[t].astype(str)
+... | [
1,
6720,
12096,
203,
12238,
23220,
19,
3146,
67,
16806,
18,
2074,
203,
12238,
23220,
19,
3146,
67,
16806,
18,
2074,
203,
30989,
300,
6162,
21,
16,
29,
397,
6162,
21,
16,
2138,
22175,
667,
2591,
1114,
30,
203,
11628,
2068,
12,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
7934,
1347,
1158,
720,
15923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Add zenodo author documentation | ADD
.zenodo.json
+{
+ "creators": [
+ {
+ "affiliation": "Carbon Impact Consulting",
+ "name": "Greg Schivley",
+ "orcid": "0000-0002-8947-694X"
+ },
+ {
+ "name": "Ethan Welty",
+ "orcid": "0000-0001-8046-2210"
+ },
+ {
+ "name": "Neha Patankar",
+ "affiliation": "Princeton University",
+ "orcid": "0000-0001-7288-039... | [
1,
8355,
203,
203,
18,
8396,
7370,
18,
1977,
203,
15,
95,
203,
15,
315,
1793,
3062,
6877,
306,
203,
15,
288,
203,
15,
315,
7329,
16278,
6877,
315,
39,
11801,
9457,
621,
11020,
406,
310,
3113,
203,
15,
315,
529,
6877,
315,
43,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
22759,
7370,
2869,
7323,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Make logger more obvious for starting new cases | MODIFY
powergenome/run_powergenome_multiple_outputs_cli.py
powergenome/run_powergenome_multiple_outputs_cli.py
@@ -251,7 +251,7 @@ def main():
existing_gens = gc.existing_resources.copy()
logger.info(
- f"Finished first round with year {year} scenario {case_id}"
+ f"\nFinished first round with year {year} scenario {cas... | [
1,
6720,
12096,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
12238,
23220,
19,
2681,
67,
12238,
23220,
67,
9622,
67,
12295,
67,
4857,
18,
2074,
203,
30989,
300,
2947,
21,
16,
27,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
6464,
1194,
1898,
28067,
364,
5023,
394,
6088,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Add Aneesha to zenodo author list | MODIFY
.zenodo.json
.zenodo.json
"affiliation": "Princeton University",
"orcid": "0000-0003-2692-5135"
},
+ {
+ "name": "Aneesha Manocha",
+ "affiliation": "Princeton University"
+ },
{
"name": "Jesse D. Jenkins",
"affiliation": "Princeton University",
| [
1,
6720,
12096,
203,
18,
8396,
7370,
18,
1977,
203,
18,
8396,
7370,
18,
1977,
203,
6,
7329,
16278,
6877,
315,
2050,
9523,
278,
265,
1351,
6760,
560,
3113,
203,
6,
280,
13478,
6877,
315,
2787,
17,
30770,
17,
5558,
9975,
17,
25,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
1922,
25521,
3395,
358,
22759,
7370,
2869,
666,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Don't always supplement with 860m data
Especially in testing, I don't want to add all 860m gens that aren't in the database | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -2309,6 +2309,7 @@ class GeneratorClusters:
pg_engine,
settings,
current_gens=True,
+ supplement_with_860m=True,
sort_gens=False,
plant_region_map_table="plant_region_map_epaipm",
settings_agg_key="region_aggregations",
@@ -2332,6 +2333,7 @@ class GeneratorC... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
4366,
5908,
16,
26,
397,
4366,
5908,
16,
27,
22175,
667,
10159,
13698,
30,
203,
8365,
67,
8944,
16,
203,
4272,
16,
203,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
22293,
1404,
3712,
1169,
4330,
598,
1725,
4848,
81,
501,
203,
41,
2793,
6261,
316,
7769,
16,
467,
2727,
1404,
2545,
358,
527,
777,
1725,
4848,
81,
314,
773,
716,
11526,
1404,
316,
326,
2063,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
Don't break when age is missing | MODIFY
powergenome/nrelatb.py
powergenome/nrelatb.py
@@ -594,7 +594,9 @@ def atb_fixed_var_om_existing(
plant_capacity = _df[settings["capacity_col"]].sum()
age = settings["model_year"] - _df.operating_date.dt.year
+ try:
age = age.fillna(age.mean())
+ except:
age = age.fillna(40)
gen_ids = _df["generator_id"].to_list(... | [
1,
6720,
12096,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
12238,
23220,
19,
82,
2878,
270,
70,
18,
2074,
203,
30989,
300,
6162,
24,
16,
27,
397,
6162,
24,
16,
29,
22175,
1652,
622,
70,
67,
12429,
67,
1401,
67,
362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
22293,
1404,
898,
1347,
9388,
353,
3315,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Add env vars pointing to data | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -43,6 +43,9 @@ jobs:
env:
EIA_API_KEY: ${{ secrets.EIA_API_KEY }}
run: |
+ echo "RESOURCE_GROUPS=./tests/data/resource_groups_base" >> $GITHUB_ENV
+ echo "PUDL_DB=sqlite://///tests/data/pudl_test_data.db" >> $GITHUB_ENV
+ echo "PG_DB=sqlite://///tests/... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
8942,
16,
26,
397,
8942,
16,
29,
22175,
6550,
30,
203,
3074,
30,
203,
41,
15188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
986,
1550,
4153,
17022,
358,
501,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Try using pdb to debug | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -47,6 +47,6 @@ jobs:
echo "PUDL_DB=sqlite://///tests/data/pudl_test_data.db" >> $GITHUB_ENV
echo "PG_DB=sqlite://///tests/data/pg_misc_tables.sqlite3" >> $GITHUB_ENV
pip install pytest-cov
- pytest --cov=powergenome tests/ --cov-report=xml
+ pytest --c... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
9462,
16,
26,
397,
9462,
16,
26,
22175,
6550,
30,
203,
12946,
315,
18061,
8914,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
7833,
1450,
10892,
358,
1198,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Make .env file for testing. | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -39,14 +39,19 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
5520,
16,
3461,
397,
5520,
16,
3657,
22175,
6550,
30,
203,
30451,
28,
263,
1493,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
6464,
263,
3074,
585,
364,
7769,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
See if a path is being sent to RG | MODIFY
powergenome/resource_clusters.py
powergenome/resource_clusters.py
@@ -694,7 +694,7 @@ class ClusterBuilder:
"""
paths = list(paths)
if not paths:
- raise ValueError(f"No resource groups specified")
+ raise ValueError(f"No resource groups specified {paths}")
return cls([ResourceGroup.from_json(path) for path in p... | [
1,
6720,
12096,
203,
12238,
23220,
19,
3146,
67,
16806,
18,
2074,
203,
12238,
23220,
19,
3146,
67,
16806,
18,
2074,
203,
30989,
300,
8148,
24,
16,
27,
397,
8148,
24,
16,
27,
22175,
667,
5584,
1263,
30,
203,
8395,
203,
4481,
273,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
9704,
309,
279,
589,
353,
3832,
3271,
358,
534,
43,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Directly set env variables | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -39,17 +39,20 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
5520,
16,
4033,
397,
5520,
16,
3462,
22175,
6550,
30,
203,
30451,
28,
263,
1493,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
5368,
715,
444,
1550,
3152,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Remove Python 3.8 from testing matrix | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -11,7 +11,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
- python-version: ["3.8", "3.9", "3.10"]
+ python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
| [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
2499,
16,
27,
397,
2499,
16,
27,
22175,
6550,
30,
203,
14914,
30,
203,
1896,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3288,
6600,
890,
18,
28,
628,
7769,
3148,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Remove env vars from GH action file
Try using them as repo secrets instead | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -39,20 +39,9 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
5520,
16,
3462,
397,
5520,
16,
29,
22175,
6550,
30,
203,
30451,
28,
263,
1493,
1883... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
3288,
1550,
4153,
628,
611,
44,
1301,
585,
203,
7833,
1450,
2182,
487,
3538,
14612,
3560,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Actually set env vars from GH secrets | MODIFY
.github/workflows/pytest.yml
.github/workflows/pytest.yml
@@ -42,6 +42,9 @@ jobs:
- name: Test with pytest
env:
EIA_API_KEY: ${{ secrets.EIA_API_KEY }}
+ RESOURCE_GROUPS: ${{ secrets.RESOURCE_GROUPS }}
+ PUDL_DB: ${{ secrets.PUDL_DB }}
+ PG_DB: ${{ secrets.PG_DB }}
run: |
pip install pytest-cov
pytest --cov=powe... | [
1,
6720,
12096,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
18,
6662,
19,
13815,
87,
19,
2074,
3813,
18,
10865,
203,
30989,
300,
9452,
16,
26,
397,
9452,
16,
29,
22175,
6550,
30,
203,
17,
508,
30,
7766,
598,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
2459,
3452,
444,
1550,
4153,
628,
611,
44,
14612,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Mod gen/region CF test | MODIFY
tests/generation_test.py
tests/generation_test.py
@@ -263,12 +263,18 @@ def test_check_settings(test_settings):
def test_gentype_region_capacity_factor(plant_region_map_ipm_data, test_settings):
+ cf_techs = test_settings["capacity_factor_techs"]
+ plant_region_map_ipm_data = plant_region_map_ipm_data.rename(
+ ... | [
1,
6720,
12096,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
30989,
300,
22,
4449,
16,
2138,
397,
22,
4449,
16,
2643,
22175,
1652,
1842,
67,
1893,
67,
4272,
12,
3813,
67,
4272,
4672,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1739,
3157,
19,
6858,
6123,
1842,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Update test settings to pass tests | MODIFY
tests/data/test_settings.yml
tests/data/test_settings.yml
@@ -116,10 +116,19 @@ alt_clusters:
Natural Gas Fired Combined Cycle: 2
Natural Gas Fired Combustion Turbine: 2
+
+# CAPACITY FACTOR
+# Calculate the capacity factor of technology types listed here. If derate_capacity is
+# True, multiply the calculated c... | [
1,
6720,
12096,
203,
16341,
19,
892,
19,
3813,
67,
4272,
18,
10865,
203,
16341,
19,
892,
19,
3813,
67,
4272,
18,
10865,
203,
30989,
300,
20562,
16,
2163,
397,
20562,
16,
3657,
22175,
3770,
67,
16806,
30,
203,
23779,
3766,
31849,
478... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1891,
1842,
1947,
358,
1342,
7434,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Address warning about collections ABC | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -3021,7 +3021,7 @@ class GeneratorClusters:
self.all_resources = self.all_resources.reset_index(drop=True)
self.all_resources["variable_CF"] = 0.0
for i, p in enumerate(self.all_resources["profile"]):
- if isinstance(p, (collections.Sequence, np.ndarray)):
+... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
23,
3103,
21,
16,
27,
397,
23,
3103,
21,
16,
27,
22175,
667,
10159,
13698,
30,
203,
2890,
18,
454,
67,
4683,
273,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
1887,
3436,
2973,
6980,
29253,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Set resource group location in settings file | MODIFY
tests/generation_test.py
tests/generation_test.py
@@ -129,6 +129,7 @@ def plant_region_map_ipm_data():
@pytest.fixture(scope="module")
def test_settings():
settings = load_settings(DATA_PATHS["test_data"] / "test_settings.yml")
+ settings["RESOURCE_GROUPS"] = DATA_PATHS["test_data"] / "resource_groups_base"
retu... | [
1,
6720,
12096,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
30989,
300,
24886,
16,
26,
397,
24886,
16,
27,
22175,
1652,
886,
970,
67,
6858,
67,
1458,
67,
625,
81,
67,
892,
13332,
203,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
694,
1058,
1041,
2117,
316,
1947,
585,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Bug fix when tech name missing in 860m
"plant_id_eia" is part of the index, not a column. | MODIFY
powergenome/generators.py
powergenome/generators.py
@@ -1633,9 +1633,11 @@ def import_new_generators(
new_operating.loc[new_operating["technology_description"].isnull(), :].empty
is False
):
- plant_ids = new_operating.loc[
- new_operating["technology_description"].isnull(), "plant_id_eia"
- ].to_list()
+ plant_... | [
1,
6720,
12096,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
12238,
23220,
19,
25959,
18,
2074,
203,
30989,
300,
2313,
3707,
16,
29,
397,
2313,
3707,
16,
2499,
22175,
1652,
1930,
67,
2704,
67,
25959,
12,
203,
2704,
67,
4063,
1776,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19865,
2917,
1347,
13878,
508,
3315,
316,
1725,
4848,
81,
203,
6,
412,
970,
67,
350,
67,
73,
1155,
6,
353,
1087,
434,
326,
770,
16,
486,
279,
1057,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Minor version bump for bug fix | MODIFY
setup.py
setup.py
@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
setup(
name="powergenome",
packages=find_packages(),
- version="0.5.0",
+ version="0.5.1",
description="Extract PUDL data for use in power system models",
author="Greg Schivley",
entry_points={
| [
1,
6720,
12096,
203,
8401,
18,
2074,
203,
8401,
18,
2074,
203,
30989,
300,
23,
16,
27,
397,
23,
16,
27,
22175,
628,
444,
30693,
1930,
1104,
67,
10308,
16,
3875,
203,
8401,
12,
203,
529,
1546,
12238,
23220,
3113,
203,
10308,
33,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
19549,
1177,
23559,
364,
7934,
2917,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Hit more options when creating load profiles | MODIFY
tests/generation_test.py
tests/generation_test.py
@@ -328,6 +328,12 @@ def test_gen_integration(CA_AZ_settings, tmp_path):
time_series_mapping,
) = reduce_time_domain(gen_variability, load, gc.settings)
+ gc.settings["distributed_gen_method"]["CA_N"] = "fraction_load"
+ gc.settings["distributed_gen_values"][2030... | [
1,
6720,
12096,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
16341,
19,
25514,
67,
3813,
18,
2074,
203,
30989,
300,
1578,
28,
16,
26,
397,
1578,
28,
16,
2138,
22175,
1652,
1842,
67,
4507,
67,
27667,
12,
3587,
67,
26315,
67,
427... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
13616,
1898,
702,
1347,
4979,
1262,
11788,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.