Skip to content
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

Cambium Grid Climate Emissions and Updated AVERT #235

Merged
merged 76 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
5744ba1
start descriptions
adfarth Jun 23, 2023
b821ea9
some initial changes
adfarth Jun 29, 2023
14cba62
initial commit for cambium integration
adfarth Jul 5, 2023
9388d7d
include off_grid_flag in ElectricUtility call when true
adfarth Jul 5, 2023
7bef890
include other struct inputs to ElectricUtility when key not provided
adfarth Jul 5, 2023
e3ac9ff
pass include_health_in_obj to Financial when key not provided
adfarth Jul 6, 2023
40e58d0
update default projected emissions decrease
adfarth Jul 6, 2023
cb2470b
remove grid emissions from Site key for BAU runs
adfarth Jul 6, 2023
2b054fb
combine AVERT functions, align emissions with load year
adfarth Jul 11, 2023
8b69e81
add cambium emissions region as output
adfarth Jul 13, 2023
cd3a60e
update help text
adfarth Jul 14, 2023
08af697
make grid_level an input
adfarth Jul 18, 2023
d341165
add auto adjust for emissions series if 8760 and ts > 1
adfarth Jul 18, 2023
cd7a519
Update electric_utility.jl
adfarth Jul 18, 2023
9e6f97b
update tests with co2_from_avert = true
adfarth Jul 19, 2023
1b9812f
add cambium_emissions_profile to REopt exports
adfarth Jul 19, 2023
79cfc21
Update runtests.jl
adfarth Jul 19, 2023
cbad810
Merge branch 'develop' into cambium
adfarth Jul 19, 2023
81ed59a
Merge branch 'develop' into cambium
adfarth Jul 21, 2023
c584dfa
Merge branch 'develop' into cambium
adfarth Jul 21, 2023
819d498
update tests and scenario.jl
adfarth Jul 25, 2023
1bce45d
set emissions to zero for areas outside of AVERT
adfarth Jul 25, 2023
e9f20d6
zero emissions for international
adfarth Jul 25, 2023
4bd8190
temporary avoiding Cambium API call
adfarth Jul 27, 2023
2b58410
temporary avoiding of Cambium call
adfarth Jul 27, 2023
49d577c
Update electric_utility.jl
adfarth Aug 3, 2023
80090de
account for HI and AK
adfarth Aug 10, 2023
7c105a8
Merge branch 'develop' into cambium
adfarth Aug 10, 2023
a297a63
add comma
adfarth Aug 15, 2023
c4314aa
Update electric_utility.jl
adfarth Aug 16, 2023
8192e3f
add help text to allow_simultaneous_export
adfarth Aug 17, 2023
d96c42d
Merge branch 'develop' into cambium
adfarth Aug 22, 2023
0216621
Merge branch 'develop' into cambium
adfarth Sep 7, 2023
5f07394
Merge branch 'develop' into cambium
adfarth Sep 26, 2023
1f27cce
update Cambium API call with GET
adfarth Sep 26, 2023
d75e8b2
Merge branch 'develop' into cambium
adfarth Oct 2, 2023
5919f06
Update default emissions_factor_CO2_decrease_fraction
adfarth Oct 2, 2023
768d90b
screen for off-grid and update day of week alignment
adfarth Oct 3, 2023
58aace0
add test to test_with_xpress
adfarth Oct 3, 2023
bfa13b1
update tests
adfarth Oct 3, 2023
cd69445
Update test_with_xpress.jl
adfarth Oct 3, 2023
5de415a
some help text
adfarth Oct 12, 2023
8354222
Merge branch 'develop' into cambium
adfarth Oct 12, 2023
a5e28ea
Merge branch 'develop' into cambium
adfarth Oct 17, 2023
64a78b9
Update test_with_xpress.jl
adfarth Oct 17, 2023
daffa88
Merge branch 'develop' into cambium
adfarth Oct 25, 2023
1c8fe55
Merge branch 'develop' into cambium
adfarth Oct 26, 2023
928ef25
Merge branch 'develop' into cambium
adfarth Oct 30, 2023
0d46d93
Merge branch 'develop' into cambium
adfarth Nov 30, 2023
9ac6e24
Merge branch 'develop' into cambium
adfarth Dec 15, 2023
74a10c9
add some notes
adfarth Dec 18, 2023
c472e3f
Update AVERT and eGRID data
adfarth Dec 22, 2023
bc374ec
update default fuel emissions
adfarth Jan 8, 2024
59a1270
Merge branch 'develop' into cambium
adfarth Jan 10, 2024
cf12bea
change annual emissions to avg annual
adfarth Jan 10, 2024
f38e904
Update electric_tariff.jl
adfarth Jan 11, 2024
30530fe
Merge branch 'develop' into cambium
adfarth Jan 25, 2024
85f3308
Update runtests.jl
adfarth Jan 31, 2024
bd1b3a4
small updates to changelog and notes
adfarth Jan 31, 2024
349c378
updt default location type to region
adfarth Feb 5, 2024
bcc34f5
update tests and avert_emissions_profiles
adfarth Feb 7, 2024
c04979e
update tests
adfarth Feb 7, 2024
434f108
rm Xpress from HiGHS test
adfarth Feb 7, 2024
0c59472
update scenario names
adfarth Feb 22, 2024
569301c
Merge remote-tracking branch 'origin/develop' into cambium
zolanaj Feb 28, 2024
31c2c2b
update dates in changelog
zolanaj Feb 28, 2024
5e3c480
add default emissions decrease
zolanaj Feb 29, 2024
77833eb
use emissions decrease defaults in electric utility and tests
zolanaj Feb 29, 2024
e74ed3e
expand Cambium test suite
zolanaj Feb 29, 2024
919d859
Update CHANGELOG.md
zolanaj Feb 29, 2024
556b37b
Update CHANGELOG.md
zolanaj Feb 29, 2024
d7be87a
Merge remote-tracking branch 'origin/develop' into cambium
zolanaj Feb 29, 2024
70cd420
adding TODO for test values refresh for emissions and RE tests.
zolanaj Feb 29, 2024
f9399c8
Merge remote-tracking branch 'origin/develop' into cambium
zolanaj Mar 1, 2024
ab3ae64
Update CHANGELOG.md
adfarth Mar 4, 2024
5fa7896
Merge branch 'develop' into cambium
adfarth Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@ Classify the change according to the following categories:
### Deprecated
### Removed

## Develop - 2023-06-26
### Changed
- Changed default source for CO2 grid emissions values to NREL's Cambium 2022 Database (by default: CO2e, long-run marginal emissions rates levelized (averaged) over the analysis period, assuming start year 2024). Added new emissions inputs and call to Cambium API in `src/core/electric_utility.jl`. Included option for user to use AVERT data for CO2 using **co2_from_avert** boolian.
- Updated `electric_utility` **emissions_region** to **avert_emissions_region** and **distance_to_emissions_region_meters** to **distance_to_avert_emissions_region_meters**.
- Updated default **emissions_factor_XXX_decrease_fraction** (where XXX is CO2, NOx, SO2, and PM2.5) from 0.01174 to 0.02163 based on Cambium 2022 Mid-Case scenario, LRMER CO2e (Combustion+Precombustion) 2024-2049 projected values. CO2 projected decrease defaults to 0 if Cambium data are used for CO2 (Cambium API call will levelize values).
- Updated AVERT emissions data to v4.1, which uses Regional Data Files (RDFs) for year 2022. Data is saved in `data/emissions/AVERT_Data`. For Alaska and Hawaii (regions AKGD, HIMS, HIOA), updated eGRID data to eGRID2021 datafile and adjusted CO2 values to CO2e values to align with default used for Cambium data.
- Updated default fuel emissions factors from CO2 to CO2-equivalent (CO2e) values. In `src/core/generator.jl`, updated **emissions_factor_lb_CO2_per_gal** from 22.51 to 22.58. In `src/REopt.jl` updated **emissions_factor_lb_CO2_per_mmbtu** => Dict(
"natural_gas"=>116.9 to 117.03,
"landfill_bio_gas"=>114,8 to 115.38,
"propane"=>138.6 to 139.16,
"diesel_oil"=>163.1 to 163.61
)
- Changed calculation of all `annual` emissions results (e.g. **Site.annual_emissions_tonnes_CO2**) to simple annual averages (lifecycle emissions divided by analysis_years). This is because the default climate emissions from Cambium are already levelized over the analysis horizon and therefore "year_one" emissions cannot be easily obtained.

### Added
- In `src/REopt.jl`, added **cambium_emissions_profile** as an export for use via the REopt_API.
- In `src/results/electric_utility.jl` **cambium_emissions_region**

### Fixed
- Adjust grid emissions profiles for day of week alignment with load_year.
- In `test_with_xpress.jl`, updated "Emissions and Renewable Energy Percent" expected values to account for load year adjustment.
- In `src/core/electric_utility.jl`, error when user-provided emissions series does not match timestep per hour, as is done in other cases of incorrect user-provided data.

## Develop 2024-01-16
### Fixed
- In `reopt.jl`, group objective function incentives (into **ObjectivePenalties**) and avoid directly modifying m[:Costs]. Previously, some of these were incorrectly included in the reported **Financial.lcc**.
Expand Down
8,761 changes: 0 additions & 8,761 deletions data/emissions/AVERT_Data/AVERT_2021_CO2_lb_per_kwh.csv

This file was deleted.

8,761 changes: 0 additions & 8,761 deletions data/emissions/AVERT_Data/AVERT_2021_NOx_lb_per_kwh.csv

This file was deleted.

8,761 changes: 0 additions & 8,761 deletions data/emissions/AVERT_Data/AVERT_2021_PM25_lb_per_kwh.csv

This file was deleted.

8,761 changes: 0 additions & 8,761 deletions data/emissions/AVERT_Data/AVERT_2021_SO2_lb_per_kwh.csv

This file was deleted.

8,761 changes: 8,761 additions & 0 deletions data/emissions/AVERT_Data/AVERT_2022_CO2_lb_per_kwh.csv

Large diffs are not rendered by default.

8,761 changes: 8,761 additions & 0 deletions data/emissions/AVERT_Data/AVERT_2022_NOx_lb_per_kwh.csv

Large diffs are not rendered by default.

8,761 changes: 8,761 additions & 0 deletions data/emissions/AVERT_Data/AVERT_2022_PM25_lb_per_kwh.csv

Large diffs are not rendered by default.

8,761 changes: 8,761 additions & 0 deletions data/emissions/AVERT_Data/AVERT_2022_SO2_lb_per_kwh.csv

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions src/REopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export
get_steam_turbine_defaults_size_class,
simulated_load,
get_absorption_chiller_defaults,
emissions_profiles,
avert_emissions_profiles,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note that this change should be added to the Changelog entry

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in ab3ae64

cambium_emissions_profile,
easiur_data,
get_existing_chiller_default_cop

Expand Down Expand Up @@ -72,10 +73,10 @@ const FUEL_DEFAULTS = Dict(
"diesel_oil"=>0.0
),
"emissions_factor_lb_CO2_per_mmbtu" => Dict(
"natural_gas"=>116.9,
"landfill_bio_gas"=>114.8,
"propane"=>138.6,
"diesel_oil"=>163.1
"natural_gas"=>117.03,
"landfill_bio_gas"=>115.38,
"propane"=>139.16,
"diesel_oil"=>163.61
Comment on lines 75 to +79
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These numbers match the PR description but regarding the migration to CO2-equivalent emissions: the costs in the objective function for NOx here is health-related only like the two non-GHG pollutants (SO2 and PM25), is that correct? That would ensure we aren't double-counting if NOx is included in the CO2e calculation as it's an indirect GHG.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zolanaj Yes, the NOx cost equation only accounts for health-related costs that are a direct result of the emissions (rather than health outcomes from climate change).

However, isn't CO2e a combination of CO2, CH4, and N2O (which is not a subset of NOx emissions?)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adfarth Yes, that matches my understanding of CO2e calculation too. I think the net-positive global warming impact is NOx triggering reactions in the atmosphere to make ozone at certain concentrations, and only molecules that directly trap heat are considered in the CO2e calculation. Sounds like we are on the same page here, thanks for confirming!

),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other potentially obnoxious comment: is it worth changing CO2 to CO2e in the expressions and results?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed we will bring this up in our next dev meeting. Will involve a breaking change to inputs and outputs

"emissions_factor_lb_NOx_per_mmbtu" => Dict(
"natural_gas"=>0.09139,
Expand Down
5 changes: 0 additions & 5 deletions src/constraints/emissions_constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ function add_yr1_emissions_calcs(m,p)
yr1_emissions_offset_from_elec_exports_lbs_SO2
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_PM25] = m[:yr1_emissions_from_elec_grid_lbs_PM25] -
yr1_emissions_offset_from_elec_exports_lbs_PM25

m[:EmissionsYr1_Total_LbsCO2] = m[:yr1_emissions_onsite_fuel_lbs_CO2] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_CO2]
m[:EmissionsYr1_Total_LbsNOx] = m[:yr1_emissions_onsite_fuel_lbs_NOx] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_NOx]
m[:EmissionsYr1_Total_LbsSO2] = m[:yr1_emissions_onsite_fuel_lbs_SO2] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_SO2]
m[:EmissionsYr1_Total_LbsPM25] = m[:yr1_emissions_onsite_fuel_lbs_PM25] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_PM25]
nothing
end

Expand Down
2 changes: 1 addition & 1 deletion src/core/electric_load.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
path_to_csv::String = "", # for csv containing loads_kw
doe_reference_name::String = "",
blended_doe_reference_names::Array{String, 1} = String[],
blended_doe_reference_percents::Array{<:Real,1} = Real[],
blended_doe_reference_percents::Array{<:Real,1} = Real[], # Values should be between 0-1 and sum to 1.0
year::Int = doe_reference_name ≠ "" || blended_doe_reference_names ≠ String[] ? 2017 : 2022, # used in ElectricTariff to align rate schedule with weekdays/weekends. DOE CRB profiles must use 2017. If providing load data, specify year of data.
city::String = "",
annual_kwh::Union{Real, Nothing} = nothing,
Expand Down
2 changes: 1 addition & 1 deletion src/core/electric_tariff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function ElectricTariff(;
urdb_response::Dict=Dict(),
urdb_utility_name::String="",
urdb_rate_name::String="",
year::Int=2022, # Will be passed from ElectricLoad
year::Int=2022, # Passed from ElectricLoad
time_steps_per_hour::Int=1,
NEM::Bool=false,
wholesale_rate::T1=nothing,
Expand Down
Loading
Loading