Comments (1)
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);
from climatemargo.jl.
Related Issues (20)
- Consistent mitigation costs HOT 1
- Consistent and correct methods for changing the timestep on the fly. HOT 8
- Add optimization constraints as a submodel in ClimateModel or ClimateModelParameters? HOT 1
- Implement exact solution to two-box energy balance model HOT 2
- Towards a generic MARGO model structure (with abstract submodel types) HOT 1
- Add costs attributed to emissions (e.g. air pollution on human health) and CO2 (e.g. ocean acidification) HOT 3
- Inconsistency about whether `t.==present_year` should be included in `future_mask`. HOT 1
- Moving to ClimateMARGO github organization HOT 3
- TagBot trigger issue HOT 22
- Problems with T_adapt and optimization in 0.2.0 HOT 2
- Stochastic optimization
- Replace PyPlot calls with Plots.jl HOT 5
- Replace "tutorial.ipynb" with a Literate.jl script HOT 1
- Inconsistent naming "M" and "mitigate", nested and flat, struct and Dict HOT 4
- "How do I extract ClimateMARGO.jl data as a csv file?" HOT 4
- Experiment with converting to NLopt instead of JuMP
- What new feature or storyline would you like to see?
- Multiple equilibria HOT 3
- emissions to concentrations Q (unit_conversions.jl) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from climatemargo.jl.