Skip to content

Commit

Permalink
Fix county-loading in test_zonal_average (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait authored Nov 11, 2024
1 parent 5d54bba commit 483fe8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions tests/geospatial/test_zonal_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


def test_nwm(
s3,
scale,
client_factory,
cluster_kwargs={
Expand All @@ -21,5 +20,5 @@ def test_nwm(
with client_factory(
**scale_kwargs[scale], **cluster_kwargs
) as client: # noqa: F841
result = nwm(scale=scale, s3fs=s3)
result = nwm(scale=scale)
result.compute()
5 changes: 2 additions & 3 deletions tests/geospatial/workloads/zonal_average.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from typing import Literal

import flox
import fsspec
import numpy as np
import rioxarray
import xarray as xr
from s3fs import S3FileSystem


def nwm(
scale: Literal["small", "medium", "large"],
s3fs: S3FileSystem,
) -> xr.DataArray:
ds = xr.open_zarr(
"s3://noaa-nwm-retrospective-2-1-zarr-pds/rtout.zarr", consolidated=True
Expand All @@ -26,7 +25,7 @@ def nwm(
counties = rioxarray.open_rasterio(
"s3://nwm-250m-us-counties/Counties_on_250m_grid.tif",
chunks="auto",
opener=s3fs.open,
opener=fsspec.open,
).squeeze()

# Remove any small floating point error in coordinate locations
Expand Down

0 comments on commit 483fe8e

Please sign in to comment.