diff --git a/tests/sample-data/cams-egg4-monthly.grib b/tests/sample-data/cams-egg4-monthly.grib new file mode 100644 index 00000000..5af77c33 Binary files /dev/null and b/tests/sample-data/cams-egg4-monthly.grib differ diff --git a/tests/sample-data/era5-levels-members.nc b/tests/sample-data/era5-levels-members.nc index 9e52bd77..866410d3 100644 Binary files a/tests/sample-data/era5-levels-members.nc and b/tests/sample-data/era5-levels-members.nc differ diff --git a/tests/test_50_sample_data.py b/tests/test_50_sample_data.py index 49765d28..9ea09a58 100644 --- a/tests/test_50_sample_data.py +++ b/tests/test_50_sample_data.py @@ -120,3 +120,12 @@ def test_dataset_missing_field_values() -> None: t2 = res.variables["t2m"] assert np.isclose(np.nanmean(t2[0, :, :]), 268.375) assert np.isclose(np.nanmean(t2[1, :, :]), 270.716) + + +def test_valid_month_time_dim() -> None: + + test_file = os.path.join(SAMPLE_DATA_FOLDER, "cams-egg4-monthly.grib") + ds = xr.open_dataset(test_file, time_dims=["valid_month"]) + + assert "valid_month" in ds.dims +