-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add functionality to load Grid objects with HIFLD grid model #566
Merged
+502
−83
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
_exports = [ | ||
"all_resources", | ||
"carbon_per_mmbtu", | ||
"carbon_per_mwh", | ||
"carbon_resources", | ||
"clean_resources", | ||
"label2type", | ||
"nox_per_mwh", | ||
"renewable_resources", | ||
"so2_per_mwh", | ||
"type2color", | ||
"type2hatchcolor", | ||
"type2label", | ||
] | ||
|
||
type2color = { | ||
"wind": "xkcd:green", | ||
"solar": "xkcd:amber", | ||
"hydro": "xkcd:light blue", | ||
"ng": "xkcd:orchid", | ||
"nuclear": "xkcd:silver", | ||
"coal": "xkcd:light brown", | ||
"geothermal": "xkcd:hot pink", | ||
"dfo": "xkcd:royal blue", | ||
"biomass": "xkcd:dark green", | ||
"other": "xkcd:melon", | ||
"storage": "xkcd:orange", | ||
"wind_offshore": "xkcd:teal", | ||
"solar_curtailment": "xkcd:amber", | ||
"wind_curtailment": "xkcd:green", | ||
"wind_offshore_curtailment": "xkcd:teal", | ||
} | ||
|
||
type2label = { | ||
"nuclear": "Nuclear", | ||
"geothermal": "Geo-thermal", | ||
"coal": "Coal", | ||
"dfo": "DFO", | ||
"hydro": "Hydro", | ||
"ng": "Natural Gas", | ||
"solar": "Solar", | ||
"wind": "Wind", | ||
"wind_offshore": "Wind Offshore", | ||
"biomass": "Biomass", | ||
"other": "Other", | ||
"storage": "Storage", | ||
"solar_curtailment": "Solar Curtailment", | ||
"wind_curtailment": "Wind Curtailment", | ||
"wind_offshore_curtailment": "Offshore Wind Curtailment", | ||
} | ||
|
||
type2hatchcolor = { | ||
"solar_curtailment": "xkcd:grey", | ||
"wind_curtailment": "xkcd:grey", | ||
"wind_offshore_curtailment": "xkcd:grey", | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here curtailment is not a generator type |
||
|
||
label2type = {value: key for key, value in type2label.items()} | ||
|
||
renewable_resources = {"solar", "wind", "wind_offshore"} | ||
carbon_resources = {"coal", "ng", "dfo"} | ||
clean_resources = renewable_resources | {"geothermal", "hydro", "nuclear"} | ||
all_resources = carbon_resources | {"other"} | clean_resources | ||
|
||
|
||
# MWh to kilograms of CO2 | ||
# Source: IPCC Special Report on Renewable Energy Sources and Climate Change | ||
# Mitigation (2011), Annex II: Methodology, Table A.II.4, 50th percentile | ||
# http://www.ipcc-wg3.de/report/IPCC_SRREN_Annex_II.pdf | ||
carbon_per_mwh = { | ||
"coal": 1001, | ||
"dfo": 840, | ||
"ng": 469, | ||
} | ||
|
||
# MMBTu of fuel per hour to kilograms of CO2 per hour | ||
# Source: https://www.epa.gov/energy/greenhouse-gases-equivalencies-calculator-calculations-and-references | ||
# = (Heat rate MMBTu/h) * (kg C/mmbtu) * (mass ratio CO2/C) | ||
carbon_per_mmbtu = { | ||
"coal": 26.05, | ||
"dfo": 20.31, | ||
"ng": 14.46, | ||
} | ||
|
||
# MWh to kilograms of NOx | ||
# Source: EPA eGrid 2018, tab 'US18' (U.S. summary), columns AN to AP | ||
# https://www.epa.gov/egrid/egrid-questions-and-answers | ||
nox_per_mwh = { | ||
"coal": 0.658, | ||
"dfo": 1.537, | ||
"ng": 0.179, | ||
} | ||
|
||
# MWh to kilograms of SO2 | ||
# Source: EPA eGrid 2018, tab 'US18' (U.S. summary), columns AV to AX | ||
# https://www.epa.gov/egrid/egrid-questions-and-answers | ||
so2_per_mwh = { | ||
"coal": 0.965, | ||
"dfo": 2.189, | ||
"ng": 0.010, | ||
} | ||
|
||
|
||
def __dir__(): | ||
return sorted(_exports) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
_exports = ["defaults"] | ||
|
||
defaults = { | ||
"duration": 4, | ||
"min_stor": 0.05, | ||
"max_stor": 0.95, | ||
"InEff": 0.9, | ||
"OutEff": 0.9, | ||
"energy_value": 20, | ||
"LossFactor": 0, | ||
"terminal_min": 0, | ||
"terminal_max": 1, | ||
} | ||
|
||
|
||
def __dir__(): | ||
return sorted(_exports) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that PostREISE plotting functions rely on this dictionary and it is convenient to group generator type and curtailment but it is ugly. Curtailment color label/color should be moved in a dedicated dictionary. This completely out of the scope of this PR.