diff --git a/CHANGELOG.md b/CHANGELOG.md index 789e197e4..e2115887c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,11 @@ Classify the change according to the following categories: ### Deprecated ### Removed +## Develop - 2024-04-22 +### Changed +- Updated `pop_year` and `income_year` used in call to EASIUR data (`get_EASIUR2005`) each to 2024, from 2020. +- Updated usd conversion used for EASIUR health cost calcs from USD_2010_to_2020 = 1.246 to USD_2010_to_2024 = 1.432 + ## v. 0.46.0 ### Added - In `src/core/absorption_chiller.jl` struct, added field **heating_load_input** to the AbsorptionChiller struct diff --git a/src/core/financial.jl b/src/core/financial.jl index d17925861..59a1aaef3 100644 --- a/src/core/financial.jl +++ b/src/core/financial.jl @@ -220,7 +220,7 @@ function easiur_costs(latitude::Real, longitude::Real, grid_or_onsite::String) end EASIUR_data = nothing try - EASIUR_data = get_EASIUR2005(type, pop_year=2020, income_year=2020, dollar_year=2010) + EASIUR_data = get_EASIUR2005(type, pop_year=2024, income_year=2024, dollar_year=2010) catch e @warn "Could not look up EASIUR health costs from point ($latitude,$longitude). {$e}" return nothing @@ -232,13 +232,13 @@ function easiur_costs(latitude::Real, longitude::Real, grid_or_onsite::String) coords = g2l(longitude, latitude, datum="NAD83") x = Int(round(coords[1])) y = Int(round(coords[2])) - # Convert from 2010$ to 2020$ (source: https://www.in2013dollars.com/us/inflation/2010?amount=100) - USD_2010_to_2020 = 1.246 + # Convert from 2010$ to 2024$ (source: https://www.in2013dollars.com/us/inflation/2010?amount=100) + USD_2010_to_2024 = 1.432 try costs_per_tonne = Dict( - "NOx" => EASIUR_data["NOX_Annual"][x, y] .* USD_2010_to_2020, - "SO2" => EASIUR_data["SO2_Annual"][x, y] .* USD_2010_to_2020, - "PM25" => EASIUR_data["PEC_Annual"][x, y] .* USD_2010_to_2020 + "NOx" => EASIUR_data["NOX_Annual"][x, y] .* USD_2010_to_2024, + "SO2" => EASIUR_data["SO2_Annual"][x, y] .* USD_2010_to_2024, + "PM25" => EASIUR_data["PEC_Annual"][x, y] .* USD_2010_to_2024 ) return costs_per_tonne catch @@ -248,6 +248,7 @@ function easiur_costs(latitude::Real, longitude::Real, grid_or_onsite::String) end function easiur_escalation_rates(latitude::Real, longitude::Real, inflation::Real) + # Calculate escalation rate as nominal compound annual growth rate in marginal emissions costs between 2020 and 2024 for this location. EASIUR_150m_yr2020 = nothing EASIUR_150m_yr2024 = nothing try @@ -284,7 +285,7 @@ Adapted to Julia from example Python code for EASIUR found at https://barney.ce. """ get_EASIUR2005( stack::String, # area, p150, or p300 - pop_year::Int64=2005, # population year + pop_year::Int64=2005, # population year (2000 to 2050) income_year::Int64=2005, # income level (1990 to 2024) dollar_year::Int64=2010 # dollar year (1980 to 2010) ) @@ -388,7 +389,7 @@ function get_EASIUR2005(stack::String; pop_year::Int64=2005, income_year::Int64= setindex!(ret_map, v .* adj, k) end catch - throw(@error("income year is $(income_year) but must be between 1990 to 2024")) + throw(@error("EASIUR income year is $(income_year) but must be between 1990 to 2024")) return nothing end end @@ -399,7 +400,7 @@ function get_EASIUR2005(stack::String; pop_year::Int64=2005, income_year::Int64= setindex!(ret_map, v .* adj, k) end catch e - throw(@error("Dollar year must be between 1980 to 2010")) + throw(@error("EASIUR dollar year must be between 1980 to 2010")) return nothing end end diff --git a/test/runtests.jl b/test/runtests.jl index 069b5c136..dfa051a14 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1203,7 +1203,7 @@ else # run HiGHS tests d["Site"]["latitude"] = 30.2672 d["Site"]["longitude"] = -97.7431 scen = Scenario(d) - @test scen.financial.NOx_grid_cost_per_tonne ≈ 4534.032470 atol=0.1 + @test scen.financial.NOx_grid_cost_per_tonne ≈ 5510.61 atol=0.1 end @testset "Wind" begin diff --git a/test/test_with_xpress.jl b/test/test_with_xpress.jl index 895c28062..60a1cbc13 100644 --- a/test/test_with_xpress.jl +++ b/test/test_with_xpress.jl @@ -666,7 +666,7 @@ end d["Site"]["latitude"] = 30.2672 d["Site"]["longitude"] = -97.7431 scen = Scenario(d) - @test scen.financial.NOx_grid_cost_per_tonne ≈ 4534.032470 atol=0.1 + @test scen.financial.NOx_grid_cost_per_tonne ≈ 5510.61 atol=0.1 end @testset "Wind" begin