Skip to content

Commit

Permalink
more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Jul 10, 2024
1 parent 6e9bb2f commit 7ea7605
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ dependencies = [
]

optional-dependencies.all = [
"aiohttp",
"boto3",
"earthkit-data[mars]>=0.9",
"earthkit-geo>=0.2",
Expand All @@ -69,6 +70,7 @@ optional-dependencies.all = [
"kerchunk",
"pyproj",
"requests",
"s3fs",
]

optional-dependencies.create = [
Expand All @@ -81,6 +83,7 @@ optional-dependencies.create = [
]

optional-dependencies.dev = [
"aiohttp",
"boto3",
"earthkit-data[mars]>=0.9",
"earthkit-geo>=0.2",
Expand All @@ -94,6 +97,7 @@ optional-dependencies.dev = [
"pyproj",
"pytest",
"requests",
"s3fs",
"sphinx",
"sphinx-rtd-theme",
]
Expand All @@ -106,8 +110,10 @@ optional-dependencies.docs = [
]

optional-dependencies.remote = [
"aiohttp",
"boto3",
"requests",
"s3fs",
]

optional-dependencies.tests = [
Expand Down
32 changes: 31 additions & 1 deletion tests/xarray/test_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,35 @@ 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_weatherbench()
test_coop_ifs()

0 comments on commit 7ea7605

Please sign in to comment.