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

PyNGL dependency should be removed #731

Open
zklaus opened this issue Mar 3, 2022 · 5 comments
Open

PyNGL dependency should be removed #731

zklaus opened this issue Mar 3, 2022 · 5 comments
Assignees
Labels

Comments

@zklaus
Copy link

zklaus commented Mar 3, 2022

Right now, ece2cmor3 depends on PyNGL. As far as I could figure, this is only for a linear interpolation in tm52cmor. In light of the fact that PyNGL is now in "maintenance mode", and the clarification by NCAR in NCAR/pyngl#45 that this means that no future versions of Python will be supported, it would be good to replace the present use of NGL with an alternative implementation for linear interpolation.

@tommibergman
Copy link
Collaborator

Do you have an idea how urgent this is? At the moment I have no time to work on this. Also do you have any suggestions to use in place of PyNGL interpolation routine?

@etiennesky
Copy link
Contributor

Looks like the cdo operator ml2pl does the trick? However it's unclear how to specify the vertical coordinate

@zklaus
Copy link
Author

zklaus commented Mar 3, 2022

Edit: I wrote the following comment before @etiennesky's. If ml2pl does the trick, great!

I think it is not super urgent. I fixed the conda-forge build of PyNGL; if everything works as it should we should be good now until Python 3.10. But I had to fix a bug in PyNGL itself to do it and it is clear now that NCAR takes "maintenance mode" to mean extremely little maintenance. The other issue is that it's not so clear if everything works because the tests are rather limited. Plus, we really use a tiny fraction of PyNGL and incur a rather heavy dependency.

In terms of possible replacements, I am not sure. Ultimately what happens is super simple, but I have no direct replacement in mind right now.

@fserva
Copy link
Contributor

fserva commented Mar 3, 2022

Hi, I think scipy is in a dependency and it has several options https://docs.scipy.org/doc/scipy/reference/interpolate.html, otherwise for the vertical ml2pl works too

@tommibergman
Copy link
Collaborator

This is in the code I created. However, I don't think I will have time for this until fall. But if someone else has the time please go ahead. I have no issue using other ways of doing it, however, if possible I would try stay away from cdo. So if scipy routines can do it sounds the best.

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

No branches or pull requests

5 participants