Skip to content

Commit

Permalink
Fix to properly reuse precomputed weights in regridder
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaise Gauvin St-Denis committed May 30, 2024
1 parent 9998180 commit f12895a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xscen/regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ def regrid_dataset( # noqa: C901
if os.path.isfile(weights_filename) and not (
("reuse_weights" in kwargs) and (kwargs["reuse_weights"] is False)
):
kwargs["weights"] = weights_filename
kwargs["reuse_weights"] = True
regridder_kwargs["weights"] = weights_filename
regridder_kwargs["reuse_weights"] = True

# Extract args that are to be given at call time.
# output_chunks is only valid for xesmf >= 0.8, so don't add it be default to the call_kwargs
Expand Down

0 comments on commit f12895a

Please sign in to comment.