Skip to content

Commit

Permalink
update cambium inputs and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adfarth committed Dec 12, 2024
1 parent 239d8f2 commit 4b27408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/core/electric_utility.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Climate Option 1 (Default): Use levelized emissions data from NREL's Cambium database by specifying the following fields:
cambium_scenario::String = "Mid-case", # Cambium Scenario for evolution of electricity sector (see Cambium documentation for descriptions).
## Options: ["Mid-case", "Low renewable energy cost", "High renewable energy cost", "High demand growth", "Low natural gas prices", "High natural gas prices", "Mid-case with 95% decarbonization by 2050", "Mid-case with 100% decarbonization by 2035"]
cambium_location_type::String = "GEA Regions", # Geographic boundary at which emissions are calculated. Options: ["Nations", "GEA Regions"]
cambium_location_type::String = "GEA Regions 2023", # Geographic boundary at which emissions are calculated. Options: ["Nations", "GEA Regions 2023"]
cambium_metric_col::String = "lrmer_co2e", # Emissions metric used. Default: "lrmer_co2e" - Long-run marginal emissions rate for CO2-equivalant, combined combustion and pre-combustion emissions rates. Options: See metric definitions and names in the Cambium documentation
cambium_start_year::Int = 2025, # First year of operation of system. Emissions will be levelized starting in this year for the duration of cambium_levelization_years. # Options: any year 2023 through 2050.
cambium_levelization_years::Int = analysis_years, # Expected lifetime or analysis period of the intervention being studied. Emissions will be averaged over this period.
Expand Down Expand Up @@ -160,7 +160,7 @@ struct ElectricUtility
### Grid Climate Emissions Inputs ###
# Climate Option 1 (Default): Use levelized emissions data from NREL's Cambium database by specifying the following fields:
cambium_scenario::String = "Mid-case", # Cambium Scenario for evolution of electricity sector (see Cambium documentation for descriptions).
cambium_location_type::String = "GEA Regions", # Geographic boundary at which emissions are calculated. Options: ["Nations", "GEA Regions", "States"]
cambium_location_type::String = "GEA Regions 2023", # Geographic boundary at which emissions are calculated. Options: ["Nations", "GEA Regions 2023"]
cambium_metric_col::String = "lrmer_co2e", # Emissions metric. Default: "lrmer_co2e" - Long-run marginal emissions rate for CO2-equivalant, combined combustion and pre-combustion emissions rates. Options: See metric definitions and names in the Cambium documentation
cambium_start_year::Int = 2025, # First year of operation of system. # Options: any year now through 2050.
cambium_levelization_years::Int = analysis_years, # Expected lifetime or analysis period of the intervention being studied. Emissions will be averaged over this period.
Expand Down Expand Up @@ -573,7 +573,7 @@ function cambium_emissions_profile(; scenario::String,
"time_type" => "hourly", # hourly or annual
"metric_col" => metric_col, # lrmer_co2e
"smoothing_method" => "rolling", # rolling or none (only applicable to hourly queries). "rolling" best with TMY data; "none" best if 2012 weather data used.
"gwp" => "100yrAR6", # Global warming potential values. Default: "100yrAR6". Options: "100yrAR5", "20yrAR5", "100yrAR6", "20yrAR6" or a custom tuple [1,10.0,100] with GWP values for [CO2, CH4, N2O]
"gwp" => [1, 29.8, 273.0], # TODO update back to "100yrAR6", # Global warming potential values. Default: "100yrAR6". Options: "100yrAR5", "20yrAR5", "100yrAR6", "20yrAR6" or a custom tuple [1,10.0,100] with GWP values for [CO2, CH4, N2O]
"grid_level" => grid_level, # enduse or busbar
"ems_mass_units" => "lb" # lb or kg
)
Expand Down
7 changes: 3 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2308,13 +2308,12 @@ else # run HiGHS tests
@test results["Site"]["total_renewable_energy_fraction_bau"] 0.132118 atol=1e-3 # 0.1354 atol=1e-3
# CO2 emissions - totals ≈ from grid, from fuelburn, ER, $/tCO2 breakeven
@test results["Site"]["lifecycle_emissions_reduction_CO2_fraction"] 0.8 atol=1e-3 # 0.8
@test results["Site"]["annual_emissions_tonnes_CO2"] 11.662 rtol=0.01
@test results["Site"]["annual_emissions_tonnes_CO2_bau"] 58.3095 rtol=0.01
@test results["Site"]["annual_emissions_tonnes_CO2"] 11.79 rtol=0.01
@test results["Site"]["annual_emissions_tonnes_CO2_bau"] 58.97 rtol=0.01
@test results["Site"]["annual_emissions_from_fuelburn_tonnes_CO2"] 0.0 atol=1 # 0.0
@test results["Financial"]["lifecycle_emissions_cost_climate"] 8397.85 rtol=0.01
@test results["Financial"]["lifecycle_emissions_cost_climate"] 8496.6 rtol=0.01
@test results["Site"]["lifecycle_emissions_from_fuelburn_tonnes_CO2"] 0.0 atol=1 # 0.0
@test results["Site"]["lifecycle_emissions_from_fuelburn_tonnes_CO2_bau"] 0.0 atol=1 # 0.0
@test results["ElectricUtility"]["annual_emissions_tonnes_CO2_bau"] 58.3095 rtol=0.01
@test results["ElectricUtility"]["lifecycle_emissions_tonnes_CO2"] 235.9 rtol=0.01


Expand Down

0 comments on commit 4b27408

Please sign in to comment.