Infilling#43
Conversation
|
@znicholls I have some troubles whit the gridding/country level harmonisation.
|
Yep makes sense. For what Keywan needs, we don't need gridding-level harmonisation so forget about this. Go straight to checking the pre-processing or infilling (as you wish which one you start with). |
No they are in gridding-history_202511261223_202511040855_202512032146_202512021030_7e32405ade790677a6022ff498395bff00d9792d.feather |
(If/when you come back to this, grab the REMIND history from the file above, rename the model to |
Yes, indeed when I do this it works fine. Ok so for the time being I'll skip the gridding-level harmonisation. |
|
I have cleaned a bit and tests are passing locally. The new tests requires a lot of files for checking. |
|
Cool. Let's leave this for now. We can come back to it once we have all the other global-level pieces you'll need working |
|
Ok made the corrections. I still have to correct the docs/how-to-guides/how-to-run-the-cmip7-scenariomip-workflow.py file. Some questions:
|
Yep that's good
Yep
Yep change them as they're loaded (so the original file remains unchanged)
👍 In terms of next steps, two options:
Up to you which one you want to go with |
|
It should be almost done. I am not sure of:
Random things I was late to reply to:
It looks an interesting exercise.
I see that I might have abused a bit of your time, apologies for that Zeb. The main reason for all the errors you have spotted is that in many situation I am unsure on the best way to proceed or I do not see very clearly the big picture so I leave stuff behind "just in case". Basically, I content myself to make things pass and move on till I have a first draft. I'll try to be cleaner. |
Yep perfect (the others were just there to help me with debugging in emissions harmonisation historical). Maybe we'll add in some extra diagnostic layers, but for now we don't need to.
Oh yes, just ignore those for now.
You never abuse my time, don't worry. The point is more that, in my experience, the fewer lines a reviewer has to look at, the better the review they will/can give. I think getting things working first is a good way of working, maybe just add a quick review to get to a second draft that cleans up all the easy stuff before getting reviews. If there are things where you still don't know the right path, then just add a comment (either directly in the code or in the github PR) saying that (e.g. "Not sure which of the two options is better") so reviewers know it's actually a thing to be discussed/considered, not an accident. |
|
Ready to merge after changelogs addition? Should I squash some commits? |
There are still unresolved conversations and suggestions which we need to fix/resolve first. Once those are done, then yes once the changelogs are added we should be fine to merge. Don't worry about squashing. |
| if self.cmip7_scenariomip_output: | ||
| # Use revert to cmip7 ScenatioMIP naming convention. | ||
| infilled = update_index_levels_func( | ||
| infilled, | ||
| { | ||
| "variable": lambda x: convert_variable_name( | ||
| x, | ||
| from_convention=SupportedNamingConventions.GCAGES, | ||
| to_convention=SupportedNamingConventions.CMIP7_SCENARIOMIP, | ||
| ) | ||
| }, | ||
| copy=False, | ||
| ) |
There was a problem hiding this comment.
And what about this?
There was a problem hiding this comment.
Remove it (and remove the cmip7_scenariomip_output attribute) and put the naming conversion in the test function
| # TODO: Not currently working. The hash keeps changing. | ||
| # Might be related to embargoed files on Zenodo? |
There was a problem hiding this comment.
| # TODO: Not currently working. The hash keeps changing. | |
| # Might be related to embargoed files on Zenodo? | |
| # TODO: Not currently working. | |
| # We believe this is because you have to be logged in to retrieve the file, | |
| # and we haven't set that up | |
| # (this should work fine once the record is no longer embargoed). |
| # Use gcages naming convention. | ||
| infilling_db = update_index_levels_func( | ||
| infilling_db, | ||
| { | ||
| "variable": lambda x: convert_variable_name( | ||
| x, | ||
| from_convention=SupportedNamingConventions.CMIP7_SCENARIOMIP, | ||
| to_convention=SupportedNamingConventions.GCAGES, | ||
| ) | ||
| }, | ||
| copy=False, | ||
| ) | ||
| cmip7_ghg_inversions = update_index_levels_func( | ||
| cmip7_ghg_inversions, | ||
| { | ||
| "variable": lambda x: convert_variable_name( | ||
| x, | ||
| from_convention=SupportedNamingConventions.OPENSCM_RUNNER, | ||
| to_convention=SupportedNamingConventions.GCAGES, | ||
| ) | ||
| }, | ||
| copy=False, | ||
| ) | ||
| historical_emissions = update_index_levels_func( | ||
| historical_emissions, | ||
| { | ||
| "variable": lambda x: convert_variable_name( | ||
| x, | ||
| from_convention=SupportedNamingConventions.CMIP7_SCENARIOMIP, | ||
| to_convention=SupportedNamingConventions.GCAGES, | ||
| ) | ||
| }, | ||
| copy=False, | ||
| ) |
There was a problem hiding this comment.
Should I move these into the loading functions?
There was a problem hiding this comment.
No it's good here (and makes the logic clearer: loading just loads, but if you want to get setup like ScenarioMIP, you have to do this renaming too to make everything work)
There was a problem hiding this comment.
Ok good. I'll add the change logs then
|
Can we merge this one? |
|
Yep |
Description
Checklist
Please confirm that this pull request has done the following:
changelog/