Skip to content

Commit

Permalink
fix(ceda): Remove index creation
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed May 30, 2024
1 parent 44f7fb1 commit 53c2d1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/nwp_consumer/internal/inputs/ceda/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def mapCachedRaw(self, *, p: pathlib.Path) -> xr.Dataset:
datasets: list[xr.Dataset] = cfgrib.open_datasets(
path=p.as_posix(),
chunks={"time": 1, "step": -1, "variable": -1, "x": "auto", "y": "auto"},
backend_kwargs={"indexpath": ""},
)
except Exception as e:
log.warn(event="error converting raw file to dataset", filepath=p.as_posix(), error=e)
Expand Down Expand Up @@ -244,7 +245,6 @@ def mapCachedRaw(self, *, p: pathlib.Path) -> xr.Dataset:
},
)
)
print(wholesaleDataset)
return wholesaleDataset

def parameterConformMap(self) -> dict[str, internal.OCFParameter]:
Expand Down
4 changes: 2 additions & 2 deletions src/nwp_consumer/internal/inputs/ceda/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_convertsWholesale1FileCorrectly(self) -> None:

# Ensure the dimensions have the right sizes
self.assertDictEqual(
{"init_time": 1, "step": 3, "y": 704, "x": 548},
{"init_time": 1, "step": 4, "y": 704, "x": 548},
dict(out.sizes.items()),
)
# Ensure the correct variables are in the variable dimension
Expand All @@ -56,7 +56,7 @@ def test_convertsWholesale2FileCorrectly(self) -> None:

# Ensure the dimensions have the right sizes
self.assertDictEqual(
{"init_time": 1, "step": 3, "y": 704, "x": 548},
{"init_time": 1, "step": 4, "y": 704, "x": 548},
dict(out.sizes.items()),
)
# Ensure the correct variables are in the variable dimension
Expand Down

0 comments on commit 53c2d1f

Please sign in to comment.