diff --git a/src/anemoi/datasets/create/functions/sources/xarray/flavour.py b/src/anemoi/datasets/create/functions/sources/xarray/flavour.py index 9c4fa009..f7f19155 100644 --- a/src/anemoi/datasets/create/functions/sources/xarray/flavour.py +++ b/src/anemoi/datasets/create/functions/sources/xarray/flavour.py @@ -8,8 +8,6 @@ # -import numpy as np - from .coordinates import LatitudeCoordinate from .coordinates import LevelCoordinate from .coordinates import LongitudeCoordinate @@ -125,7 +123,7 @@ def _guess(self, c, coord): if d is not None: return d - if isinstance(c.values, np.ndarray) and c.shape in ((1,), tuple()): + if c.shape in ((1,), tuple()): return ScalarCoordinate(c) raise NotImplementedError( diff --git a/tests/xarray/test_zarr.py b/tests/xarray/test_zarr.py index 7fe7bd31..60c63542 100644 --- a/tests/xarray/test_zarr.py +++ b/tests/xarray/test_zarr.py @@ -46,35 +46,5 @@ def test_weatherbench(): assert len(fs) == 2430240 -def test_dynamical(): - ds = xr.open_zarr("https://data.dynamical.org/noaa/gfs/analysis-hourly/latest.zarr") - fs = XarrayFieldList.from_xarray(ds) - print(len(fs)) - for i, f in enumerate(fs): - print(f) - if i > 10: - break - - -def test_coop_gfs(): - ds = xr.open_zarr("https://data.source.coop/aldenks/gfs-dynamical/analysis/v0.1.0.zarr") - fs = XarrayFieldList.from_xarray(ds) - print(len(fs)) - for i, f in enumerate(fs): - print(f) - if i > 10: - break - - -def test_coop_ifs(): - ds = xr.open_zarr("https://data.source.coop/aldenks/ifs-dynamical/analysis/v0.1.0.zarr") - fs = XarrayFieldList.from_xarray(ds) - print(len(fs)) - for i, f in enumerate(fs): - print(f) - if i > 10: - break - - if __name__ == "__main__": test_arco_era5()