Support UKV variable name change #364: Conditionally rename x,y dims …#372
Closed
aouatefm wants to merge 1 commit intoopenclimatefix:mainfrom
Closed
Support UKV variable name change #364: Conditionally rename x,y dims …#372aouatefm wants to merge 1 commit intoopenclimatefix:mainfrom
aouatefm wants to merge 1 commit intoopenclimatefix:mainfrom
Conversation
…name x,y dims for backward compatibility
|
Hi @aouatefm, I am not a maintainer but wanted to understand how did you come up with ds.dims(). Is this something from tensorflow or will get to know if we setup the project? |
dfulu
reviewed
Dec 22, 2025
| "y": "y_osgb", | ||
| }, | ||
| ) | ||
| # Build rename dictionary conditionally based on existing dimensions |
Member
There was a problem hiding this comment.
@aouatefm can you remove this comment. I don't think it improves the clarity of the code
Member
|
This was completed by #393 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
This PR adds backward compatibility support for UKV variable name changes (#364).
Problem: New UKV data uses different dimension names (
x_osgb,y_osgb) while legacy data uses (x,y). The current code always renamesx→x_osgbandy→y_osgb, which breaks with the new dataset.Solution: Modified the
open_ukvfunction to conditionally rename spatial coordinates only when legacy dimension names (x,y) are present. This maintains compatibility with both:x→x_osgb,y→y_osgb)x_osgb,y_osgb)How Has This Been Tested?
If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
Checklist: