Mimi Framework

Social costs of HFCs (hydrofluorocarbons)

Is it possible to recalculate the social costs of HFCs released by the EPA (https://downloads.regulations.gov/EPA-HQ-OAR-2021-0044-0045/attachment_25.pdf) using lower discount rates than what the EPA uses? Any advice on how to start going about this using the mimi framework and/or the tools that RFF has made available (Social Cost of Carbon Computing Platform: Models from the Interagency Working Group)? Thanks

Hi @chframe,

The repo here should walk you through how to do that. You will also need RFF’s MimiIWG.jl package, along with the other Mimi.jl components in the standard fashion as they describe. Lastly, you will place this repo in your dev folder. While everything was current at the time they were estimated, Mimi.jl and MimiIWG.jl are in flux and backwards compatibility is out of my purview and you could work with the model developers on that front. Thanks and enjoy!

Thank you @parthum! @chframe I also believe @davidanthoff and you have been in touch offline, but do let us know if there are workflow things you need help with.

@parthum I see that your branch is out of step with recent improvements (as is expected with an old project of course!) so perhaps I’ll work on merging master in since I made those changes and can probably pretty quickly bring them in.

1 Like

Hello @chframe and @parthum an update to simplify all workflows, I will merge in the HFC functionality into our home repository MimiIWG.jl’s main branch, and update the instructions in your repo MimiIWG-HFC environment and README files.

This should simplify everyone’s workflow, but I need to do cleanup and testing to make sure it all looks correct today, so @chframe please wait until the end of the day, or preferably Monday, to engage with these materials. I would suggest starting fresh from the README instructions when this is complete.

Cheers!
Lisa

1 Like

OK, thanks for doing that and letting me know. I’ll hold off till next week.
best,
Caitlin

@chframe you should be good to go, don’t hesitate to be in touch with questions.

Thanks for doing that.
I’m trying to follow the readme instructions, but am getting stuck (I’m not a programmer).
In terminal I navigated to the folder /home/caitlin/julia-1.6.3/share/julia and then did

git clone GitHub - bryanparthum/MimiIWG-HFC: This repo provides replication code and steps for estimating the social cost of HFC's using MimiIWG.jl

Then in Julia I did this

cd("/home/caitlin/julia-1.6.3/share/julia/MimiIWG-HFC/")
using Pkg
Pkg.activate(".")
Pkg.instantiate()

I got a TypeError message: in typeassert, expected VersionNumber, got Pkg.Types.VersionSpec

Then I did this:

include(“code/1_estimate_sc_hfcs.jl”)

And I got LoadError: ArgumentError: Package Revise [295af30f-e4ad-537b-8983-00126c2a3abe] is required but does not seem to be installed: - Run Pkg.instantiate() to install all recorded dependencies.

I’m not sure what’s wrong, maybe I’m in the wrong folder? Thanks for any advice.

Hi @chframe this looks like an environments problem, let me try to figure this out on my end and I’ll be in touch. One note is that it isn’t necessary to have this folder in the julia folder unless that’s where you want it. You can put it anywhere that is convenient for you in your file system.

Oh … I think I know … @parthum is it possible you created these .toml files when using an older Julia version, pre v1.6? I bet that’s what’s going on here, let me update them with my system and we can get that a try @chframe

You’re quite right. These are certainly old .tomls from back when. Sorry, it’s on my list of things to test these again, I promise. too. many. things. :slight_smile:

No problem Bryan, I’ll handle it for you! I need to use our latest Mimi to pair with the latest MimiIWG, that unfortunately throws warnings … but no errors. I’ll detail that in the README.

Hi @chframe ok I think I’ve fixed this, to get the updated version you may either (1) re-clone with the steps above or, if you are comfortable with Github and have it installed as I suppose you do (2) git pull the newest version from the terminal (or Github desktop client if you use one) when you are in that folder.

You will note that when the script runs there will be some Warnings, you may ignore them, they are a backwards compatibility issue I am going to work on fixing this week but they will not interfere with the results in any way. You can also note in the 1_estimate_sc_hfcs.jl script there is a variable N currently set to 100 … this is the number of trials per Monte Carlo run and can be changed as you see fit.

Keep us updated with questions etc., either here or by email.

Thanks for the update. I did the git pull and tried to repeat what I did yesterday, but I’m still getting the load error. I’ve attached screenshots of what I did in terminal and julia.

Also thanks for the tip about locating julia files, I was having other problems yesterday so I tried putting things into a julia folder to see if that would help.
git pull:

Here is the julia load error:

Maybe I need to update MimiIWG? I actually installed it last Friday, before we started talking and you told me to wait till Monday. I told julia to update on Wednesday this week, thinking that would also update any changes to MimiIWG, but maybe not-?

Hi there, sorry for the confusion and thank you for the full error message. What this shows is you are running Julia 1.4.1 and we need you to be on the latest Julia, namely at least 1.6.

I can help you get there, you’ll want to download the new version here Download Julia and ideally delete 1.4.

If you have already downloaded it, then we just need to make sure you are spinning up that version instead of 1.4. If so, how are you starting it up? You can’t yoe VERSION to see what version you’re on.

You updated the packages correctly though, I can tell from the screenshot!

OK, yes the version of julia in usr/bin is 1.4.1. I think I just removed that version with apt-get remove julia

There’s also a folder in home/caitlin called julia-1.6.3
I’m not sure how I wound up with two versions of julia

It’s happened to me before no problem, if you have trouble getting a Julia 1.6.xx up and running let me know these things can be tricky at first to set up but luckily it’s a one-time cost.

Yeah, I tried opening the julia inside the julia-1.6.3 folder and it was still opening v 1.4.1 for some reason

I don’t know my way around this computer well enough to understand why it’s doing that or how to change it.

I was able to run the MimiIWG software for SC co2, n2o, and ch4 though

1 Like

OK, I have the 1.6.3 version of Julia running now. I was having PATH issues before. I’ll let you know if things work out. thanks again for the help