-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CO2 SCGHG sector SCC is 0 in MimiGIVE 2.0 #67
Comments
Hi @hforew thank you for the heads-up, this is helpful. You're right it looks like there's a bug in this new version that is incorrectly returning zeros for In general, I will note that if one is trying to perfectly replicate that repository, it's important to use the environment activation instructions, which will give you I know you're doing newer work so that probably doesn't apply to you, as you're likely using that code as a skeleton to move forward, but worth noting. I'd advise sticking to pinned MimiGIVE v1.1.0 or v1.0.0 (just pre-2.0) while we fix this. |
@bryanparthum just a heads up that this is a bug -- only impacts v2.0.0 and onwards -- will try to fix this this week. |
@bryanparthum update it was the same thing as we had with biodiv, accessing values that were assigned |
@hforew if you'd like to test the solution, I think that #68 should have fixed it now. I want to add some model testing so we don't run into this again, and then will have my co-developers double check things so it may take a few days to a week to have this merged. In the meantime if you are comfortable you can use that branch and feel free to let me know if anything looks off to you. Thanks for the open-source dev help! |
@lrennels Great, thank you for the quick update and explanation about specifying the version in Manifest.toml. I will comment here once I've been able to rerun estimate_give_scghg.jl with v2.0.0. |
Sounds good! Yes, when trying to replicate a project it's best to use their environments (and the Again I know in this case you're working on something new, so you might be using more updated versions, new packages, etc. not just replicating, so makes sense that you would want to use MimiGIVE2.1.0 and other newer versions. |
Thanks @lrennels. As update, after running running "add MimiGIVE#ce-fix" in package mode, I'm able to now see non-zero sectoral SCC values. |
Great to hear @hforew! I'll get this merged into master sometime next week after my co-developers take a second look. |
Closing, handled and merged in #68 |
@lrennels As a follow up, I had not correctly validated this fix on MimiGIVE v2 main branch. I had validated the fix for MimiGIVE#ce-fix. However, after updating to the latest MimiGIVE version, I saw the same issue: sectoral SCC is 0. So I reverted back to MimiGIVE#ce-fix. |
@hforew hi there, looking at my tests I see an issue with 0s for certainty equivalent domestic SCCs, which I now see is a bug I hadn't quite fixed in this version v2.0.0. Is that what you're seeing here? If so, I'm working on it now, if not let me know if there's others you are seeing or feel free to drop some code here for me to re-run. |
I think this is handled in #75 now! |
@hforew let me know if this works for you! |
@lrennels In package mode I ran The attached output is defined in script starting here: https://github.com/hforew/scghg_ext/blob/29f755be322a2257cedb09421d9d5d8a66edfe2b/estimate_give_scghgNEW.jl#L242 |
@lrennels I tested with v2.1.0 but you mention v2.0.0. Should I be testing on the latter? |
@hforew I see what's going on here, I apologize, I haven't tagged a new version so you're testing on the tagged v2.1.0 instead of the
or
and check that it moves to v2.1.1. Alternatively you can use
to check out the main branch, where this should be working now, but I'll get this tag done ASAP. |
Ok @hforew I've added a new tag, so you should be able to add |
@lrennels Below are the results. I see different, but seemingly unexpected behavior testing for MimiGIVE v2.1.0. First, using the ce-fix branch. In package mode, Executing Where sector sector subtotals are nonzero and sum to the total. Next, using the main branch MimiGIVE v2.1.0. In package mode, Executing scV1v2.1.0-CO2-give-2020-n2.csv where sectors are 0 scV1v2.1.0-CO2-give-2020-n2_nonZero.csv where sectors are nonzero but do not sum to the total Note, for MimiGIVE v2.1.0, generating output multiple times gives different results for the sector subtotals. The total remains unchanged. Also, the total for MimiGIVE v2.1.0 equals that for MimiGIVE#ce-fix. Lastly here is my terminal output: |
Hi @hforew thanks for the detailed report back, it's really helpful. My newest tagged version of MimiGIVE, which is version v2.1.1, encapsulates all the updates made on the
then add it back in with
which should bring in the latest tagged version, and then reporting your status with
or equivalently
should report back
Once you do those steps, you should get the same output you were getting with the branch, but without the need to specify a branch, and I'd recommend doing the rest of the dev work on this tagged version that way to avoid confusion. We will always maintain backwards compatibility unless we update the major version, as is convention, so you can safely update to newer minor or patch versions without worrying. |
Other useful environment commands, if you want to be more nuanced, are
|
@lrennels Thank you for the clarification and explanation. I realize now that I tested on the old version. Testing on the latest version, MimiGIVE v2.1.1, I have validated the fix. Thank you! |
When running the scghg replication procedure, the sector SCC is 0 in MimiGIVE version = "2.1.1-DEV". For version = "1.0.1-DEV", the output is as expected---sector SCC is not 0.
The source of issue may be the variable v.ce_sccs as output in results[:scc], when running estimate_give_scghg.jl.
For version = "1.0.1-DEV", v.ce_sccs is non-zero for sectors. For version = "2.1.1-DEV", v.ce_sccs is zero for sectors.
See detail below.
version = "1.0.1-DEV"
scV1fork-CO2-give-2020-n2.csv
sector discount_rate scghg
cromar_mortality 2.0% Ramsey 130
energy 2.0% Ramsey 8
slr 2.0% Ramsey 2
total 2.0% Ramsey 243
agriculture 2.0% Ramsey 103
scV1-CO2-give-2020-n2.csv
O2-give-2020-n2.csv"
sector discount_rate scghg
cromar_mortality 2.0% Ramsey 0
agriculture 2.0% Ramsey 0
energy 2.0% Ramsey 0
total 2.0% Ramsey 243
slr 2.0% Ramsey 0
Note, the total is identical across versions, 243, whereas the sector SCC is not.
And the difference between two outputs appears to be v.ce_sccs as output in results[:scc]. See two images:
version = "1.0.1-DEV"

version = "2.1.1-DEV" (note, this image does not correspond to csv SCC output)

The text was updated successfully, but these errors were encountered: