Hi @SimonDanisch, below I’ll detail here some of the code you can use to carry out the example @davidanthoff gavel. You’ll notice I lean on the examples from our conference workshop, and actually also link you to those because I think they’ll be quite helpful (and brief I promise!). We can also be in touch beyond that to discuss any questions you have or options for extending these examples. I want to make this as easy as possible for you so please don’t hesitate to reach out, and I’m available for a phone/video call too.
As listed in the Mimi Registry subsection of our website, we have several public models in our registry that operate as packages. These are the simplest to work with for now because you they have a consistent user-facing API for obtaining the model.
You can add the registry with a one-time step:
pkg> registry add https://github.com/mimiframework/MimiRegistry.git
The DICE model is probably the simplest, while PAGE and FUND can return region-level results and are a bit more involved (but are equally easy to access and run from an API standpoint). You can add those with the normal package syntax, and you probably want to add Mimi
as well:
pkg> add MimiDICE2010
pkg> add Mimi
I actually think the easiest thing for you from there might be to utilize the .ipynb
notebooks from our conference workshop here. The first one Running Models explains how to run the models and access the results, and the Modifying Parameters one goes into adjusting emissions paths and then looking at temperature.
The TLDR of the emissions example code is below, but I think those short notebooks would be most useful for you!
# do these once
pkg> registry add https://github.com/mimiframework/MimiRegistry.git
pkg> add MimiDICE2013
pkg> add Mimi
# packages
using Mimi, MimiDICE2010
# get model instances
m_dice1 = MimiDICE2010.get_model()
m_dice2 = MimiDICE2010.get_model();
# change the values of the emissions control rate parameter for m_dice2
set_param!(m_dice2, :emissions, :MIU, [fill(0.5, 25); fill(1., 35)])
# run both models
run(m_dice1)
run(m_dice2)
# obtain the temperature arrays
m_dice1_temp = m_dice1[:climatedynamics, :TATM]
m_dice2_temp = m_dice2[:climatedynamics, :TATM]
# or obtain the data frames of the arrays
df_dice1 = getdataframe(m_dice1, :climatedynamics, :TATM)
df_dice2 = getdataframe(m_dice2, :climatedynamics, :TATM)
As you can imagine there are lots of different options, and the FUND
and PAGE
models will give you regional options etc. To get an idea of the different sections and types of variables in a model like FUND
, you can use our explore
UI (as described in the Running Models notebook).
using MimIFUND
m_fund = MimiFUND.get_model()
run(m_fund)
explore(m_fund)