Skip to content

Commit

Permalink
fix regrid.most_common due to changes in version xarray_regrid v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahAlidoost committed Oct 16, 2024
1 parent 2c3dac3 commit bba68a9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/zampy/datasets/land_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def load(
grid = xarray_regrid.create_regridding_dataset(
utils.make_grid(spatial_bounds, resolution)
)
ds = ds.regrid.most_common(grid, time_dim="time", max_mem=1e9)
ds = ds.regrid.most_common(grid)

return ds

Expand Down Expand Up @@ -225,9 +225,7 @@ def extract_netcdf_to_zampy(file: Path) -> xr.Dataset:

target_dataset = xarray_regrid.create_regridding_dataset(new_grid)

ds_regrid = ds.regrid.most_common(
target_dataset, time_dim="time", max_mem=1e9
)
ds_regrid = ds.regrid.most_common(target_dataset)

# rename variable to follow the zampy convention
variable_name = "land_cover"
Expand Down

0 comments on commit bba68a9

Please sign in to comment.