Closed huard closed 3 years ago
@raphaeldussin Would you be comfortable reviewing this PR ?
@huard no problem! will review it by the end of the week
@huard see my minor comments. Once this is resolved, I'm happy with it. Tests are passing locally.
Merging #91 into master will increase coverage by
0.77%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #91 +/- ##
==========================================
+ Coverage 96.55% 97.32% +0.77%
==========================================
Files 6 6
Lines 319 337 +18
==========================================
+ Hits 308 328 +20
+ Misses 11 9 -2
Impacted Files | Coverage Δ | |
---|---|---|
xesmf/backend.py | 96.51% <ø> (ø) |
|
xesmf/frontend.py | 96.73% <100.00%> (+1.15%) |
:arrow_up: |
xesmf/smm.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 2d2e365...b5f3d07. Read the comment docs.
I've updated the notebooks (mostly removing the clean_weight_file
calls). I think this would be ready for a second review.
If this PR is ready to merge, perhaps it can be moved to https://github.com/pangeo-data/xESMF? Unfortunately this has to be done manually.
This sets
factor=True
andfilename=None
in the call toESMF.Regrid
, and then callsget_weight_dict
to obtain a dictionary of weights in memory instead of writing the weights to disk.The Regridder interface is changed to pass weights explicitly (
weights
replacingfilename
andreuse_weights=True
).Computed weights are saved to disk using the
to_netcdf
method.Fixes #75
I haven't modified the docs or notebooks. Feel free to dismiss if this is not the API you were looking for.