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

Reference ncdata in docs. #9847

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

pp-mo
Copy link
Contributor

@pp-mo pp-mo commented Dec 2, 2024

This is just an attempt to augment the existing links to Iris and usage, to include reference to ncdata.
I could add more coverage of the why and how, but I don't think it is really wanted in xarray docs, so a link should be enough.

Copy link

welcome bot commented Dec 2, 2024

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@dcherian
Copy link
Contributor

dcherian commented Dec 2, 2024

Nice! Is this the preferred way to convert between Iris & Xarray now? If so, we'd be happy to delete the existing methods, I am not sure anyone uses them anyway.

@pp-mo
Copy link
Contributor Author

pp-mo commented Dec 2, 2024

Note : you might argue that ncdata should allow to retire DataArray.to_iris / from_iris, but I really don't think the world is ready for that !
There are arguments on both sides:

  • I feel like 'to_iris' and 'from_iris' are embedding iris concepts within xarray, which doesn't seem like a great idea.
  • they don't handle all aspects of CF translation : so, a significant part of the motivation for ncdata was to enable "correct" translation via iris loading code for CF Conventions management, since to_iris can obviously only handle some parts of that.

..but..

  • to_iris and from_iris are obviously useful legacy, and easy to use
  • for simple cases, they avoid ncdata as an additional code dependency (though they do need Iris itself)

@pp-mo
Copy link
Contributor Author

pp-mo commented Dec 2, 2024

Nice! Is this the preferred way to convert between Iris & Xarray now? If so, we'd be happy to delete the existing methods, I am not sure anyone uses them anyway.

Oh my additional remarks crossed with yours!

The answer very much depends on what you think.
Practically, right now, I think ncdata can handle "almost" anything, but it is not yet supporting 'string' type variables which has suddenly emerged as a bit of a problem. I should be looking into that shortly.

@pp-mo
Copy link
Contributor Author

pp-mo commented Dec 2, 2024

I am not sure anyone uses them anyway.

I'd really need to defer to your understanding of that.
In Iris, we always find those questions really hard! (but we probably have a much more conservative user base)

@dcherian dcherian merged commit 66e13a2 into pydata:main Dec 3, 2024
29 checks passed
Copy link

welcome bot commented Dec 3, 2024

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants