-
Notifications
You must be signed in to change notification settings - Fork 47
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
Weights are kept in memory instead of being written to disk. #91
Conversation
@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. |
…ead_weights. added tests.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
I've updated the notebooks (mostly removing the |
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. |
re-enable legacy args
Merged in pangeo-data/xESMF#3 |
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.