-
Notifications
You must be signed in to change notification settings - Fork 48
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
Implement ESMpy mask handling #23
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23 +/- ##
==========================================
- Coverage 95.19% 94.97% -0.22%
==========================================
Files 6 6
Lines 229 239 +10
==========================================
+ Hits 218 227 +9
- Misses 11 12 +1
Continue to review full report at Codecov.
|
We could potentially pull in the unmapped destination list to ESMPy, but I think it is easier to use fill values (or nans) during the sparse matrix multiplication. Basically, fill the destination matrix with nans before applying the sparse matrix. Afterwards, if the masks are set up correctly, only the mapped values will be non-nan. See filling and finding for mildly relevant examples. |
Thanks for the PR (the first PR for xESMF)! I still have some concerns: #22 (comment). Let's continue the discussion in the main issue. |
86e1e45
to
0a3d391
Compare
@jhamman - this PR was discussed today at the xESMF dev meeting. There was a consensus that it's a very important feature. Could you let us know whether you plan to keep working on the PR? Do you need any help from the dev team? If you don't have time to finish it, let us know so someone else can take it over. |
Thanks for the ping. I'm not likely to have time to pick this up in the near future so would welcome someone else stepping in if there is time/interest. |
What is the difference between this and #82? Does that supersede this? If we want to move forward with this PR, I recommend it be moved to https://github.com/pangeo-data/xESMF? Unfortunately this has to be done manually. |
Comparing across forks: JiaweiZhuang:masking is up to date with all commits from jhamman:feature/masks. so this PR can be closed |
See JiaweiZhuang#17. This together with masking can address the normalization issue in JiaweiZhuang#23
* doc links pointing to pangeo-xesmf let's have the links pointing to the updated doc * update requirements versions * Update doc/requirements.txt Co-authored-by: Anderson Banihirwe <[email protected]> * wrong syntax * python3.8.5 not available * remote python dep * relax versions Co-authored-by: Anderson Banihirwe <[email protected]>
This comes from the discussion in #22. It is intended to help users specify masks for the valid cells in the source and/or destination grids. It does this in the following way:
mask
variable inds_in
andds_out
mask
variable is present, it adds that mask to the ESMF grid objectESMF.Regrid()
call.I've been testing this and it seems to be headed in the right direction. There are certainly additional features/tests/docs that this will need but I'm putting up here to aid in our discussion.