@@ -192,7 +192,7 @@ def _get_data(
192192 filenames .append (filename )
193193
194194 initial_condition_names = ()
195- start_indices = _get_cumulative_timesteps (_get_raw_times (filenames , "netcdf4 " ))
195+ start_indices = _get_cumulative_timesteps (_get_raw_times (filenames , "h5netcdf " ))
196196 if write_extra_vars :
197197 variable_names = VariableNames (
198198 time_dependent_names = (* var_names , "varying_scalar_var" ),
@@ -289,7 +289,7 @@ def mock_monthly_zarr_ensemble_dim(
289289 )
290290
291291
292- def load_files_without_dask (files , engine = "netcdf4 " ) -> xr .Dataset :
292+ def load_files_without_dask (files , engine = "h5netcdf " ) -> xr .Dataset :
293293 """Load a sequence of files without dask, concatenating along the time dimension.
294294
295295 We load the data from the files into memory to ensure Datasets are properly closed,
@@ -407,7 +407,7 @@ def xarray_dataset_constructor(
407407@pytest .mark .parametrize (
408408 "mock_data_fixture, engine, file_pattern, labels" ,
409409 [
410- ("mock_monthly_netcdfs" , "netcdf4 " , "*.nc" , set ()),
410+ ("mock_monthly_netcdfs" , "h5netcdf " , "*.nc" , set ()),
411411 ("mock_monthly_zarr" , "zarr" , "*.zarr" , {"foo_label" }),
412412 ],
413413)
@@ -777,7 +777,7 @@ def test_dataset_config_dtype_raises():
777777@pytest .mark .parametrize (
778778 "mock_data_fixture, engine, file_pattern" ,
779779 [
780- ("mock_monthly_netcdfs_with_nans" , "netcdf4 " , "*.nc" ),
780+ ("mock_monthly_netcdfs_with_nans" , "h5netcdf " , "*.nc" ),
781781 ("mock_monthly_zarr_with_nans" , "zarr" , "*.zarr" ),
782782 ],
783783)
@@ -1049,7 +1049,7 @@ def test_invalid_config_field_raises_error(kwargs):
10491049@pytest .mark .parametrize (
10501050 "mock_data_fixture, engine, file_pattern" ,
10511051 [
1052- ("mock_monthly_netcdfs_ensemble_dim" , "netcdf4 " , "*.nc" ),
1052+ ("mock_monthly_netcdfs_ensemble_dim" , "h5netcdf " , "*.nc" ),
10531053 ("mock_monthly_zarr_ensemble_dim" , "zarr" , "*.zarr" ),
10541054 ],
10551055)
@@ -1074,7 +1074,7 @@ def test_dataset_with_nonspacetime_dim(
10741074@pytest .mark .parametrize (
10751075 "mock_data_fixture, engine, file_pattern" ,
10761076 [
1077- ("mock_monthly_netcdfs_ensemble_dim" , "netcdf4 " , "*.nc" ),
1077+ ("mock_monthly_netcdfs_ensemble_dim" , "h5netcdf " , "*.nc" ),
10781078 ("mock_monthly_zarr_ensemble_dim" , "zarr" , "*.zarr" ),
10791079 ],
10801080)
@@ -1098,7 +1098,7 @@ def test_dataset_raise_error_on_dim_mismatch(
10981098@pytest .mark .parametrize (
10991099 "mock_data_fixture, engine, file_pattern" ,
11001100 [
1101- ("mock_monthly_netcdfs_ensemble_dim" , "netcdf4 " , "*.nc" ),
1101+ ("mock_monthly_netcdfs_ensemble_dim" , "h5netcdf " , "*.nc" ),
11021102 ("mock_monthly_zarr_ensemble_dim" , "zarr" , "*.zarr" ),
11031103 ],
11041104)
@@ -1191,7 +1191,7 @@ def test_parallel__get_raw_times(tmpdir):
11911191 ds .isel (time = time_slice ).to_netcdf (path )
11921192 paths .append (path )
11931193
1194- result = np .concatenate (_get_raw_times (paths , engine = "netcdf4 " ))
1194+ result = np .concatenate (_get_raw_times (paths , engine = "h5netcdf " ))
11951195 np .testing .assert_equal (result , times )
11961196
11971197
0 commit comments