Skip to content

Commit

Permalink
avoid extrapolation artefacts
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMohrmann committed Apr 11, 2024
1 parent 4bcfee8 commit 0a6a5b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion glidertools/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,9 @@ def grid_data(
gridded = gridded.reindex(labels.astype(float))

if interp_lim > 0:
gridded = gridded.interpolate(limit=interp_lim).bfill(limit=interp_lim)
gridded = gridded.interpolate(limit=interp_lim, limit_area="inside").bfill(
limit=interp_lim
)

if not return_xarray:
return gridded
Expand Down

0 comments on commit 0a6a5b8

Please sign in to comment.