Skip to content

Commit

Permalink
Merge pull request #16 from fonsp/patch-1
Browse files Browse the repository at this point in the history
discounting for non-standard dt
  • Loading branch information
hdrake committed Jun 11, 2020
2 parents d77c93f + 0838f9b commit af16f49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/diagnostics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ FCO₂_no_geoeng(model::ClimateModel; a=a) = (


function discounting(model::ClimateModel)
discount = (1. .+ model.economics.utility_discount_rate) .^ (-(t .- model.present_year))
discount[t .< model.present_year] .= 0.
discount = (1. .+ model.economics.utility_discount_rate) .^ (-(model.domain .- model.present_year))
discount[model.domain .< model.present_year] .= 0.

return discount
end
Expand Down Expand Up @@ -253,4 +253,4 @@ SCC(model::ClimateModel, year::Float64) = round((
discounted_total_cost(model)
)*1.e12, digits=2)

SCC(model::ClimateModel) = SCC(model::ClimateModel, model.domain[1])
SCC(model::ClimateModel) = SCC(model::ClimateModel, model.domain[1])

0 comments on commit af16f49

Please sign in to comment.