Open hdrake opened 2 years ago
Here is a minimal example. The example compares a 'delayed' policy scenario in which carbon capture only becomes available after 2100, versus an 'early' policy scenario in which carbon capture is available all along.
using ClimateMARGO
using ClimateMARGO.Models
using ClimateMARGO.Optimization
using ClimateMARGO.PolicyResponse
using PyPlot
## --------
## Define policy scenarios
params = deepcopy(ClimateMARGO.IO.included_configurations["default"]) # load default parameters
# First:
# * solve no-carbon-capture baseline policy model
m_noCC = ClimateModel(params);
max_deployment_noCC = Dict("mitigate"=>1., "remove"=>0., "geoeng"=>1., "adapt"=>1.); # disable carbon capture
@time optimize_controls!(m_noCC, max_deployment = max_deployment_noCC);
# Second:
# * copy baseline
# * step_forward to t=t0 so policy is preserved before t0
# * make carbon capture available (= only effective after t0)
# * finally, need to reset variable present_year; this doesn't seem to affect policy, but otherwise baseline CO2 emissions get messed up in plots
t0 = 80. # [years]
m_withDelayedCC = deepcopy(m_noCC)
step_forward!(m_withDelayedCC,t0)
max_deployment_withCC = Dict("mitigate"=>1., "remove"=>1., "geoeng"=>1., "adapt"=>1.);
@time optimize_controls!(m_withDelayedCC, max_deployment = max_deployment_withCC);
m_withDelayedCC.domain.present_year = m_noCC.domain.present_year
# Third:
# * compare to optimum policy if carbon capture had been available all along
m_withEarlyCC = deepcopy(m_noCC)
@time optimize_controls!(m_withEarlyCC, max_deployment = max_deployment_withCC);
## --------
## Make plots
fig, axes = ClimateMARGO.Plotting.plot_state(m_noCC);
fig, axes = ClimateMARGO.Plotting.plot_state(m_withDelayedCC);
fig, axes = ClimateMARGO.Plotting.plot_state(m_withEarlyCC);
Based on @danielkoll's feedback, I realized the policy response process is only described in MARGO paper (and corresponding notebooks), not anywhere in the existing documentation or examples. We should include a minimal example of the implementation, e.g. what if decision-makers only start considering carbon dioxide removal in 2050?
Just setting
doesn't quite do this because the policy makers in 2020 have perfect knowledge that CDR will become available in 2050 and will include that information in their decision making.