Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Jul 15, 2024
1 parent b3fac82 commit 3f45a90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#


import numpy as np

from .coordinates import LatitudeCoordinate
from .coordinates import LevelCoordinate
from .coordinates import LongitudeCoordinate
Expand Down Expand Up @@ -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(
Expand Down
30 changes: 0 additions & 30 deletions tests/xarray/test_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 3f45a90

Please sign in to comment.