From bba68a99eada54fdbc66a9b968b863c6c8ba962d Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Wed, 16 Oct 2024 16:44:14 +0200 Subject: [PATCH] fix regrid.most_common due to changes in version xarray_regrid v0.4.0 --- src/zampy/datasets/land_cover.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/zampy/datasets/land_cover.py b/src/zampy/datasets/land_cover.py index 0ae9b78..25f12bb 100644 --- a/src/zampy/datasets/land_cover.py +++ b/src/zampy/datasets/land_cover.py @@ -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 @@ -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"