Skip to content

Commit

Permalink
remove vertical encode_cf change as too hard coded into system
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyCMWF committed Jun 21, 2024
1 parent 8d4f14e commit d91d4d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cfgrib/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,7 @@ def encode_cf_first(data_var_attrs, encode_cf=("parameter", "time"), time_dims=(
raise ValueError("time_dims %r not a subset of %r" % (time_dims, ALL_REF_TIME_KEYS))
else:
coords_map.extend(DATA_TIME_KEYS)
if "level" in encode_cf:
coords_map.extend(VERTICAL_KEYS)
coords_map.extend(VERTICAL_KEYS)
coords_map.extend(SPECTRA_KEYS)
return coords_map

Expand Down
2 changes: 1 addition & 1 deletion tests/test_30_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_build_dataset_components_ignore_keys() -> None:
stream = messages.FileStream(TEST_DATA_UKMO, "warn")
index = dataset.open_fileindex(stream, messages.DEFAULT_INDEXPATH, dataset.INDEX_KEYS)
assert "subCentre" in index.index_keys
index = dataset.open_fileindex(stream, messages.DEFAULT_INDEXPATH, index_keys, ignore_keys=["subCentre"])
index = dataset.open_fileindex(stream, messages.DEFAULT_INDEXPATH, dataset.INDEX_KEYS, ignore_keys=["subCentre"])
assert "subCentre" not in index.index_keys

def test_Dataset() -> None:
Expand Down

0 comments on commit d91d4d6

Please sign in to comment.