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

geoviews.operation.regrid.weighted_regrid() does not respect file_pattern parameter #405

Closed
Timothy-W-Hilton opened this issue Dec 12, 2019 · 1 comment · Fixed by #491
Closed

Comments

@Timothy-W-Hilton
Copy link

FOLLOW THESE INSTRUCTIONS CAREFULLY

ISSUES THAT DO NOT CONTAIN NECESSARY INFORMATION MAY BE CLOSED, IMMEDIATELY

The issue tracker is NOT the place for general support. For questions and technical assistance, ask us on Gitter.

For defects or deficiencies, please provide ALL OF THE FOLLOWING:

ALL software version info (Panel, bokeh, python, notebook, OS, browser, any other relevant packages)

geoviews 1.6.5 py_0 conda-forge
geoviews-core 1.6.5 py_0 conda-forge
holoviews 1.12.6 py_0 conda-forge
bokeh 1.3.4 py37_0 conda-forge
python 3.7.3 h93065d6_1 conda-forge
notebook 6.0.1 py37_0 conda-forge
MacOS High Sierra 10.13.6
Safari Version 13.0.4 (13608.4.9.1.4)

Description of expected behavior and the observed behavior

I expected supplying a file_pattern string and reuse_weights=True to geoviews.operation.regrid.weighted_regrid() to cause weighted_regrid() to write a weight file with the name supplied, and to reuse that file on subsequent regrids. It seems the file_pattern value is overwritten with the default somewhere in Operation.call() in operation.py (beginning line 168 in my installation)

Complete, minimal, self-contained example code that reproduces the issue

Placing these two lines after the final xEMSF example in the notebook at http://geoviews.org/user_guide/Resampling_Grids.html reproduces the behavior. Both calls produce the output "Create weight file: bilinear_(0.356, 449.650)_(16.334, 89.638)_400x400.nc". I've posted a complete example .

weighted_regrid(quadmeshes, streams=[], reuse_weights=True, file_pattern=('weights_1.nc')) * gv.feature.coastline
weighted_regrid(quadmeshes, streams=[], reuse_weights=True, file_pattern=('weights_2.nc')) * gv.feature.coastline

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

Timothy-W-Hilton pushed a commit to Timothy-W-Hilton/d34S_OCS that referenced this issue Dec 20, 2019
geoviews.operation.regrid.weighted_regrid() does not respect its
file_pattern
parameter (holoviz/geoviews#405).  This
workaround copies the saved regride weights to the default filename
that cannot currently be changed, then delete the default file
afterwards.
@ppwadhwa ppwadhwa added this to the Version 1.9.0 milestone Jul 20, 2020
@ppwadhwa
Copy link

This bug should probably be fixed along with #406

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

Successfully merging a pull request may close this issue.

3 participants