You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Core function select_spatial_subset may raise an ArrayMemoryError for large spatial images, e.g. 129600 x 64800 pixels (ESA Land Cover CCI) although the dataset is chunked:
File "D:\Projects\xcube\test\core\test_select.py", line 156, in test_xy_bbox_with_large_dataset
ds_subset = select_spatial_subset(ds, xy_bbox=(0., 0., 5.0, 2.5))
File "D:\Projects\xcube\xcube\core\select.py", line 99, in select_spatial_subset
geo_coding = geo_coding if geo_coding is not None else GeoCoding.from_xy((x, y), xy_names=xy_names)
File "D:\Projects\xcube\xcube\core\geocoding.py", line 172, in from_xy
x, is_lon_normalized = _maybe_normalise_2d_lon(x)
File "D:\Projects\xcube\xcube\core\geocoding.py", line 468, in _maybe_normalise_2d_lon
if _is_crossing_antimeridian(lon_var):
File "D:\Projects\xcube\xcube\core\geocoding.py", line 463, in _is_crossing_antimeridian
return abs(lon_var.diff(dim=dim_x)).max() > 180.0 or \
File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\dataarray.py", line 3107, in diff
ds = self._to_temp_dataset().diff(n=n, dim=dim, label=label)
File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\dataset.py", line 5489, in diff
variables[name] = var.isel(**kwargs_end) - var.isel(**kwargs_start)
File "D:\Miniconda3\envs\xcube\lib\site-packages\xarray\core\variable.py", line 2301, in func
f(self_data, other_data)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 62.6 GiB for an array with shape (64800, 129599) and data type float64
Expected behavior
The spatial subset datasets should be created without errors and should also be chunked as the source.
Additional context
xcube 0.8.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Core function
select_spatial_subset
may raise an ArrayMemoryError for large spatial images, e.g. 129600 x 64800 pixels (ESA Land Cover CCI) although the dataset is chunked:Expected behavior
The spatial subset datasets should be created without errors and should also be chunked as the source.
Additional context
xcube 0.8.0
The text was updated successfully, but these errors were encountered: