Mimi Framework

Interactive Visualization

Hi,
I’m working on ReactiveRuntime.jl and am looking for exciting interactive visualizations.
The framework is targeted to visualize scientific models and I’d like to focus on climate models. So, I was thinking Mimi is the right place to look for some exciting use cases! :slight_smile:

When talking with @davidanthoff, he pointed out we could visualize a model that lets the reader chose between different emission paths, and show the effect on temperature rise.
Has anyone on here some interesting Julia code they want to share that does something like this?
I will be doing the interactive visualization, but I have no idea how to set up an interesting Model. Plotting geographic data would be especially appealing!

Best,
Simon

Hi @SimonDanisch, this is an exciting direction to take this work I’m more than happy to help! I’ll send some simple code tomorrow, and we can continue to discuss various options depending on what seems interesting to you.

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)
1 Like

Cool, thanks a lot! :slight_smile:
I was wondering, if I can model how different lifestyles could impact the forecast…
For that I would need to set the emissions manually. Is it true, that I can just set them via the control rate? I see, that they get calculated when running the model (:emissions, :E)

Each model has a unique set of parameters that could be used as levers to use to explore affects on output variables such s m[emissions, :E] or `m[:climatedynamics, :TATM], These will vary between models, but some are also common across models. I’m going to go take a look at these models again to make sure I answer clearly, but in the meantime our resident IAM experts may have a better response than me …

@ckingdon95 and @davidanthoff if Simon is thinking about “how different lifestyles could impact forecast”, can you detail here the right parameters for him to play with (perhaps for example the suite that we change in IWG related to the 5 scenarios) and a bit on why so he has the context needed for his work? I think you can do so more eloquently than I at this moment.

I think for DICE, the emission control rate is your easiest knob to turn. It is simply a control variable that can take a value between 0 and 1, and determines how much emission control you do. At 1 you’re not emitting any CO2 anymore, at 0 you are emitting what we call business as usual, or whatever we think would occur if there is no climate policy.