Skip to content
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

Fix datetime metadata for xarray for single-time datasets #18

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

juntyr
Copy link
Contributor

@juntyr juntyr commented Oct 8, 2024

The source squeezes the origin data, so a 1d time with one element becomes 0d, which we cannot iterate over. Hence, we need to ensure that the time is at least 1d

@juntyr
Copy link
Contributor Author

juntyr commented Oct 8, 2024

I also noticed that this method fails entirely if the time dimension is called valid_time

@JamesVarndell
Copy link
Collaborator

I also noticed that this method fails entirely if the time dimension is called valid_time

This is true, and something that needs to be made more robust. I'll make an issue for this.

@JamesVarndell JamesVarndell merged commit 8f3e727 into ecmwf:develop Oct 18, 2024
7 checks passed
@juntyr juntyr deleted the patch-2 branch October 18, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants