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

xESMF python2 support? #12

Closed
markcollier opened this issue Jan 2, 2018 · 4 comments
Closed

xESMF python2 support? #12

markcollier opened this issue Jan 2, 2018 · 4 comments

Comments

@markcollier
Copy link

Looks like a great interface for a daunting package, esmf. I'm working towards migrating to python3 but is it possible to support both python2/3 with this package? I tried pip installing but it stopped as expected from your documentation. Thanks,

@JiaweiZhuang
Copy link
Owner

JiaweiZhuang commented Jan 2, 2018

Thanks for asking. I am hesitant to support python2 because the entire scientific Python ecosystem is going to drop Python2 support. xESMF explicitly depends on Scipy, so that matters a lot for xESMF.

I'll keep this issue open. If too many people asking I might rethink about it.

@markcollier
Copy link
Author

Yes fair enough. I'm now trying to move some of my code across to python3 as i really need your package, I have been working on a python approach myself for ESMFpy but nothing as sophisticated as yours. There are still quite a few things that are only possible to do currently under python2 but I will just separate these tasks. On another topic, with your curvilinear example, is it possible to provide an output mask and apply conservative weighting? At the moment it presumably tries to work out its own output land/sea mask which might not be as good as a explicitly defined one? This might be more reliable especially if interpolating from a range of differently defined curvilinear grids and analysis is wanting to be done on a consistent output grid. This is certainly possible under NCL ESMF. Thanks for your efforts, I suspect xESMF will become a popular package.

@JiaweiZhuang
Copy link
Owner

On another topic, with your curvilinear example, is it possible to provide an output mask and apply conservative weighting? At the moment it presumably tries to work out its own output land/sea mask which might not be as good as a explicitly defined one?

xESMF has no idea about land/sea mask. It just maps nan in the input data to nan in the output data. Say a destination point receives contributions from 4 source points, as long as 1 out of the 4 source points is nan, the total contributions will add up to nan (because any_number + nan = nan). If you don't want the contributions from the other 3 points to be corrupted bynan, you may set the 4th point to 0 instead of nan

I am not sure if I understand "provide an output mask and apply conservative weighting". Any concrete example? The 'conservative' method is area-weighted.

@JiaweiZhuang
Copy link
Owner

Since xarray is going to drop Python2 support (pydata/xarray#1830), I am not going to add Python2 support for xESMF.

raphaeldussin added a commit to raphaeldussin/xESMF that referenced this issue Sep 2, 2020
add HPC regridding documentation (replace PR JiaweiZhuang#4)
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

No branches or pull requests

2 participants