Mimi Framework

MimiPAGE2020 cannot connect TotalForcing:area to shared model parameter

Hi there,

I’ve been working with MimiPAGE2020 and keep getting the following error:

ERROR: Cannot connect TotalForcing:area to shared model parameter area, it has a conflicting :unit value (km2) with other parameters connected to this shared model parameter. To ignore this set the ignoreunitsflag inconnect_param! to false.

Do you have any thoughts on how I can fix this? It was working fine a few weeks ago, so I’m not sure if there was some change since then that’s causing this. Thanks!!

Hi @tammyt123 , yes this was a bug in the units descriptions which we got a little stricter about, but I could swear I fixed it an currently if I open an environment and add MimiPAGE2020 and Mimi I am able to call m = MimiPAGE2020.get_model() and run(m), can you show me which versions you have it might just be a mismatch there since there were a few days where it was broken unfortunately but should be stable now!

Also if you’re using the #master branch of MimiPAGE2020 it looks like @jrising made the units consistent here: Cleanup after all big merges by jrising · Pull Request #86 · openmodels/MimiPAGE2020.jl · GitHub so I would think it would work alright!

So sorry for the late response and thanks so much for this!

Ah, I see – I think I’m using version 1.7.0. I cloned a copy of the MimiPAGE2020 repository to my personal GitHub a few months ago in order to make changes to the package locally, and when I came back to it recently to rerun it, I was getting these errors. Do you have any suggestions for the best way to reconcile my modified local version of the repo with the latest updates in the master branch, aside from re-cloning the latest version and copying my changes across?

Hi @tammyt123, yes this is a tricky part of working on forks for sure, but I’m happy to find a way to help you out. So I’m clear, you’re working on a fork of the repository correct?

I think this article should help, essentially what you want to do is merge the master branch of PAGE2020 into your repository and go from there. You could also merge in the latest tagged version which is stable, but I know PAGE2020 is in development so master might be best, not sure that’s up to James :slight_smile:

Basically from your local project terminal, make sure you’re on the branch you want, which I’m guessing is main or master. Then you type

git pull https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME

which is probably be

git pull  https://github.com/openmodels/MimiPAGE2020.jl.git master

then you’ll need to resolve any conflicts, which can be done in an IDE like VSCode and I can help you with if it’s confusing because it can be at first! And then you’ll want to commit your merge with the typical

git add .
git commit -m "Merge main repository into my fork"

and push

git push

Please let me know how this goes, don’t let Github drive you too crazy without just asking me first … I can help on here or Zoom if it’s confusing. There are likely to be some conflicts since PAGE2020 has been moving right along, but we can handle it I’m sure, and we can rope in James if needed!

Yes, I’m working on a fork! Thank you so much for this – will try it out and let you know how I go :slight_smile: Much appreciated!!

@tammy just cleaning up my posts and consolidating a bit,

I think what you want technically is for the master branch of your forked repository to track the master branch of the main repository as closely as possible (I think this can be made automatic but you can also do it manually like I list above, I’m not a fork expert by I’ll ask @davidanthoff, there’s some docs here.

So what you want to do here is merge the master branch from MimiPAGE2020 master like I list above, most easily by getting onto your master branch, then calling

git merge  https://github.com/openmodels/MimiPAGE2020.jl.git master
git push

This will handle what is shown here:

Now, you want to merge your repositories master branch into whatever branch you’re working on, with the more familiar strategy of going to your branch, say socioeconomics with git checkout socioeconomics, and then merging in the master

git checkout socioeconomics
git merge master

<handle conflicts>

git push

The conflicts might be gross, VSCode should help you handle them and I’m also happy to help parse through those if you aren’t used to having to deal with those!

I’m also more than happy to do some of this for you or alongside you on Zoom