-
Notifications
You must be signed in to change notification settings - Fork 28
WIP: Magicc7 Notebook Updates #348
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
base: master
Are you sure you want to change the base?
WIP: Magicc7 Notebook Updates #348
Conversation
| ], | ||
| "source": [ | ||
| "# NBVAL_SKIP\n", | ||
| "scenario_names = list(map(str.lower, scenarios.rcps.meta[\"scenario\"].unique()))\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scenarios.items() no longer exists so I've used this method to obtain all the available rcps.
| "name": "stderr", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "/Users/seangtkelley/miniconda3/envs/climate-model-pymagicc/lib/python3.10/site-packages/pymagicc/io/scen7.py:43: UserWarning: MAGICC6 RCP region naming (R5*) is not compatible with MAGICC7, automatically renaming to MAGICC7 compatible regions (R5.2*)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to avoid this warning?
| @@ -158,7 +287,8 @@ | |||
| "# NBVAL_SKIP\n", | |||
| "results.filter(variable=\"Surface Temperature\", region=\"World\").line_plot(\n", | |||
| " x=\"time\"\n", | |||
| ");" | |||
| ");\n", | |||
| "plt.show()" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to add this otherwise the plot does not appear.
| " warnings.warn(warn_msg)\n", | ||
| "/Users/seangtkelley/miniconda3/envs/climate-model-pymagicc/lib/python3.10/site-packages/pymagicc/io/scen7.py:43: UserWarning: MAGICC6 RCP region naming (R5*) is not compatible with MAGICC7, automatically renaming to MAGICC7 compatible regions (R5.2*)\n", | ||
| " warnings.warn(warn_msg)\n", | ||
| "/Users/seangtkelley/miniconda3/envs/climate-model-pymagicc/lib/python3.10/site-packages/pymagicc/core.py:436: UserWarning: magicc logged a ERROR message. Check the 'stderr' key of the result's `metadata` attribute.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message is as follows. Any ideas? Should it be recommended to turn off these gases in the .CFG file?
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for C3F8
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for C4F10
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for C5F12
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for C7F16
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for C8F18
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CC4F8
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HFC152A
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HFC236FA
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HFC365MFC
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for NF3
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for SO2F2
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CFC11
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CFC12
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CFC113
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CFC114
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CFC115
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HCFC22
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HCFC141B
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HCFC142B
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CH3CCL3
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CCL4
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CH3CL
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CH2CL2
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CHCL3
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for CH3BR
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HALON1211
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HALON1301
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HALON2402
[Apr 10 2025 16:02:51][rawscen_to_hist] <ERROR> raw emis data does not exist for HALON1202
[Apr 10 2025 16:02:51][dumpoutput] <WARNING> OUT_KEYDATA_2 is deprecated. Use OUT_DYNAMIC_VARS instead
| "running RCP60\n", | ||
| "running RCP85\n" | ||
| "ename": "ValueError", | ||
| "evalue": "You have more than one `FILE_EMISSCEN_X` flag set. Using more than one emissions scenario is hard to debug and unnecessary with Pymagicc's Dataframe scenario input. Please combine all your scenarios into one Dataframe with Pymagicc and Pandas, then feed this single Dataframe into Pymagicc's run API.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot get passed this error using a .CFG file identical to the one above. I've also tried removing references to FILE_EMISSCEN_X and I get the same error. Any ideas?
| "outputs": [ | ||
| { | ||
| "ename": "ImportError", | ||
| "evalue": "cannot import name 'reshape_line_plot' from 'pyam.plotting' (/Users/seangtkelley/miniconda3/envs/climate-model-pymagicc/lib/python3.10/site-packages/pyam/plotting.py)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what version of pyam-iamc was used in the original run of the notebook, but this function no longer exists and I can't find an equivalent.
Pull request
This PR updates
MAGICC7.ipynbusing experience from #341.Please confirm that this pull request has done the following:
Tests addedDocumentation added (where applicable)CHANGELOG.rstaddedAdding to CHANGELOG.rst
Please add a single line in the changelog notes similar to one of the following: