Skip to content

Commit

Permalink
dont unnecessarily slice dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNicholas committed May 16, 2024
1 parent f997b79 commit 0baee1a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions virtualizarr/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@ def test_kerchunk_roundtrip_no_concat(self, tmpdir, format):

def test_kerchunk_roundtrip_concat(self, tmpdir, format):
# set up example xarray dataset
ds = xr.tutorial.open_dataset("air_temperature", decode_times=False).isel(
time=slice(None, 2000)
)
ds = xr.tutorial.open_dataset("air_temperature", decode_times=False)

# split into two datasets
ds1, ds2 = ds.isel(time=slice(None, 1000)), ds.isel(time=slice(1000, None))
ds1, ds2 = ds.isel(time=slice(None, 1460)), ds.isel(time=slice(1460, None))

# save it to disk as netCDF (in temporary directory)
ds1.to_netcdf(f"{tmpdir}/air1.nc")
Expand Down

0 comments on commit 0baee1a

Please sign in to comment.