Compute_scc for a modified Mimi model

Hi all,
I am trying to compute the SCC for a modified version of MimiDICE2013 but I’m not getting the right numbers.
I have added components, replaced components and optimized variables to the original MimiDICE2013 and I have used the following code to get the 5-year SCC values:

scc = DataFrame(time = Int64[], scc = Float64[]) #empty dataframe
for ii in 1:60
    scc_i = MimiDICE2013.compute_scc(MyModel; year= 2005 + ii * 5, last_year = 2305, prtp = 0.03) #compute scc
        year_i = 2005 + ii * 5
            push!(scc, [year_i, scc_i]) #fill SCC dataframe

This is giving me some numbers but they don’t match with the results of the emissions mitigation. To give an example I’m attaching a figure that shows the emissions, temperature and SCC of the MimiDICE2013 and MyModel, lower emissions should be associated with larger SCC, right?

I know that the SCC is wrong (and not other part of the code) because I had this exact same model on matlab and I’m getting now the same results except from the SCC computation. Do you see any error or can you think about something that is causing this problem?

Thanks so much for your help in advance!

@davidanthoff @ckingdon95 can one of you take a look? I will probably have some time tomorrow to do so too but wanted to ping you two.

1 Like

Hi Bernie, I can try to help! You’re right that lower emissions will sometimes be associated with larger SCC, although not always. Are you using the same economic input values as the original model? (I’d be curious to see the red/blue line comparison of GDP and consumption between the two models to diagnose further.)

One thing that I want to make sure you are aware of is the eta keyword argument in the compute_scc function you’re using. I noticed you changed the pure rate of time preference parameter to be 3%, but the default value for eta is 1.45 and is still being used for discounting. If you are trying to calculate a constant discounting SCC without considering the marginal utility of consumption, then you should specify eta=0. Not sure if that is related to what might be different here than in your matlab version!

Hi @ckingdon95,
thanks for your response, it was very helpful to realize what was going on.
So the problem is that in MyModel I changed the utility function. This is a problem because the function _compute_scc, called by compute_scc has the following argument to compute the scc:

marginal_damages = -1 * mm[:neteconomy, :C][1:ntimesteps] * 10^12     # Go from trillion$ to $; multiply by -1 so that damages are positive; pulse was in CO2 so we don't need to multiply by 12/44

    cpc = mm.base[:neteconomy, :CPC]

    year_index = findfirst(isequal(year), model_years)

    df = [zeros(year_index-1)..., ((cpc[year_index]/cpc[i])^eta * 1/(1+prtp)^(t-year) for (i,t) in enumerate(model_years) if year<=t<=last_year)...]
    scc = sum(df .* marginal_damages * 5)  # currently implemented as a 5year step function; so each timestep of discounted marginal damages is multiplied by 5

So in the second to last line, the utility function is being defined again in the standard DICE form:(cpc[year_index]/cpc[i])^eta * 1/(1+prtp)^(t-year), which doesn’t match with the utility function formulation of MyModel.

I will try to re-write this function in order to make it work for me. However, I think the ideal would be to have a function that retrieves the utility function of AnyModel and apply it to compute the SCC. I will try to do that as well and report back.

Thanks so much again

Ah got it. I think it will probably make sense for you to just write your own compute_scc function to use, since ours assumes the original utility function for DICE. But if you think of a way to change ours that would make it more general that you think would be better, let us know and we can talk about adding it to the model package!

Couldn’t you make the current DICE welfare function the default, unless a user passes in their own welfare function? If the passed in function had hard-coded values for eta, prtp, etc. and only needed consumption as an argument, it could probably work with the Mimi code.

something like compute_scc(typical arguments; welfare_function=f(x))